| A runner that builds nothing, and an AppImage anyway 41bcb21 nandi 15h 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 12h 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 15h ago | 4 | # |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 12h 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 15h 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: |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 23 | # The Nim core: its own suite, and the library the Dart job needs. |
| 24 | # |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 25 | # NOT in a `container:`, and that is the whole reason this job is shaped the |
| 26 | # way it is. `actions/upload-artifact` is a node20 action and JS actions run |
| 27 | # inside the job container, so `nimlang/nim` — which carries no node — failed |
| 28 | # the upload step with `node: command not found` after everything real had |
| 29 | # already passed. The runner image has node; Nim is what it lacks, and Nim is |
| 30 | # the easier of the two to bring. |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 31 | # |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 32 | # Pinned by sha256 rather than taken from apt, which is this repo's habit |
| 33 | # elsewhere — see `tools/toolchain.sh`, which fetches Flutter, a JDK and the |
| 34 | # Clojure CLI the same way. An apt Nim is whatever the distro froze, and |
| 35 | # `nim/nim.cfg` needs >= 2.0. |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 12h ago | 36 | nim-test: |
| 37 | runs-on: ubuntu-latest |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 38 | env: |
| 39 | NIM_VERSION: "2.2.10" |
| 40 | NIM_SHA256: "0a3a38752e97e9d44aa479b3a7b37336dfe0176daf22ee5b5218ad0991ecd211" |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 12h ago | 41 | steps: |
| 42 | - uses: actions/checkout@v4 |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 43 | |
| 44 | # libssl-dev because `nim/nim.cfg` sets `-d:ssl`: std/net wants OpenSSL |
| 45 | # for the TLS on :6697 and `frq.atproto` uses httpclient over the same. |
| 46 | - name: OpenSSL headers |
| 47 | run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl-dev |
| 48 | |
| 49 | - name: Nim ${{ env.NIM_VERSION }} |
| 50 | run: | |
| 51 | set -euo pipefail |
| 52 | url="https://nim-lang.org/download/nim-${NIM_VERSION}-linux_x64.tar.xz" |
| 53 | curl -fsSL -o /tmp/nim.tar.xz "$url" |
| 54 | echo "${NIM_SHA256} /tmp/nim.tar.xz" | sha256sum -c - |
| 55 | mkdir -p /opt/nim && tar -xJf /tmp/nim.tar.xz -C /opt/nim --strip-components=1 |
| 56 | echo "/opt/nim/bin" >> "$GITHUB_PATH" |
| 57 | |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 58 | - name: The Nim suite |
| 59 | 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 8h ago | 60 | |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 61 | - name: Build libfrqcore.so |
| 62 | run: | |
| 63 | cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \ |
| 64 | --out:../build/nim/libfrqcore.so src/frq_core.nim |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 65 | # Diagnostic, not a gate. Worth reading: Nim resolves OpenSSL through |
| 66 | # dlopen rather than a link-time NEEDED, so libssl will not appear |
| 67 | # here and the Dart job still has to have one installed. |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 68 | objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 69 | |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 70 | - uses: actions/upload-artifact@v4 |
| 71 | with: |
| 72 | name: libfrqcore |
| 73 | path: build/nim/libfrqcore.so |
| 74 | if-no-files-found: error |
| One frontend where there were three, and a core that is not Clojure 438b247 nandi 12h ago | 75 | |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 76 | # The Dart side of the same boundary, on the plain VM — no Flutter, no |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 77 | # emulator, which is what makes it a second to run. |
| 78 | # |
| 79 | # No container here either, for the same node reason: `download-artifact` is |
| 80 | # a JS action too. Dart comes from its own setup action instead. |
| 81 | # |
| 82 | # `libssl3` because the .so dlopens OpenSSL at startup and the Dart SDK |
| 83 | # carries its own BoringSSL rather than bringing one. |
| The binding is Dart, and it works f7aea3b nandi 12h ago | 84 | dart-test: |
| 85 | runs-on: ubuntu-latest |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 86 | needs: [nim-test] |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 87 | env: |
| 88 | DART_VERSION: "3.13.4" |
| 89 | DART_SHA256: "6487a10df5eab890d746d14a55f4c70bec3c1c0633f51804eb504cbc0fc395bb" |
| The binding is Dart, and it works f7aea3b nandi 12h ago | 90 | steps: |
| 91 | - uses: actions/checkout@v4 |
| No containers for the JS-action jobs 3760746 nandi 8h ago | 92 | |
| 93 | # The SDK by sha256 rather than `dart-lang/setup-dart`, for the reason |
| 94 | # the Nim job pins its tarball: a third-party action is one more thing |
| 95 | # that has to resolve on this host, and this one does not have to. |
| 96 | - name: Dart ${{ env.DART_VERSION }} |
| 97 | run: | |
| 98 | set -euo pipefail |
| 99 | url="https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip" |
| 100 | curl -fsSL -o /tmp/dart.zip "$url" |
| 101 | echo "${DART_SHA256} /tmp/dart.zip" | sha256sum -c - |
| 102 | sudo unzip -q /tmp/dart.zip -d /opt |
| 103 | echo "/opt/dart-sdk/bin" >> "$GITHUB_PATH" |
| 104 | |
| 105 | - run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl3 |
| CI that can actually build the Nim core 1403956 nandi 8h ago | 106 | - uses: actions/download-artifact@v4 |
| 107 | with: |
| 108 | name: libfrqcore |
| 109 | path: build/nim |
| The binding is Dart, and it works f7aea3b nandi 12h ago | 110 | - run: cd dart/frq_core && dart pub get && dart test -r expanded |
| 111 | |