| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 1 | # 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 ago | 2 | # 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 ago | 4 | # |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago | 5 | # 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 ago | 10 | # |
| 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 |
| 16 | name: build |
| 17 | |
| 18 | on: |
| 19 | push: |
| 20 | workflow_dispatch: |
| 21 | |
| 22 | jobs: |
| 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 ago | 24 | # 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 ago | 27 | 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 ago | 33 | # 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 ago | 43 | nim-test: |
| 44 | runs-on: ubuntu-latest |
| CI that can actually build the Nim core 1403956 nandi 15h ago | 45 | container: nimlang/nim:2.2.10 |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago | 46 | steps: |
| 47 | - uses: actions/checkout@v4 |
| CI that can actually build the Nim core 1403956 nandi 15h ago | 48 | - 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 ago | 64 | |
| CI that can actually build the Nim core 1403956 nandi 15h ago | 65 | # 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 ago | 69 | dart-test: |
| 70 | runs-on: ubuntu-latest |
| 71 | container: dart:3.13 |
| CI that can actually build the Nim core 1403956 nandi 15h ago | 72 | needs: [nim-test] |
| The binding is Dart, and it works f7aea3b nandi 18h ago | 73 | steps: |
| 74 | - uses: actions/checkout@v4 |
| CI that can actually build the Nim core 1403956 nandi 15h ago | 75 | - 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 ago | 80 | - 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 ago | 82 | web: |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 83 | runs-on: ubuntu-latest |
| The binding is Dart, and it works f7aea3b nandi 18h ago | 84 | needs: [check-common, nim-test, dart-test] |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago | 85 | # 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 ago | 87 | timeout-minutes: 30 |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 88 | 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 ago | 103 | - name: Build the web bundle, on Modal |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 104 | 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 ago | 111 | 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 ago | 112 | |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago | 113 | # 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 ago | 115 | - name: Fetch the bundle out of the volume |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 116 | 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 ago | 119 | run: | |
| 120 | modal volume get --force devshell \ |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago | 121 | frq-flutter-web/flutter/build/web web |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 122 | |
| 123 | - uses: actions/upload-artifact@v4 |
| 124 | with: |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 19h ago | 125 | name: frq-web-${{ github.sha }} |
| 126 | path: web |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 127 | 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 |