Always upload GitHub Build artifacts, even on failure

This commit is contained in:
Marius Greuel 2021-12-29 22:27:36 +01:00
parent 4c3530e199
commit 65e3fe358a
1 changed files with 33 additions and 14 deletions

View File

@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
name: CMake Build name: Build
on: on:
push: push:
@ -27,7 +27,7 @@ env:
BUILD_TYPE: RelWithDebInfo BUILD_TYPE: RelWithDebInfo
jobs: jobs:
build-ubuntu: linux-x86_64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
run: run:
@ -46,16 +46,22 @@ jobs:
libftdi1-dev libftdi1-dev
libhidapi-dev libhidapi-dev
- name: Configure - name: Configure
run: cmake -DDEBUG_CMAKE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B ${{github.workspace}}/build run: >-
cmake
-D DEBUG_CMAKE=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-B ${{github.workspace}}/build
- name: Build - name: Build
run: cmake --build ../build run: cmake --build ${{github.workspace}}/build
- name: Archive build artifacts - name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: build-ubuntu name: linux-x86_64
path: | path: |
${{github.workspace}}/build/* ${{github.workspace}}/build/*
build-macos:
macos-x86_64:
runs-on: macos-latest runs-on: macos-latest
defaults: defaults:
run: run:
@ -73,16 +79,23 @@ jobs:
libftdi libftdi
hidapi hidapi
- name: Configure - name: Configure
run: cmake -DCMAKE_C_FLAGS=-I/usr/local/include -DCMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar -DDEBUG_CMAKE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B ${{github.workspace}}/build run: >-
cmake
-D CMAKE_C_FLAGS=-I/usr/local/include
-D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar
-D DEBUG_CMAKE=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-B ${{github.workspace}}/build
- name: Build - name: Build
run: cmake --build ../build run: cmake --build ${{github.workspace}}/build
- name: Archive build artifacts - name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: build-macos name: macos-x86_64
path: | path: |
${{github.workspace}}/build/* ${{github.workspace}}/build/*
build-mingw: mingw:
runs-on: windows-latest runs-on: windows-latest
defaults: defaults:
run: run:
@ -109,12 +122,18 @@ jobs:
mingw-w64-${{matrix.env}}-hidapi mingw-w64-${{matrix.env}}-hidapi
mingw-w64-${{matrix.env}}-libftdi mingw-w64-${{matrix.env}}-libftdi
- name: Configure - name: Configure
run: cmake -G"MSYS Makefiles" -DDEBUG_CMAKE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B ../build_${{matrix.sys}} run: >-
cmake
-G"MSYS Makefiles"
-D DEBUG_CMAKE=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-B ../build
- name: Build - name: Build
run: cmake --build ../build_${{matrix.sys}} run: cmake --build ../build
- name: Archive build artifacts - name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: build-mingw-${{matrix.sys}} name: mingw-${{matrix.env}}
path: | path: |
${{github.workspace}}/build_${{matrix.sys}}/* ${{github.workspace}}/build/*