From 462986f38e14ff8d9715500d37c5f6400420bb5c Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Mon, 10 Oct 2022 18:38:33 -0700 Subject: [PATCH] CI: Make in-source builds default so we can upload failure logs. --- .github/workflows/cmake.yml | 13 +++++++------ .github/workflows/configure.yml | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ed3a79bf..5113952a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.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 || '.' }} diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index 2c19e60e..09f67b4e 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -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 }}