Skip to content

Commit 8fd6a9f

Browse files
authored
Merge pull request #829 from marcauberer/beta
Improve CI workflow
2 parents 0a0ddcd + 00c5961 commit 8fd6a9f

File tree

1 file changed

+49
-33
lines changed

1 file changed

+49
-33
lines changed
Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,55 @@
1-
on: [create, push, pull_request]
1+
# Airrohr Firmware CI workflow
2+
3+
name: Airrohr Firmware CI
4+
on:
5+
push:
6+
branches: [ master, beta, feature/** ]
7+
pull_request:
8+
branches: [ master, beta ]
9+
create:
10+
branches: [ master, beta ]
211

312
jobs:
413
build:
5-
614
runs-on: ubuntu-latest
715

816
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python
11-
uses: actions/setup-python@v2
12-
with:
13-
python-version: '3.7'
14-
- name: Install dependencies
15-
run: |
16-
python3 -m pip install --upgrade pip
17-
pip3 install platformio
18-
platformio --version
19-
- name: Run builds
20-
run: |
21-
cd airrohr-firmware && pwd && ls -l && platformio run && ls -l builds/
22-
cd ../airrohr-update-loader && pwd && ls -l && platformio run && ls -l builds/
23-
- name: Tar Results
24-
run: |
25-
tar czvf airrohr-firmware-builds.tar.gz -C airrohr-firmware/builds/ .
26-
- name: Store airrohr-firmware
27-
uses: actions/upload-artifact@v2
28-
with:
29-
if-no-files-found: error
30-
name: airrohr-firmware-builds
31-
path: airrohr-firmware-builds.tar.gz
32-
retention-days: 30
33-
- name: Store update-loader
34-
uses: actions/upload-artifact@v2
35-
with:
36-
if-no-files-found: error
37-
name: airrohr-update-loader
38-
path: airrohr-update-loader/builds/latest_loader.bin
39-
retention-days: 30
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.7'
23+
- name: Load dependencies from cache
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
28+
restore-keys: |
29+
${{ runner.os }}-pip-
30+
- name: Install dependencies
31+
run: |
32+
python3 -m pip install --upgrade pip
33+
pip3 install platformio
34+
platformio --version
35+
- name: Run builds
36+
run: |
37+
cd airrohr-firmware && pwd && ls -l && platformio run && ls -l builds/
38+
cd ../airrohr-update-loader && pwd && ls -l && platformio run && ls -l builds/
39+
- name: Tar Results
40+
run: |
41+
tar czvf airrohr-firmware-builds.tar.gz -C airrohr-firmware/builds/ .
42+
- name: Store airrohr-firmware
43+
uses: actions/upload-artifact@v2
44+
with:
45+
if-no-files-found: error
46+
name: airrohr-firmware-builds
47+
path: airrohr-firmware-builds.tar.gz
48+
retention-days: 30
49+
- name: Store update-loader
50+
uses: actions/upload-artifact@v2
51+
with:
52+
if-no-files-found: error
53+
name: airrohr-update-loader
54+
path: airrohr-update-loader/builds/latest_loader.bin
55+
retention-days: 30

0 commit comments

Comments
 (0)