Skip to content

Commit

Permalink
workflow: move unittests to separate job to be run first
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Shpakov committed Dec 16, 2020
1 parent e77ec37 commit 0674e83
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,43 @@ on:

name: Build EmuFlight
jobs:
unittests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache toolchain
uses: actions/cache@v2
env:
cache-name: cache-toolchain
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.toolchain
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Toolchain
uses: fiam/arm-none-eabi-gcc@master
with:
release: '9-2020-q2' # The arm-none-eabi-gcc release to use.
directory: '~/.toolchain'
- name: Install prerequisites
run: |
sudo apt install libblocksruntime-dev
- name : Run tests
run: |
make test_cli_unittest
build:
timeout-minutes: 75
strategy:
max-parallel: 4
matrix:
targets: [targets-group-1, targets-group-2, targets-group-3, targets-group-rest]
runs-on: ubuntu-latest
needs: unittests
steps:

# curl, by default, may timeout easily
Expand Down Expand Up @@ -93,9 +123,6 @@ jobs:
echo "Artifact name: ${{ env.ARTIFACT_NAME }}"
continue-on-error: true

- name : Run tests
run: |
make test

- name: Compile Code
run: |
Expand Down

0 comments on commit 0674e83

Please sign in to comment.