| 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 18h 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 18h 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 18h 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 | |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 33 | # The Nim core's tests. No Flutter, no Dart, no Android SDK — which is the |
| 34 | # reason the logic is moving there: a rule about the IRC wire format gets |
| 35 | # checked in seconds rather than behind a toolchain. |
| 36 | nim-test: |
| 37 | runs-on: ubuntu-latest |
| 38 | container: nimlang/nim:2.2.0-alpine |
| 39 | steps: |
| 40 | - uses: actions/checkout@v4 |
| 41 | - run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done |
| 42 | |
| The binding is Dart, and it works f7aea3b nandi 18h ago | 43 | # The Dart side of the Nim boundary, on the plain VM. Builds the library |
| 44 | # first — the test dlopens a real .so, and there is no point reporting that |
| 45 | # it could not find one. |
| 46 | dart-test: |
| 47 | runs-on: ubuntu-latest |
| 48 | container: dart:3.13 |
| 49 | steps: |
| 50 | - uses: actions/checkout@v4 |
| 51 | - run: apt-get update -qq && apt-get install -y -qq nim |
| 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 | - run: cd dart/frq_core && dart pub get && dart test -r expanded |
| 56 | |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 57 | web: |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 58 | runs-on: ubuntu-latest |
| The binding is Dart, and it works f7aea3b nandi 18h ago | 59 | needs: [check-common, nim-test, dart-test] |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 60 | # What it spends its time on is the ClojureDart compile and, on a cold |
| 61 | # toolchain, fetching the pinned Flutter/JDK/Clojure tarballs. |
| A Mesa nobody needed, and the AppImage that carried it 9db383c nandi 21h ago | 62 | timeout-minutes: 30 |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 63 | steps: |
| 64 | # The container copies `.` — the whole working tree, uncommitted edits |
| 65 | # included. On a runner that is whatever the checkout left, so it wants |
| 66 | # to be the commit and not a shallow surprise. |
| 67 | - uses: actions/checkout@v4 |
| 68 | |
| 69 | - uses: actions/setup-python@v5 |
| 70 | with: |
| 71 | python-version: "3.12" |
| 72 | |
| 73 | - run: pip install --disable-pip-version-check modal |
| 74 | |
| 75 | # Two secrets, set under Settings -> Secrets and variables. A Modal |
| 76 | # token is the whole of this job's configuration: no nix, no builder, |
| 77 | # no cache of its own. |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 78 | - name: Build the web bundle, on Modal |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 79 | env: |
| 80 | MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} |
| 81 | MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} |
| 82 | # Unpiped on purpose. The image build streams to this client and |
| 83 | # nowhere else, and `modal app logs` cannot reach an ephemeral run — |
| 84 | # so this terminal is the only place the build is visible. tee, not |
| 85 | # 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 18h ago | 86 | 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 | 87 | |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 88 | # The Sandbox leaves the bundle on the devshell volume rather than |
| 89 | # anywhere a runner can see, so fetch it back out. |
| A Mesa nobody needed, and the AppImage that carried it 9db383c nandi 21h ago | 90 | - name: Fetch the bundle out of the volume |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 91 | env: |
| 92 | MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} |
| 93 | MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} |
| A Mesa nobody needed, and the AppImage that carried it 9db383c nandi 21h ago | 94 | run: | |
| 95 | modal volume get --force devshell \ |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 96 | frq-flutter-web/flutter/build/web web |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 97 | |
| 98 | - uses: actions/upload-artifact@v4 |
| 99 | with: |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 18h ago | 100 | name: frq-web-${{ github.sha }} |
| 101 | path: web |
| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 22h ago | 102 | if-no-files-found: error |
| 103 | |
| 104 | # Kept whether or not the build succeeded: a failed run's log is the |
| 105 | # one most worth reading, and it is gone with the runner otherwise. |
| 106 | - uses: actions/upload-artifact@v4 |
| 107 | if: always() |
| 108 | with: |
| 109 | name: build-log |
| 110 | path: /tmp/frq-build.log |
| 111 | if-no-files-found: ignore |