Skip to content

Commit

Permalink
ci: make jobs faster during pull request testing
Browse files Browse the repository at this point in the history
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 valgrind only
for the most recent GCC and Clang versions and run all tests when the
code hits the master branch.

Closes jow-#66
Signed-off-by: Petr Štetiar <ynezz@true.cz>
  • Loading branch information
ynezz committed May 8, 2022
1 parent 9a72423 commit 5a5487e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: OpenWrt CI testing
name: OpenWrt CI master branch testing

on:
push:
branches:
- master

on: [ push, pull_request ]
env:
CI_ENABLE_UNIT_TESTING: 1
CI_TARGET_BUILD_DEPENDS: libnl-tiny ubus uci
Expand All @@ -13,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ynezz/gh-actions-openwrt-ci-native@v0.0.1
- uses: ynezz/gh-actions-openwrt-ci-native@v0.0.2

- name: Upload build artifacts
uses: actions/upload-artifact@v2
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/openwrt-ci-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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: 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 }}

0 comments on commit 5a5487e

Please sign in to comment.