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

pull/763/head
Nathan Moinvaziri 2 years ago committed by Mark Adler
parent 723abd54d8
commit 462986f38e
  1. 13
      .github/workflows/cmake.yml
  2. 13
      .github/workflows/configure.yml

@ -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 || '.' }}

@ -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 }}

Loading…
Cancel
Save