From c34ddd32a56ec998f29c17378ef7790400f25d95 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Fri, 4 Feb 2022 14:29:26 +0400 Subject: [PATCH] Split github tier2 builds into standard and flaky actions. --- .github/workflows/cmake-tier2-flaky.yml | 46 +++++++++++++++++++++++++ .github/workflows/cmake-tier2.yml | 43 +++++------------------ 2 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/cmake-tier2-flaky.yml diff --git a/.github/workflows/cmake-tier2-flaky.yml b/.github/workflows/cmake-tier2-flaky.yml new file mode 100644 index 0000000..4c8e628 --- /dev/null +++ b/.github/workflows/cmake-tier2-flaky.yml @@ -0,0 +1,46 @@ +name: Build (Tier 2 platforms with flaky builds) + +# FreeBSD build via vmactions/freebsd-vm is known to fail randomly, +# so we don't want it to be triggered on every commit. + +# 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 + + ctest -C $BUILD_TYPE diff --git a/.github/workflows/cmake-tier2.yml b/.github/workflows/cmake-tier2.yml index 8ba8869..f715a78 100644 --- a/.github/workflows/cmake-tier2.yml +++ b/.github/workflows/cmake-tier2.yml @@ -1,7 +1,14 @@ name: Build (Tier 2 platforms) -# Manually triggered -on: [workflow_dispatch] +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -42,35 +49,3 @@ jobs: shell: bash run: ctest -C $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 - - ctest -C $BUILD_TYPE