From 559029e11a0dac6bbbcfd35dd8000f62d6241af1 Mon Sep 17 00:00:00 2001 From: Petr Štetiar Date: Sun, 8 May 2022 09:56:35 +0200 Subject: ci: make jobs faster during pull request testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the proliferation of test cases, CI runs tend to become rather long since we run all tests under valgrind using multiple gcc and Clang versions each. In order to speedup the jobs, we tests pull requests under the most recent Clang versions and run all tests when the code hits the master branch. Closes #66 Signed-off-by: Petr Štetiar --- .github/workflows/openwrt-ci-master.yml | 52 +++++++++++++++++++++++++ .github/workflows/openwrt-ci-pull-request.yml | 56 +++++++++++++++++++++++++++ .github/workflows/openwrt-ci.yml | 48 ----------------------- 3 files changed, 108 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/openwrt-ci-master.yml create mode 100644 .github/workflows/openwrt-ci-pull-request.yml delete mode 100644 .github/workflows/openwrt-ci.yml (limited to '.github/workflows') diff --git a/.github/workflows/openwrt-ci-master.yml b/.github/workflows/openwrt-ci-master.yml new file mode 100644 index 0000000..77f2bfc --- /dev/null +++ b/.github/workflows/openwrt-ci-master.yml @@ -0,0 +1,52 @@ +name: OpenWrt CI master branch testing + +on: + push: + branches: + - master + +env: + CI_ENABLE_UNIT_TESTING: 1 + CI_TARGET_BUILD_DEPENDS: libnl-tiny ubus uci + +jobs: + native_testing: + name: Various native checks + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - uses: ynezz/gh-actions-openwrt-ci-native@v0.0.2 + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + if: failure() + with: + name: native-build-artifacts + if-no-files-found: ignore + path: | + build/scan + tests/cram/**/*.t.err + + sdk_build: + name: Build with OpenWrt ${{ matrix.sdk_platform }} SDK (out of tree) + runs-on: ubuntu-20.04 + + strategy: + fail-fast: false + matrix: + sdk_platform: + - ath79-generic + - imx6-generic + - malta-be + - mvebu-cortexa53 + + steps: + - uses: actions/checkout@v2 + + - name: Out of tree build with OpenWrt ${{ matrix.sdk_platform }} SDK + uses: ynezz/gh-actions-openwrt-ci-sdk@v0.0.1 + env: + CI_TARGET_SDK_RELEASE: master + CI_TARGET_SDK_IMAGE: ${{ matrix.sdk_platform }} diff --git a/.github/workflows/openwrt-ci-pull-request.yml b/.github/workflows/openwrt-ci-pull-request.yml new file mode 100644 index 0000000..e6be980 --- /dev/null +++ b/.github/workflows/openwrt-ci-pull-request.yml @@ -0,0 +1,56 @@ +name: OpenWrt CI pull request testing + +on: + push: + branches-ignore: + - master + pull_request: + +env: + CI_ENABLE_UNIT_TESTING: 1 + CI_TARGET_BUILD_DEPENDS: libnl-tiny ubus uci + +jobs: + native_testing: + name: Various native checks + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - uses: ynezz/gh-actions-openwrt-ci-native@v0.0.2 + env: + CI_GCC_VERSION_LIST: + CI_CLANG_VERSION_LIST: 11 + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + if: failure() + with: + name: native-build-artifacts + if-no-files-found: ignore + path: | + build/scan + tests/cram/**/*.t.err + + sdk_build: + name: Build with OpenWrt ${{ matrix.sdk_platform }} SDK (out of tree) + runs-on: ubuntu-20.04 + + strategy: + fail-fast: false + matrix: + sdk_platform: + - ath79-generic + - imx6-generic + - malta-be + - mvebu-cortexa53 + + steps: + - uses: actions/checkout@v2 + + - name: Out of tree build with OpenWrt ${{ matrix.sdk_platform }} SDK + uses: ynezz/gh-actions-openwrt-ci-sdk@v0.0.1 + env: + CI_TARGET_SDK_RELEASE: master + CI_TARGET_SDK_IMAGE: ${{ matrix.sdk_platform }} diff --git a/.github/workflows/openwrt-ci.yml b/.github/workflows/openwrt-ci.yml deleted file mode 100644 index 4342205..0000000 --- a/.github/workflows/openwrt-ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: OpenWrt CI testing - -on: [ push, pull_request ] -env: - CI_ENABLE_UNIT_TESTING: 1 - CI_TARGET_BUILD_DEPENDS: libnl-tiny ubus uci - -jobs: - native_testing: - name: Various native checks - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - uses: ynezz/gh-actions-openwrt-ci-native@v0.0.1 - - - name: Upload build artifacts - uses: actions/upload-artifact@v2 - if: failure() - with: - name: native-build-artifacts - if-no-files-found: ignore - path: | - build/scan - tests/cram/**/*.t.err - - sdk_build: - name: Build with OpenWrt ${{ matrix.sdk_platform }} SDK (out of tree) - runs-on: ubuntu-20.04 - - strategy: - fail-fast: false - matrix: - sdk_platform: - - ath79-generic - - imx6-generic - - malta-be - - mvebu-cortexa53 - - steps: - - uses: actions/checkout@v2 - - - name: Out of tree build with OpenWrt ${{ matrix.sdk_platform }} SDK - uses: ynezz/gh-actions-openwrt-ci-sdk@v0.0.1 - env: - CI_TARGET_SDK_RELEASE: master - CI_TARGET_SDK_IMAGE: ${{ matrix.sdk_platform }} -- cgit v1.2.3