-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (63 loc) · 1.7 KB
/
sanity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Sanity Checks
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-libg2hec-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
compiler_c: [gcc, clang]
compiler_cxx: [g++, clang++]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y texinfo
sudo apt install -y texlive-latex-extra
sudo apt install -y autotools-dev autoconf build-essential bear
- name: Build
env:
CC: ${{ matrix.compiler_c }}
CXX: ${{ matrix.compiler_cxx }}
run: |
cd ${{ github.workspace }}
autoreconf -vi
./scripts/build.sh distcheck
shellcheck:
name: 'shellcheck'
strategy:
fail-fast: false
# Run on Linux and macos
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4.1.1
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: 'Install shellcheck on Ubuntu'
run: |
sudo apt update
sudo apt install shellcheck -y
- if: ${{ matrix.os == 'macos-latest' }}
name: 'Install shellcheck on macOS'
run: |
brew install shellcheck
- name: 'Run shellcheck'
run: |
set -euxo pipefail
cd ${{ github.workspace }}/
shellcheck --version
for f in $(find scripts/ -type f); do
if file "$f" | grep "shell script" &>/dev/null; then
shellcheck "$f"
fi
done