CI: Make in-source builds default so we can upload failure logs.

This commit is contained in:
Nathan Moinvaziri 2022-10-10 18:38:33 -07:00 committed by Mark Adler
parent 723abd54d8
commit 462986f38e
2 changed files with 14 additions and 12 deletions

View File

@ -12,11 +12,12 @@ jobs:
os: ubuntu-latest
compiler: gcc
- name: Ubuntu GCC ISB
# Test out of source builds
- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
build-dir: "."
src-dir: "."
build-dir: ../build
src-dir: ../zlib
- name: Ubuntu Clang
os: ubuntu-latest
@ -50,13 +51,13 @@ jobs:
uses: actions/checkout@v3
- name: Generate project files
run: cmake -S ${{ matrix.src-dir || '../zlib' }} -B ${{ matrix.build-dir || '../build' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }}
run: cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }}
env:
CC: ${{ matrix.compiler }}
- name: Compile source code
run: cmake --build ${{ matrix.build-dir || '../build' }} --config ${{ matrix.build-config || 'Release' }}
run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }}
- name: Run test cases
run: ctest -C Release --output-on-failure --max-width 120
working-directory: ${{ matrix.build-dir || '../build' }}
working-directory: ${{ matrix.build-dir || '.' }}

View File

@ -13,12 +13,13 @@ jobs:
compiler: gcc
configure-args: --warn
- name: Ubuntu GCC ISB
# Test out of source builds
- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
configure-args: --warn
build-dir: "."
src-dir: "."
build-dir: ../build
src-dir: ../zlib
- name: macOS GCC
os: macos-latest
@ -31,9 +32,9 @@ jobs:
- 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 }}
[ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }}
cd ${{ matrix.build-dir || '.' }}
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }}
env:
CC: ${{ matrix.compiler }}