Open History to see the last commit
1name: Compiler Platforms
2β
3# The main PR workflow only runs on Linux x64 (glibc). The compilers load a
4# native Yuku binary per platform and handle platform-specific paths, so run
5# their unit tests and a Vite and Rsbuild production build on the other
6# platforms we ship to.
7β
8on:
9 pull_request:
10 paths:
11 - 'packages/router-utils/**'
12 - 'packages/router-generator/**'
13 - 'packages/router-plugin/**'
14 - 'packages/start-plugin-core/**'
15 - 'pnpm-lock.yaml'
16 - '.github/workflows/compiler-platforms.yml'
17 schedule:
18 # Weekly, to catch new Yuku releases and runner image updates
19 - cron: '0 6 * * 1'
20 workflow_dispatch:
21β
22concurrency:
23 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
24 cancel-in-progress: true
25β
26permissions:
27 contents: read
28β
29env:
30 NX_DAEMON: 'false'
31 NX_NO_CLOUD: 'true'
32β
33defaults:
34 run:
35 shell: bash
36β
37jobs:
38 compiler:
39 name: ${{ matrix.name }}
40 runs-on: ${{ matrix.os }}
41 # actions/setup-node only ships glibc builds, so musl uses Alpine's Node image
42 container: ${{ matrix.container }}
43 strategy:
44 fail-fast: false
45 matrix:
46 include:
47 - name: Windows x64
48 os: windows-latest
49 - name: macOS arm64
50 os: macos-latest
51 - name: Linux arm64
52 os: ubuntu-24.04-arm
53 - name: Linux x64 musl
54 os: ubuntu-latest
55 container: node:24.8.0-alpine3.22@sha256:3e843c608bb5232f39ecb2b25e41214b958b0795914707374c8acc28487dea17
56 steps:
57 - name: Install system packages
58 if: ${{ matrix.container }}
59 shell: sh
60 run: apk add --no-cache bash git
61 - name: Keep LF line endings
62 # Snapshots are stored with LF. Windows runners check out CRLF by default,
63 # and with `* text=auto` disabling autocrlf alone still uses the native eol
64 run: |
65 git config --global core.autocrlf false
66 git config --global core.eol lf
67 - name: Checkout
68 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
69 with:
70 persist-credentials: false
71 - name: Setup pnpm
72 if: ${{ !matrix.container }}
73 uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6.0.7
74 - name: Setup Node
75 if: ${{ !matrix.container }}
76 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
77 with:
78 node-version-file: .node-version
79 package-manager-cache: false
80 - name: Setup pnpm (container)
81 if: ${{ matrix.container }}
82 run: npm install --global "$(node -p "require('./package.json').packageManager")"
83 - name: Install dependencies
84 run: >-
85 pnpm install --frozen-lockfile
86 --filter .
87 --filter "@tanstack/router-utils..."
88 --filter "@tanstack/router-generator..."
89 --filter "@tanstack/router-plugin..."
90 --filter "@tanstack/start-plugin-core..."
91 --filter "tanstack-react-start-e2e-basic..."
92 - name: Unit tests
93 run: >-
94 pnpm nx run-many --targets=test:unit
95 --projects=@tanstack/router-utils,@tanstack/router-generator,@tanstack/router-plugin,@tanstack/start-plugin-core
96 --skip-nx-cache --outputStyle=static
97 - name: Production builds
98 run: >-
99 pnpm nx run-many --targets=build:vite:ssr,build:rsbuild:ssr
100 --projects=tanstack-react-start-e2e-basic
101 --skip-nx-cache --outputStyle=static