nandi/frqpublic Fork 0
5581b0fb0907d4a9498e17399d68ff8dbc383216
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

build.yml · 174 lines · 8.0 KBYAML Blame HistoryRaw
The layout suite runs in CI f912073 nandi 22h ago1# The build, on rickub. GitLab CI next door reads source and no more, and
2# deliberately builds nothing. This is the other half: three suites, each one
3# checking a different seam.
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi yesterday4#
The registry it pushes to is the one it has 627b785 nandi 9h ago5# Nothing here is handed to Modal, and nothing here is built for keeps. What
6# runs is small enough for a runner: Nim in about a second, Dart in less, and
The layout suite runs in CI f912073 nandi 22h ago7# Flutter for as long as a Flutter toolchain takes to arrive.
8#
The registry it pushes to is the one it has 627b785 nandi 9h ago9# The web bundle is next door in `web.yml`, because it is the other size of
10# thing — a Flutter SDK inside a docker build, pushed to the registry and
11# deployed to Modal, and only for what actually gets served.
12#
The layout suite runs in CI f912073 nandi 22h ago13# Every toolchain is a sha256-pinned tarball rather than an apt package or a
14# third-party setup action, which is this repo's habit — see
15# `tools/toolchain.sh`, which fetches the same two by the same hashes.
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi yesterday16#
17# Lives in .rickub/workflows/ rather than .github/workflows/ because rickub
18# reads one or the other and never both: with this directory present, a
19# .github/workflows/ added later would be silently ignored. There is none
20# today, so nothing is being shadowed — see
21# https://rickub.com/docs/actions and https://rickub.com/docs/migrating-from-github
The layout suite runs in CI f912073 nandi 22h ago22
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi yesterday23name: build
24
25on:
26 push:
27 workflow_dispatch:
28
29jobs:
CI that can actually build the Nim core 1403956 nandi yesterday30 # The Nim core: its own suite, and the library the Dart job needs.
31 #
No containers for the JS-action jobs 3760746 nandi yesterday32 # NOT in a `container:`, and that is the whole reason this job is shaped the
33 # way it is. `actions/upload-artifact` is a node20 action and JS actions run
34 # inside the job container, so `nimlang/nim` — which carries no node — failed
35 # the upload step with `node: command not found` after everything real had
36 # already passed. The runner image has node; Nim is what it lacks, and Nim is
37 # the easier of the two to bring.
CI that can actually build the Nim core 1403956 nandi yesterday38 #
No containers for the JS-action jobs 3760746 nandi yesterday39 # Pinned by sha256 rather than taken from apt, which is this repo's habit
40 # elsewhere — see `tools/toolchain.sh`, which fetches Flutter, a JDK and the
41 # Clojure CLI the same way. An apt Nim is whatever the distro froze, and
42 # `nim/nim.cfg` needs >= 2.0.
One frontend where there were three, and a core that is not Clojure 438b247 nandi yesterday43 nim-test:
44 runs-on: ubuntu-latest
No containers for the JS-action jobs 3760746 nandi yesterday45 env:
46 NIM_VERSION: "2.2.10"
47 NIM_SHA256: "0a3a38752e97e9d44aa479b3a7b37336dfe0176daf22ee5b5218ad0991ecd211"
One frontend where there were three, and a core that is not Clojure 438b247 nandi yesterday48 steps:
49 - uses: actions/checkout@v4
No containers for the JS-action jobs 3760746 nandi yesterday50
51 # libssl-dev because `nim/nim.cfg` sets `-d:ssl`: std/net wants OpenSSL
52 # for the TLS on :6697 and `frq.atproto` uses httpclient over the same.
53 - name: OpenSSL headers
54 run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl-dev
55
56 - name: Nim ${{ env.NIM_VERSION }}
57 run: |
58 set -euo pipefail
59 url="https://nim-lang.org/download/nim-${NIM_VERSION}-linux_x64.tar.xz"
60 curl -fsSL -o /tmp/nim.tar.xz "$url"
61 echo "${NIM_SHA256} /tmp/nim.tar.xz" | sha256sum -c -
62 mkdir -p /opt/nim && tar -xJf /tmp/nim.tar.xz -C /opt/nim --strip-components=1
63 echo "/opt/nim/bin" >> "$GITHUB_PATH"
64
CI that can actually build the Nim core 1403956 nandi yesterday65 - name: The Nim suite
66 run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
No containers for the JS-action jobs 3760746 nandi yesterday67
CI that can actually build the Nim core 1403956 nandi yesterday68 - name: Build libfrqcore.so
69 run: |
70 cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \
71 --out:../build/nim/libfrqcore.so src/frq_core.nim
No containers for the JS-action jobs 3760746 nandi yesterday72 # Diagnostic, not a gate. Worth reading: Nim resolves OpenSSL through
73 # dlopen rather than a link-time NEEDED, so libssl will not appear
74 # here and the Dart job still has to have one installed.
CI that can actually build the Nim core 1403956 nandi yesterday75 objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true
No containers for the JS-action jobs 3760746 nandi yesterday76
CI that can actually build the Nim core 1403956 nandi yesterday77 - uses: actions/upload-artifact@v4
78 with:
79 name: libfrqcore
80 path: build/nim/libfrqcore.so
81 if-no-files-found: error
One frontend where there were three, and a core that is not Clojure 438b247 nandi yesterday82
CI that can actually build the Nim core 1403956 nandi yesterday83 # The Dart side of the same boundary, on the plain VM — no Flutter, no
No containers for the JS-action jobs 3760746 nandi yesterday84 # emulator, which is what makes it a second to run.
85 #
86 # No container here either, for the same node reason: `download-artifact` is
87 # a JS action too. Dart comes from its own setup action instead.
88 #
89 # `libssl3` because the .so dlopens OpenSSL at startup and the Dart SDK
90 # carries its own BoringSSL rather than bringing one.
The binding is Dart, and it works f7aea3b nandi yesterday91 dart-test:
92 runs-on: ubuntu-latest
CI that can actually build the Nim core 1403956 nandi yesterday93 needs: [nim-test]
No containers for the JS-action jobs 3760746 nandi yesterday94 env:
95 DART_VERSION: "3.13.4"
96 DART_SHA256: "6487a10df5eab890d746d14a55f4c70bec3c1c0633f51804eb504cbc0fc395bb"
The binding is Dart, and it works f7aea3b nandi yesterday97 steps:
98 - uses: actions/checkout@v4
No containers for the JS-action jobs 3760746 nandi yesterday99
100 # The SDK by sha256 rather than `dart-lang/setup-dart`, for the reason
101 # the Nim job pins its tarball: a third-party action is one more thing
102 # that has to resolve on this host, and this one does not have to.
103 - name: Dart ${{ env.DART_VERSION }}
104 run: |
105 set -euo pipefail
106 url="https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip"
107 curl -fsSL -o /tmp/dart.zip "$url"
108 echo "${DART_SHA256} /tmp/dart.zip" | sha256sum -c -
109 sudo unzip -q /tmp/dart.zip -d /opt
110 echo "/opt/dart-sdk/bin" >> "$GITHUB_PATH"
111
112 - run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl3
CI that can actually build the Nim core 1403956 nandi yesterday113 - uses: actions/download-artifact@v4
114 with:
115 name: libfrqcore
116 path: build/nim
The binding is Dart, and it works f7aea3b nandi yesterday117 - run: cd dart/frq_core && dart pub get && dart test -r expanded
118
The layout suite runs in CI f912073 nandi 22h ago119 # The screens, laid out for real. Widget tests on the Dart VM: headless, no
120 # GL and no window, which is exactly what makes them the check a Wayland
121 # window cannot be — a GUI on Wayland cannot be clicked by a script, so for
122 # a long time the biggest screen in the app went out unverified.
123 #
124 # They have caught five regressions that the Nim and Dart suites cannot see,
125 # because what they check is what Flutter does with the tree rather than
126 # what the tree says: `Expanded` outside a Flex, a `Wrap` handing a child
127 # unbounded width, a scrollbar on a different controller from its view.
128 #
129 # The cost is a Flutter toolchain, which is why this job is last and why it
130 # needs neither of the others to pass first — it needs the library the Nim
131 # job builds, and nothing from Dart.
132 layout-test:
133 runs-on: ubuntu-latest
134 needs: [nim-test]
135 env:
136 # The same version and hash `tools/toolchain.sh` pins, because a suite
137 # that passes here and fails on the developer's machine is worse than no
138 # suite. Two places rather than one is the price of a workflow file that
139 # cannot source a shell script it also has to trust.
140 FLUTTER_VERSION: "3.47.0"
141 FLUTTER_SHA256: "26cd99d3d94b1367e6b50535a18aeef0282c10a535bbe3ec493534dcdab75296"
142 steps:
143 - uses: actions/checkout@v4
144
145 - name: Flutter ${{ env.FLUTTER_VERSION }}
146 run: |
147 set -euo pipefail
148 url="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz"
149 curl -fsSL -o /tmp/flutter.tar.xz "$url"
150 echo "${FLUTTER_SHA256} /tmp/flutter.tar.xz" | sha256sum -c -
151 # Into HOME rather than /opt: flutter writes its own cache and
152 # version stamp inside its directory on the first command, so a
153 # root-owned copy fails as whatever user the job runs as.
154 mkdir -p "$HOME/flutter"
155 tar -xJf /tmp/flutter.tar.xz -C "$HOME/flutter" --strip-components=1
156 echo "$HOME/flutter/bin" >> "$GITHUB_PATH"
157 # The tarball is an unpacked git checkout, and flutter refuses to
158 # report its own version out of a repository it thinks belongs to
159 # somebody else. `tools/toolchain.sh` does this too.
160 git config --global --add safe.directory "$HOME/flutter"
161
162 # The .so dlopens OpenSSL at startup; the test loads it through FFI
163 # exactly as the app does.
164 - run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl3
165
166 - uses: actions/download-artifact@v4
167 with:
168 name: libfrqcore
169 path: build/nim
170
171 # `../build/nim/libfrqcore.so` is one of the paths `frq_core` looks in,
172 # named for this case — `flutter test` runs from `flutter/`.
173 - name: The layout suite
174 run: cd flutter && flutter pub get && flutter test test/nim_layout_test.dart