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