-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (88 loc) · 3.73 KB
/
Copy pathnightly.yml
File metadata and controls
92 lines (88 loc) · 3.73 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build DSi Wi-Fi Manager
on:
push:
branches: ["*"]
paths-ignore:
- 'README.md'
pull_request:
branches: ["*"]
paths-ignore:
- 'README.md'
jobs:
test:
runs-on: ubuntu-latest
name: Offline test suite
steps:
- name: Checkout repo
uses: actions/checkout@v7.0.1
- name: Build the fixture and run the suite
# The real dumps are not in the repository, so CI runs against the synthetic flash
# only. That still covers the decoder, the backup round trip, every malformed-file
# refusal, restore into every slot, and the screen widths.
run: |
python3 tools/make_fixture.py build/fixture.bin
python3 tools/crosscheck.py build/fixture.bin
build-wrapper:
runs-on: ubuntu-latest
name: Build through documented wrapper
steps:
- name: Checkout repo
uses: actions/checkout@v7.0.1
- name: Build with build.sh
run: ./build.sh build
- name: Fail on any compiler warning
run: |
if grep -qi "warning" build.log; then
echo "::error::compiler warnings in build.log"
grep -i warning build.log
exit 1
fi
echo "no warnings"
build:
runs-on: ubuntu-latest
container: skylyrac/blocksds:slim-latest
env:
BLOCKSDS: /opt/wonderful/thirdparty/blocksds/core
name: Build with BlocksDS toolchain using official Docker image
steps:
- name: Checkout repo
uses: actions/checkout@v7.0.1
- name: Build app
id: build
# The Makefile builds the output name from the kind and the commit, so that is all this
# passes. Nothing from the branch or PR title reaches a shell recipe, which is why
# there is no whitelisting step here.
run: |
# No pipefail: the container's shell is dash, which does not have it, and `make | tee`
# would then report tee's status and a broken build would look clean. Redirecting and
# replaying the log keeps make's own exit status without needing bash.
make DSIWIFI_BUILD_KIND=Nightly DSIWIFI_COMMIT=$(echo "${{ github.sha }}" | cut -c1-7) > build.log 2>&1 || { cat build.log; echo "::error::build failed"; exit 1; }
cat build.log
printf 'short_sha=%.7s\n' "$GITHUB_SHA" >> "$GITHUB_OUTPUT"
- name: Check this really is a debug build
# Nightlies are for testing, so the flash-layout screen and the forced no-op write must
# be present. Read back out of build.log rather than assumed from the build kind: the
# two are derived in the Makefile and this is what proves the derivation held.
run: |
grep -q "kind=Nightly debug=1" build.log || {
echo "::error::nightly is not a debug build"; grep "BUILD kind=" build.log; exit 1; }
echo "debug build confirmed"
- name: Fail on any compiler warning
# This app writes to firmware flash, and a truncation warning is how a silently cut
# SSID reaches a screen. The log has to be captured in the build step above for this
# to have anything to read -- `make` alone writes no build.log, only ./build.sh does.
run: |
if grep -qi "warning" build.log; then
echo "::error::compiler warnings in build.log"
grep -i warning build.log
exit 1
fi
echo "no warnings"
- name: Publish build to GH Actions
uses: actions/upload-artifact@v7.0.1
with:
# The commit stays in the filename so a downloaded nightly identifies itself.
path: dsi_wifi_manager-*.dsi
name: dsi_wifi_manager-nightly-${{ steps.build.outputs.short_sha }}
if-no-files-found: error
retention-days: 14