Skip to content

Commit a52a1bd

Browse files
committed
Modernize CI workflows for loaner builds
1 parent 5ca3144 commit a52a1bd

File tree

2 files changed

+76
-57
lines changed

2 files changed

+76
-57
lines changed

.github/workflows/main.yaml

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
1+
name: CI
2+
13
on:
24
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
310

411
jobs:
512
build:
613
runs-on: ubuntu-22.04
714

815
steps:
9-
- name: arm-none-eabi-gcc
10-
uses: carlosperate/arm-none-eabi-gcc-action@v1
11-
with:
12-
release: '10.3-2021.10'
13-
14-
- name: Install Python dependencies
15-
run: python -m pip install --upgrade pip crcmod
16-
17-
- name: Checkout
18-
uses: actions/checkout@v3
19-
20-
- name: Submodules
21-
run: git submodule update --init --recursive --depth 1
22-
23-
- name: Make
24-
run: make
25-
26-
- name: size
27-
run: arm-none-eabi-size firmware
28-
29-
- name: 'Upload Artifact'
30-
uses: actions/upload-artifact@v3
31-
with:
32-
name: firmware
33-
path: firmware*.bin
34-
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
21+
- name: Set up ARM toolchain
22+
uses: carlosperate/arm-none-eabi-gcc-action@v1
23+
with:
24+
release: '10.3-2021.10'
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
31+
- name: Install Python dependencies
32+
run: python -m pip install --upgrade pip crcmod
33+
34+
- name: Build firmware
35+
run: |
36+
make clean
37+
make TARGET=loaner-firmware
38+
39+
- name: Firmware size
40+
run: arm-none-eabi-size loaner-firmware
41+
42+
- name: Upload artifacts
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: loaner-firmware
46+
path: loaner-firmware*.bin

.github/workflows/release.yaml

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Release
2+
13
on:
24
push:
35
tags:
@@ -8,34 +10,39 @@ jobs:
810
runs-on: ubuntu-22.04
911

1012
steps:
11-
- name: arm-none-eabi-gcc
12-
uses: carlosperate/arm-none-eabi-gcc-action@v1
13-
with:
14-
release: '10.3-2021.10'
15-
16-
- name: Install Python dependencies
17-
run: python3 -m pip install --upgrade pip crcmod
18-
19-
- name: Checkout
20-
uses: actions/checkout@v3
21-
22-
- name: Submodules
23-
run: git submodule update --init --recursive --depth 1
24-
25-
- name: Make
26-
run: make
27-
28-
- name: size
29-
run: arm-none-eabi-size firmware
30-
31-
- name: 'Upload Artifact'
32-
uses: actions/upload-artifact@v3
33-
with:
34-
name: firmware
35-
path: firmware*.bin
36-
37-
- name: 'Create Release'
38-
uses: ncipollo/release-action@v1
39-
with:
40-
artifacts: "firmware*.bin"
41-
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
18+
- name: Set up ARM toolchain
19+
uses: carlosperate/arm-none-eabi-gcc-action@v1
20+
with:
21+
release: '10.3-2021.10'
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.11'
27+
28+
- name: Install Python dependencies
29+
run: python -m pip install --upgrade pip crcmod
30+
31+
- name: Build firmware
32+
run: |
33+
make clean
34+
make TARGET=loaner-firmware
35+
36+
- name: Firmware size
37+
run: arm-none-eabi-size loaner-firmware
38+
39+
- name: Upload artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: loaner-firmware
43+
path: loaner-firmware*.bin
44+
45+
- name: Create release
46+
uses: ncipollo/release-action@v1
47+
with:
48+
artifacts: "loaner-firmware*.bin"

0 commit comments

Comments
 (0)