Repository navigation
69 lines (63 loc) · 2.76 KB
/
Copy pathci.yml
File metadata and controls
69 lines (63 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
pull_request:
push:
branches: [main]
# The reusable release workflow dispatches this file on the release PR branch.
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# A pull request runs the affected lint, typecheck and build, then attw; a Mergify queue draft and main run the
# whole workspace and its tests. One job, so the runner and Nix setup are paid once.
checks:
uses: systemfsoftware/systemfsoftware/.github/workflows/reusable-ci.yml@7544b79a7f94d783ba7832bc7b07a413d5c60793
with:
commitlint: false
changeset: true
fast: export TURBO_SCM_BASE="$BASE" TURBO_SCM_HEAD="$HEAD" && pnpm exec turbo run typecheck lint --affected && PATH="$(nix build --no-link --print-out-paths .#attw)/bin:$PATH" pnpm --filter @systemfsoftware/api-extractor attw
full: pnpm lint && pnpm typecheck && pnpm build && PATH="$(nix build --no-link --print-out-paths .#attw)/bin:$PATH" pnpm --filter @systemfsoftware/api-extractor attw && pnpm test
host-bytes:
name: Output bytes on ${{ matrix.arch }}
if: github.event_name == 'push'
strategy:
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
with:
extra_nix_config: |
extra-substituters = https://nix.systemfsoftware.com
extra-trusted-public-keys = nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=
- name: Install from the lockfile
run: nix develop --command pnpm install --frozen-lockfile
- name: Serialise a fixed-seed sample of models and verdicts
run: nix develop --command node --conditions=@systemfsoftware/source apps/api-extractor-e2e/host-digest.ts > host-output.bin
- run: sha256sum host-output.bin && uname -m
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: host-output-${{ matrix.arch }}
path: host-output.bin
host-compare:
name: Same bytes on every host
if: github.event_name == 'push'
needs: host-bytes
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: host-output-*
- run: sha256sum host-output-*/host-output.bin
- name: Compare x86_64 and arm64 outputs byte for byte
run: cmp host-output-x86_64/host-output.bin host-output-arm64/host-output.bin