-
Notifications
You must be signed in to change notification settings - Fork 80
112 lines (105 loc) · 2.99 KB
/
ci.yml
File metadata and controls
112 lines (105 loc) · 2.99 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
env:
CARGO_TERM_COLOR: always
jobs:
typos:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Spell check
uses: crate-ci/typos@master
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: stable
components: rustfmt, clippy, llvm-tools-preview, rustc-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2025-10-31
components: rustfmt, clippy, llvm-tools-preview, rustc-dev
- name: Cache on ${{ github.ref_name }}
uses: Swatinem/rust-cache@v2
with:
shared-key: warm
- name: Install Dylint
uses: taiki-e/install-action@v2
with:
tool: cargo-dylint,dylint-link
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: |
cargo +stable clippy --all-targets -- -D warnings
cargo +nightly-2025-10-31 clippy --all-targets --all-features -- -D warnings
- name: Dylint tests
working-directory: nova_lint
run: cargo test
- name: Dylint
run: cargo dylint --all
build:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
[
"macos-15-intel",
"macos-latest",
"ubuntu-24.04-arm",
"ubuntu-latest",
"windows-latest",
]
steps:
- uses: actions/checkout@v4
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
with:
cache-key: warm
save-cache: ${{ github.ref_name == 'main' }}
- name: Check
run: cargo check --all-targets
- name: Build
run: cargo build --tests --bins --examples
- name: Test
run: cargo test
env:
RUST_BACKTRACE: 1
test262:
name: Test262
# TODO: Run CI on all three platforms.
runs-on: ubuntu-latest
timeout-minutes: 50
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache on ${{ github.ref_name }}
uses: Swatinem/rust-cache@v2
with:
shared-key: test262
save-if: ${{ github.ref == 'main' }}
- name: Checkout test262 submodule
run: git submodule update --init
- name: Build nova cli
run: cargo build -p nova_cli --profile dev-fast
- name: Run Test262
run: cargo run --bin test262 --profile dev-fast -- --noprogress
timeout-minutes: 15
env:
RUST_BACKTRACE: 1