Debian Codegraph @

.github/workflows/main.yml

raw symbols SCIP
1 name: 'CI build'
2
3 # Exclude some non-existing example branch
4 on:
5 push:
6 branches-ignore:
7 - html-docs
8 pull_request:
9 branches-ignore:
10 - html-docs
11
12 env:
13 LC_ALL: C
14 COMMON_CONFIGURE_FLAGS: >-
15 --disable-silent-rules
16
17 jobs:
18 amb:
19
20 runs-on: ${{ matrix.os }}
21
22 name: 'amb ${{ matrix.os }}'
23
24 strategy:
25 fail-fast: true
26 matrix:
27 os:
28 - ubuntu-latest
29 - macos-latest
30
31 steps:
32 - uses: actions/checkout@v4
33
34 - name: 'Determine number of cores to build on (Linux)'
35 if: runner.os == 'Linux'
36 run: echo NPROC=$(nproc) >> $GITHUB_ENV
37
38 - name: 'Determine number of cores to build on (macOS)'
39 if: runner.os == 'macOS'
40 run: echo NPROC=$(sysctl -n hw.logicalcpu) >> $GITHUB_ENV
41
42 # Setting MAKE interferes with Makefile{,.in,.am} using $(MAKE) internally
43 - name: 'Prepare concurrent make'
44 run: if test "x$NPROC" = x; then echo ci_MAKE="make" >> $GITHUB_ENV; echo "NPROC must be set"; exit 1; else echo ci_MAKE="make -j${NPROC} -l${NPROC}" >> $GITHUB_ENV; fi
45
46 - name: 'Update software database (Linux)'
47 if: runner.os == 'Linux'
48 run: sudo apt-get update
49
50 - name: 'Update software database (macOS)'
51 if: runner.os == 'macOS'
52 run: brew update
53
54 - name: 'Install build requirements (Linux)'
55 if: runner.os == 'Linux'
56 run: sudo apt-get install -y libext2fs-dev pkgconf
57
58 - name: 'Install build requirements (macOS)'
59 if: runner.os == 'macOS'
60 run: |
61 brew install autoconf automake pkg-config e2fsprogs
62 echo PKG_CONFIG_PATH="/opt/homebrew/opt/e2fsprogs/lib/pkgconfig" >> $GITHUB_ENV
63
64 # - name: 'OS specific build flags (Linux)'
65 # if: runner.os == 'Linux'
66 # run: echo OS_SPECIFIC_CPPFLAGS="" >> $GITHUB_ENV
67
68 # # FIXME: Fix source to build without the -D_DARWIN_C_SOURCE here
69 # - name: 'OS specific build flags (macOS)'
70 # if: runner.os == 'macOS'
71 # run: echo OS_SPECIFIC_CPPFLAGS="-D_DARWIN_C_SOURCE -I$(brew --prefix)/include" >> $GITHUB_ENV
72
73 - name: 'autoreconf'
74 run: autoreconf -v -i -f
75
76 - name: 'configure'
77 run: ./configure ${COMMON_CONFIGURE_FLAGS} --prefix=$PWD/__prefix
78
79 - name: 'make'
80 run: set -x; ${ci_MAKE} CPPFLAGS="${OS_SPECIFIC_CPPFLAGS}"
81
82 - name: 'make check'
83 run: set -x; ${ci_MAKE} CPPFLAGS="${OS_SPECIFIC_CPPFLAGS}" check
84
85 - name: 'make distcheck'
86 run: set -x; ${ci_MAKE} CPPFLAGS="${OS_SPECIFIC_CPPFLAGS}" DISTCHECK_CONFIGURE_FLAGS="${COMMON_CONFIGURE_FLAGS}" distcheck
87
88 - name: 'make install'
89 run: set -x; ${ci_MAKE} CPPFLAGS="${OS_SPECIFIC_CPPFLAGS}" install
90
91 - name: 'make installcheck'
92 run: set -x; ${ci_MAKE} CPPFLAGS="${OS_SPECIFIC_CPPFLAGS}" installcheck