zlib/.github/workflows/configure.yml
Mark Adler 67eb09a20b Add continuous integration workflows. [nmoinvaz]
These workflows will be run to verify that project generation,
source file compilation, and test cases run successfully.
2022-10-06 21:59:53 -07:00

47 lines
1.2 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
- name: Ubuntu GCC ISB
os: ubuntu-latest
compiler: gcc
configure-args: --warn
build-dir: "."
src-dir: "."
- 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 || '../build' }} ] || mkdir ${{ matrix.build-dir || '../build' }}
cd ${{ matrix.build-dir || '../build' }}
${{ matrix.src-dir || '../zlib' }}/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 }}