| 1 |
name: linux/mac |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ '*' ] |
| 6 |
pull_request: |
| 7 |
branches: [ master ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
|
| 11 |
build: |
| 12 |
|
| 13 |
runs-on: ${{ matrix.os }} |
| 14 |
strategy: |
| 15 |
matrix: |
| 16 |
compiler: |
| 17 |
- gcc |
| 18 |
- clang |
| 19 |
os: |
| 20 |
- ubuntu-latest |
| 21 |
- macOS-latest |
| 22 |
|
| 23 |
steps: |
| 24 |
- uses: actions/checkout@v2 |
| 25 |
|
| 26 |
- run: env | sort |
| 27 |
- name: Install software |
| 28 |
run: | |
| 29 |
if [[ '${{ matrix.os }}' == macOS-latest ]]; then |
| 30 |
brew install automake bash coreutils make |
| 31 |
echo ::add-path::/usr/local/opt/coreutils/libexec/gnubin |
| 32 |
echo ::add-path::/usr/local/opt/make/libexec/gnubin |
| 33 |
fi |
| 34 |
- name: Fetch branches |
| 35 |
run: | |
| 36 |
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* |
| 37 |
git fetch --unshallow |
| 38 |
|
| 39 |
- run: ./bootstrap |
| 40 |
- run: ./configure |
| 41 |
- run: make |
| 42 |
- run: make test-all |
| 43 |
|
| 44 |
- run: | |
| 45 |
git clean -d -x -f |
| 46 |
rm -fr tests/run-test-suite |
| 47 |
git worktree prune |
| 48 |
|
| 49 |
- name: Compiler version |
| 50 |
run: ${{ matrix.compiler }} --version |
| 51 |
env: |
| 52 |
CC: ${{ matrix.compiler }} |
| 53 |
- run: cmake . |
| 54 |
env: |
| 55 |
CC: ${{ matrix.compiler }} |
| 56 |
- run: make |
| 57 |
env: |
| 58 |
CC: ${{ matrix.compiler }} |
| 59 |
- run: make test |