diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a0a8e47bc..431787d842 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -103,6 +103,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ ${{ matrix.platform.cmake }} - name: Build (CMake) + id: build run: | ${{ matrix.platform.source_cmd }} cmake --build build/ --config Release --verbose --parallel @@ -123,6 +124,7 @@ jobs: cmake --install build/ --config Release ( cd cmake_prefix; find . ) | LC_ALL=C sort -u - name: Package (CPack) + if: ${{ always() && steps.build.outcome == 'success' }} run: | cmake --build build/ --config Release --target package - name: Verify CMake configuration files @@ -141,6 +143,7 @@ jobs: export PKG_CONFIG_PATH=$(echo "${{ github.workspace }}/cmake_prefix/lib/pkgconfig" | sed -e 's#\\#/#g') cmake/test/test_pkgconfig.sh - uses: actions/upload-artifact@v3 + if: ${{ always() && steps.build.outcome == 'success' }} with: if-no-files-found: error name: ${{ matrix.platform.artifact }} diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index d7b51e292f..897f694300 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -57,7 +57,9 @@ jobs: ${{ matrix.platform.flags }} ` -DCMAKE_INSTALL_PREFIX=prefix - name: Build (CMake) - run: cmake --build build/ --config Release --parallel + id: build + run: | + cmake --build build/ --config Release --parallel - name: Run build-time tests if: ${{ !matrix.platform.notests }} run: | @@ -68,6 +70,7 @@ jobs: echo "SDL3_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV cmake --install build/ - name: Package (CPack) + if: ${{ always() && steps.build.outcome == 'success' }} run: | cmake --build build/ --config Release --target PACKAGE - name: Verify CMake configuration files @@ -84,6 +87,7 @@ jobs: if: ${{ matrix.platform.project != '' }} run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }} - uses: actions/upload-artifact@v3 + if: ${{ always() && steps.build.outcome == 'success' }} with: if-no-files-found: error name: ${{ matrix.platform.artifact }}