2022-10-07 00:50:16 -04:00
|
|
|
name: Configure
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
ci-configure:
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Ubuntu GCC
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: gcc
|
|
|
|
configure-args: --warn
|
|
|
|
|
2022-10-10 21:38:33 -04:00
|
|
|
# Test out of source builds
|
|
|
|
- name: Ubuntu GCC OSB
|
2022-10-07 00:50:16 -04:00
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: gcc
|
|
|
|
configure-args: --warn
|
2022-10-10 21:38:33 -04:00
|
|
|
build-dir: ../build
|
|
|
|
src-dir: ../zlib
|
2022-10-07 00:50:16 -04:00
|
|
|
|
|
|
|
- name: macOS GCC
|
|
|
|
os: macos-latest
|
|
|
|
compiler: gcc-9
|
|
|
|
configure-args: --warn
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Generate project files
|
|
|
|
run: |
|
2022-10-10 21:38:33 -04:00
|
|
|
[ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }}
|
|
|
|
cd ${{ matrix.build-dir || '.' }}
|
|
|
|
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }}
|
2022-10-07 00:50:16 -04:00
|
|
|
env:
|
|
|
|
CC: ${{ matrix.compiler }}
|
|
|
|
|
|
|
|
- name: Compile source code
|
|
|
|
run: make -j2
|
|
|
|
working-directory: ${{ matrix.build-dir }}
|
|
|
|
|
|
|
|
- name: Run test cases
|
2022-10-10 21:40:09 -04:00
|
|
|
run: |
|
|
|
|
make test
|
|
|
|
make cover
|
2022-10-07 00:50:16 -04:00
|
|
|
working-directory: ${{ matrix.build-dir }}
|
2022-10-10 21:39:14 -04:00
|
|
|
|
|
|
|
- name: Upload build errors
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.name }} (configure)
|
|
|
|
path: |
|
|
|
|
${{ matrix.build-dir || '.' }}/configure.log
|
|
|
|
retention-days: 7
|