Skip to content

Commit dc9027a

Browse files
author
Igor Shpakov
committed
workflow: move unittests to separate job to be run first
1 parent e77ec37 commit dc9027a

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,43 @@ on:
1313

1414
name: Build EmuFlight
1515
jobs:
16+
unittests:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 0
23+
- name: Cache toolchain
24+
uses: actions/cache@v2
25+
env:
26+
cache-name: cache-toolchain
27+
with:
28+
# npm cache files are stored in `~/.npm` on Linux/macOS
29+
path: ~/.toolchain
30+
key: ${{ runner.os }}-build-${{ env.cache-name }}
31+
restore-keys: |
32+
${{ runner.os }}-build-
33+
${{ runner.os }}-
34+
- name: Setup Toolchain
35+
uses: fiam/arm-none-eabi-gcc@master
36+
with:
37+
release: '9-2020-q2' # The arm-none-eabi-gcc release to use.
38+
directory: '~/.toolchain'
39+
- name: Install prerequisites
40+
run: |
41+
sudo apt install libblocksruntime-dev
42+
# - name : Run tests
43+
# run: |
44+
# make test
1645
build:
1746
timeout-minutes: 75
1847
strategy:
1948
max-parallel: 4
2049
matrix:
2150
targets: [targets-group-1, targets-group-2, targets-group-3, targets-group-rest]
2251
runs-on: ubuntu-latest
52+
needs: unittests
2353
steps:
2454

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

96-
- name : Run tests
97-
run: |
98-
make test
99126

100127
- name: Compile Code
101128
run: |

0 commit comments

Comments
 (0)