nandi/frqpublic Fork 0
1403956859648c3d39892e3994df8fee863ec653
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 · 136 lines · 5.7 KBYAML Blame HistoryRaw
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago1# The build, on rickub. GitLab CI next door reads source and no more —
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago2# check-common on every push — and deliberately builds nothing. This is the
3# other half: the web bundle, actually compiled.
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago4#
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago5# It is not compiled *here*. The job hands the work to Modal exactly as a
6# person at a terminal would, and the Sandbox does it against the `devshell`
7# volume. What a runner contributes is a checkout, a python, and somewhere to
8# put the result afterwards. The reason it goes to Modal is the volume the
9# toolchain is cached on, not the size of the build.
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago10#
11# Lives in .rickub/workflows/ rather than .github/workflows/ because rickub
12# reads one or the other and never both: with this directory present, a
13# .github/workflows/ added later would be silently ignored. There is none
14# today, so nothing is being shadowed — see
15# https://rickub.com/docs/actions and https://rickub.com/docs/migrating-from-github
16name: build
17
18on:
19 push:
20 workflow_dispatch:
21
22jobs:
23 # The same read-only check GitLab runs, for the same reason: common/ compiles
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago24 # for two targets, so a host-specific call in shared code breaks one of them
25 # at a namespace nobody touched. Seconds, no toolchain. Worth having on both
26 # hosts rather than depending on which one a given push reaches.
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago27 check-common:
28 runs-on: ubuntu-latest
29 steps:
30 - uses: actions/checkout@v4
31 - run: python3 tools/check-common.py common
32
CI that can actually build the Nim core 1403956 nandi 15h ago33 # The Nim core: its own suite, and the library the Dart job needs.
34 #
35 # Debian and not the Alpine image this used to name. `libfrqcore.so` links
36 # OpenSSL and is glibc, so it has to be built somewhere its runtime can load
37 # it — a musl build would not load in `dart:*` at all.
38 #
39 # `libssl-dev` because `nim/nim.cfg` sets `-d:ssl`: std/net links -lssl and
40 # -lcrypto for the TLS on :6697, and `frq.atproto` uses httpclient over the
41 # same. Without it the compile fails on a missing -lcrypto, which reads as
42 # nothing to do with TLS.
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago43 nim-test:
44 runs-on: ubuntu-latest
CI that can actually build the Nim core 1403956 nandi 15h ago45 container: nimlang/nim:2.2.10
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago46 steps:
47 - uses: actions/checkout@v4
CI that can actually build the Nim core 1403956 nandi 15h ago48 - run: apt-get update -qq && apt-get install -y -qq libssl-dev
49 - name: The Nim suite
50 run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
51 - name: Build libfrqcore.so
52 run: |
53 cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \
54 --out:../build/nim/libfrqcore.so src/frq_core.nim
55 # Diagnostic, not a gate: prints what the .so will want at
56 # runtime, so a missing libssl in the Dart job is obvious
57 # from this log rather than from a StateError in that one.
58 objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true
59 - uses: actions/upload-artifact@v4
60 with:
61 name: libfrqcore
62 path: build/nim/libfrqcore.so
63 if-no-files-found: error
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago64
CI that can actually build the Nim core 1403956 nandi 15h ago65 # The Dart side of the same boundary, on the plain VM — no Flutter, no
66 # emulator, which is what makes it a second to run. It dlopens the library
67 # the job above built, so `libssl3` has to be there: the Dart SDK carries
68 # its own BoringSSL and does not bring OpenSSL with it.
The binding is Dart, and it works f7aea3b nandi 18h ago69 dart-test:
70 runs-on: ubuntu-latest
71 container: dart:3.13
CI that can actually build the Nim core 1403956 nandi 15h ago72 needs: [nim-test]
The binding is Dart, and it works f7aea3b nandi 18h ago73 steps:
74 - uses: actions/checkout@v4
CI that can actually build the Nim core 1403956 nandi 15h ago75 - run: apt-get update -qq && apt-get install -y -qq libssl3
76 - uses: actions/download-artifact@v4
77 with:
78 name: libfrqcore
79 path: build/nim
The binding is Dart, and it works f7aea3b nandi 18h ago80 - run: cd dart/frq_core && dart pub get && dart test -r expanded
81
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago82 web:
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago83 runs-on: ubuntu-latest
The binding is Dart, and it works f7aea3b nandi 18h ago84 needs: [check-common, nim-test, dart-test]
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago85 # What it spends its time on is the ClojureDart compile and, on a cold
86 # toolchain, fetching the pinned Flutter/JDK/Clojure tarballs.
A Mesa nobody needed, and the AppImage that carried it 9db383c nandi 21h ago87 timeout-minutes: 30
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago88 steps:
89 # The container copies `.` — the whole working tree, uncommitted edits
90 # included. On a runner that is whatever the checkout left, so it wants
91 # to be the commit and not a shallow surprise.
92 - uses: actions/checkout@v4
93
94 - uses: actions/setup-python@v5
95 with:
96 python-version: "3.12"
97
98 - run: pip install --disable-pip-version-check modal
99
100 # Two secrets, set under Settings -> Secrets and variables. A Modal
101 # token is the whole of this job's configuration: no nix, no builder,
102 # no cache of its own.
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago103 - name: Build the web bundle, on Modal
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago104 env:
105 MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
106 MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
107 # Unpiped on purpose. The image build streams to this client and
108 # nowhere else, and `modal app logs` cannot reach an ephemeral run —
109 # so this terminal is the only place the build is visible. tee, not
110 # tail: a run killed mid-pipe through tail takes its output with it.
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago111 run: modal run .modal/flutter-web/container.py 2>&1 | tee /tmp/frq-build.log
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago112
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago113 # The Sandbox leaves the bundle on the devshell volume rather than
114 # anywhere a runner can see, so fetch it back out.
A Mesa nobody needed, and the AppImage that carried it 9db383c nandi 21h ago115 - name: Fetch the bundle out of the volume
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago116 env:
117 MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
118 MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
A Mesa nobody needed, and the AppImage that carried it 9db383c nandi 21h ago119 run: |
120 modal volume get --force devshell \
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago121 frq-flutter-web/flutter/build/web web
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago122
123 - uses: actions/upload-artifact@v4
124 with:
One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago125 name: frq-web-${{ github.sha }}
126 path: web
A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago127 if-no-files-found: error
128
129 # Kept whether or not the build succeeded: a failed run's log is the
130 # one most worth reading, and it is gone with the runner otherwise.
131 - uses: actions/upload-artifact@v4
132 if: always()
133 with:
134 name: build-log
135 path: /tmp/frq-build.log
136 if-no-files-found: ignore