Split github build actions into 2 tiers (tier 1 and 2 supported platforms); tier 1 platforms are build automatically, tier 2 are built on demand.

This commit is contained in:
Alexander Shaduri
2021-03-09 21:11:54 +04:00
parent 4a658d8f43
commit 57f9605f70
2 changed files with 48 additions and 47 deletions
@@ -1,5 +1,6 @@
name: CMake
name: Build (Tier 1 platforms)
# Triggered automatically on each push to main
on: [push]
env:
@@ -32,8 +33,8 @@ jobs:
-DAPP_COMPILER_ENABLE_WARNINGS=ON
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
@@ -61,8 +62,8 @@ jobs:
mingw-w64-${{ matrix.arch }}-make
- name: Configure CMake
working-directory: ${{runner.workspace}}
shell: msys2 {0}
working-directory: ${{runner.workspace}}
run: >
cmake -B build -S "$GITHUB_WORKSPACE" -G "MSYS Makefiles" ..
-DCMAKE_MAKE_PROGRAM=mingw32-make
@@ -76,6 +77,8 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
# TODO Pack zip, NSIS
macos-homebrew:
runs-on: macos-latest
@@ -100,50 +103,7 @@ jobs:
-DAPP_COMPILER_ENABLE_WARNINGS=ON
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
freebsd:
runs-on: macos-latest
# env:
# variables to pass to VM
# MYTOKEN : ${{ secrets.MYTOKEN }}
steps:
- uses: actions/checkout@v2
- name: Build and test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v0.1.2
with:
envs: 'BUILD_TYPE'
usesh: true
sync: rsync
mem: 2048
prepare: >
pkg install -y cmake pkgconf gtkmm30 gettext pcre libiconv
run: >
mkdir build && cd build
cmake ..
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
cmake --build . --config $BUILD_TYPE
# - name: Pack
# working-directory: ${{runner.workspace}}/build
# shell: bash
# run: cmake --build . --config $BUILD_TYPE --target package
# - name: Test
# working-directory: ${{runner.workspace}}/build
# shell: bash
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C $BUILD_TYPE
+41
View File
@@ -0,0 +1,41 @@
name: Build (Tier 2 platforms)
# Manually triggered
on: [workflow_dispatch]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
freebsd:
runs-on: macos-latest
# env:
# variables to pass to VM
# MYTOKEN : ${{ secrets.MYTOKEN }}
steps:
- uses: actions/checkout@v2
- name: Build and test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v0.1.2
with:
envs: 'BUILD_TYPE'
usesh: true
sync: rsync
mem: 2048
prepare: >
pkg install -y cmake pkgconf gtkmm30 gettext pcre libiconv
run: >
mkdir build && cd build
cmake ..
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
cmake --build . --config $BUILD_TYPE