-
Notifications
You must be signed in to change notification settings - Fork 11
56 lines (46 loc) · 1.4 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on: [push, pull_request]
jobs:
build-ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set environment variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Dependency packages (apt)
run: |
sudo apt update
sudo apt -y install git gcc-arm-none-eabi python3-pip srecord zip
- name: Dependency packages (pip)
run: python3 -m pip install --user crcmod
- name: Build dist
run: |
export P=greaseweazle-firmware
export V=${{ steps.vars.outputs.sha_short }}
make -j4 dist
mkdir -p _cidist
rm out/$P-*.zip
mv out/$P-* $P-$V
rm $P-$V/RELEASE_NOTES
git rev-parse HEAD >$P-$V/COMMIT
zip -r $P-$V.zip $P-$V
mv $P-$V.zip _cidist/
- name: Build debug dist
run: |
export P=greaseweazle-firmware
export V=${{ steps.vars.outputs.sha_short }}-debug
make -j4 dist level=debug
rm out/$P-*.zip
mv out/$P-* $P-$V
rm $P-$V/RELEASE_NOTES
git rev-parse HEAD >$P-$V/COMMIT
echo debug >>$P-$V/COMMIT
zip -r $P-$V.zip $P-$V
mv $P-$V.zip _cidist/
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: greaseweazle-firmware.ci.${{ steps.vars.outputs.sha_short }}
path: _cidist