Skip to content

Commit a8140e3

Browse files
authored
chore: update ci to support cross platform (#182)
1 parent 63c06aa commit a8140e3

File tree

1 file changed

+62
-4
lines changed

1 file changed

+62
-4
lines changed

.github/workflows/ci.yml

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,20 @@ concurrency:
1414

1515
jobs:
1616
test:
17-
name: Test
18-
runs-on: ubuntu-latest
17+
name: Test (${{ matrix.os }})
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os:
23+
- ubuntu-latest
24+
- macos-latest
25+
- windows-latest
1926
steps:
27+
- name: Enable Git long paths (Windows)
28+
if: ${{ matrix.os == 'windows-latest' }}
29+
run: git config --global core.longpaths true
30+
2031
- uses: actions/checkout@v6
2132
with:
2233
submodules: recursive
@@ -34,16 +45,64 @@ jobs:
3445
run: cargo test
3546

3647
- name: Format
48+
if: ${{ matrix.os == 'ubuntu-latest' }}
3749
run: cargo fmt --all -- --check
3850

3951
- name: Conformance
52+
if: ${{ matrix.os == 'ubuntu-latest' }}
4053
run: |
4154
cargo run -p oxc_angular_conformance
4255
git diff --exit-code
4356
57+
napi-smoke:
58+
name: NAPI Smoke (${{ matrix.os }})
59+
runs-on: ${{ matrix.os }}
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
os:
64+
- ubuntu-latest
65+
- macos-latest
66+
- windows-latest
67+
steps:
68+
- name: Enable Git long paths (Windows)
69+
if: ${{ matrix.os == 'windows-latest' }}
70+
run: git config --global core.longpaths true
71+
72+
- uses: actions/checkout@v6
73+
with:
74+
submodules: recursive
75+
76+
- name: Install Rust
77+
uses: dtolnay/rust-toolchain@stable
78+
79+
- name: Cache Rust
80+
uses: Swatinem/rust-cache@v2
81+
82+
- name: Install pnpm
83+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
84+
85+
- name: Install Node.js
86+
uses: actions/setup-node@v6
87+
with:
88+
node-version: 24
89+
cache: pnpm
90+
91+
- name: Install dependencies
92+
run: pnpm install
93+
94+
- name: Build
95+
run: |
96+
pnpm build-dev
97+
pnpm --filter ./napi/angular-compiler build:ts
98+
99+
- name: Test
100+
run: pnpm test
101+
44102
napi:
45-
name: NAPI Build
103+
name: NAPI Build (Ubuntu E2E)
46104
runs-on: ubuntu-latest
105+
needs: napi-smoke
47106
steps:
48107
- uses: actions/checkout@v6
49108
with:
@@ -77,7 +136,6 @@ jobs:
77136

78137
- name: Test
79138
run: |
80-
pnpm test
81139
pnpm --filter ./napi/angular-compiler exec playwright install --with-deps
82140
pnpm test:e2e
83141
- name: Compare tests

0 commit comments

Comments
 (0)