zlib/.github/workflows/configure.yml
2022-10-11 20:21:50 -07:00

57 lines
1.4 KiB
YAML

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
# Test out of source builds
- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
configure-args: --warn
build-dir: ../build
src-dir: ../zlib
- 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: |
[ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }}
cd ${{ matrix.build-dir || '.' }}
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }}
env:
CC: ${{ matrix.compiler }}
- name: Compile source code
run: make -j2
working-directory: ${{ matrix.build-dir }}
- name: Run test cases
run: make test
working-directory: ${{ matrix.build-dir }}
- 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