-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (138 loc) · 5.48 KB
/
Copy pathbuild.yml
File metadata and controls
163 lines (138 loc) · 5.48 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: guppy build
on:
push:
branches: [ "main", "develop", "ke-next" ]
tags:
- "*"
workflow_dispatch: {}
permissions:
contents: write
packages: read
jobs:
build:
strategy:
matrix:
include:
# Ender-3 V3 KE only: MIPS, 480x272 small screen.
- arch: mipsel-buildroot-linux-musl-
theme: material
small: true
rotate: false
calibrate: true
asset: guppyscreen-smallscreen
runs-on: ubuntu-22.04
container:
# NebulaOS Final Closure mission (2026-08-15): migrated from the
# standalone ghcr.io/coreflake1/guppydev:latest (mutable tag) to the
# same digest-pinned, NebulaOS-owned image NebulaOS-firmware's own
# build.sh uses (see manifests/dependencies.conf's BUILD_IMAGE_REPO/
# BUILD_IMAGE_DIGEST there, and docs/NEBULAOS_BUILD_ENVIRONMENT.md for
# what it contains). Bundles the identical Bootlin mips32el--musl
# toolchain guppydev provided - confirmed both toolchain prefixes this
# workflow's own matrix.arch expects (mipsel-buildroot-linux-musl-)
# resolve to real binaries in the new image before this migration was
# made, not assumed.
image: ghcr.io/coreflake1/nebulaos-build@sha256:a6ba57c69fa1ea630b037a1d1f55cf0c044a7f5a403bde9b155ea54bca1cceba
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: --user 1001
env:
CROSS_COMPILE: ${{ matrix.arch }}
CC: ${{ matrix.arch }}
CXX: ${{ matrix.arch }}
GUPPY_THEME: ${{ matrix.theme }}
# Final Closure mission: an arbitrary container UID (1001 above) has
# no /etc/passwd entry in this image, so HOME defaults to "/" -
# unwritable, breaks anything wanting a cache/config file (pip, git).
# Same real bug NebulaOS-firmware's own build.sh hit and fixed for
# this exact image - see its own comment on -e HOME=/tmp.
HOME: /tmp
# This image deliberately does NOT put the Bootlin toolchain on the
# global PATH (NebulaOS-firmware's own build-env/Dockerfile: its
# bundled autoreconf/automake shadow the system ones a v4l-utils-
# style autotools build needs - a real bug found and fixed there).
# guppydev put it on PATH directly, which is what this workflow's
# plain `make`/`${CROSS_COMPILE}gcc` calls assume - added explicitly
# here instead, literal (not $PATH-relative - GitHub Actions env:
# blocks don't shell-expand) to the image's own confirmed default.
PATH: /toolchains/mips32el--musl--stable-2024.02-1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
name: set guppyscreen nightly version
run: |
echo "GUPPYSCREEN_VERSION=nightly-${{ github.sha }}" >> $GITHUB_ENV
# ke-next gets its own moving prerelease tag so its nightly never
# overwrites main's - every other ref (main, develop, and tag pushes)
# keeps the original shared "nightly" tag unchanged.
- name: set nightly channel
run: |
if [ "${{ github.ref_name }}" = "ke-next" ]; then
echo "NIGHTLY_TAG=nightly-ke-next" >> $GITHUB_ENV
else
echo "NIGHTLY_TAG=nightly" >> $GITHUB_ENV
fi
- if: startsWith(github.ref, 'refs/tags/')
name: set guppyscreen release version
run: |
echo "GUPPYSCREEN_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- if: matrix.small
name: export screen size
run: |
echo "GUPPY_SMALL_SCREEN=${{ matrix.small }}" >> $GITHUB_ENV
- if: matrix.rotate
name: export screen rotate
run: |
echo "GUPPY_ROTATE=${{ matrix.rotate }}" >> $GITHUB_ENV
- if: matrix.calibrate
name: export touch calibrate
run: |
echo "EVDEV_CALIBRATE=${{ matrix.calibrate }}" >> $GITHUB_ENV
# lv_drivers carries its KE patches in the coreflake1/lv_drivers fork
# (see .gitmodules); no build-time patch needed.
- name: patch fmt in spdlog
run: |
git apply ../patches/0002-spdlog_fmt_initializer_list.patch
working-directory: ./spdlog
- name: patch dpi text scale in lvgl
run: |
git apply ../patches/0003-lvgl-dpi-text-scale.patch
working-directory: ./lvgl
- name: make wpaclient
run: make wpaclient
- name: make libhv
run: make libhv.a
- name: make libspdlog
run: make libspdlog.a
- name: make guppyscreen
run: make -j
- name: make kd_graphic_mode
run: make kd_graphic_mode
- name: make guppybeep
run: ${CROSS_COMPILE}gcc -O2 -static -o build/bin/guppybeep k1/k1_mods/buzzer/guppybeep.c
- name: package release
run: |
chmod +x ./scripts/release.sh
./scripts/release.sh ${{ matrix.asset }}
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.asset }}
path: ./${{ matrix.asset }}.tar.gz
- name: nightly release
uses: softprops/action-gh-release@v3
with:
prerelease: true
name: ${{ env.NIGHTLY_TAG }}
tag_name: ${{ env.NIGHTLY_TAG }}
files: ${{ matrix.asset }}.tar.gz
fail_on_unmatched_files: true
- name: stable release
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.asset }}.tar.gz
generate_release_notes: true
fail_on_unmatched_files: true