1010 merge_group :
1111 types : [checks_requested]
1212
13+ env :
14+ RUSTFLAGS : -Dwarnings
15+
1316jobs :
1417 coverage :
1518 name : Coverage
3841 uses : codecov/codecov-action@v3
3942
4043 tests :
41- name : Build and Test
44+ name : Test
4245 runs-on : ${{ matrix.os }}
4346 timeout-minutes : 60
4447 strategy :
@@ -58,24 +61,16 @@ jobs:
5861 run : cargo test --no-run --profile ci
5962 # this order is faster according to rust-analyzer
6063 - name : Build
61- run : cargo build --all-targets --quiet --profile ci
64+ run : cargo build --all-targets --quiet --profile ci --features annex-b,intl,experimental
6265 - name : Install latest nextest
6366 uses : taiki-e/install-action@nextest
6467 - name : Test with nextest
6568 run : cargo nextest run --profile ci --cargo-profile ci --features annex-b,intl,experimental
6669 - name : Test docs
6770 run : cargo test --doc --profile ci --features annex-b,intl,experimental
68- - name : Build boa_ast crate
69- run : cargo build -p boa_ast
70- - name : Build boa_cli crate
71- run : cargo build -p boa_cli
72- - name : Build boa_parser crate
73- run : cargo build -p boa_parser
74- - name : Build boa_runtime crate
75- run : cargo build -p boa_runtime
7671
7772 msrv :
78- name : Minimum supported Rust version
73+ name : MSRV
7974 runs-on : ubuntu-latest
8075 timeout-minutes : 60
8176 steps :
@@ -92,41 +87,113 @@ jobs:
9287 - name : Check compilation
9388 run : cargo check --all-features --all-targets
9489
95- misc :
96- name : Misc
90+ fmt :
91+ name : Formatting
92+ runs-on : ubuntu-latest
93+ timeout-minutes : 60
94+ steps :
95+ - uses : actions/checkout@v4
96+ - uses : actions-rs/toolchain@v1.0.7
97+ with :
98+ toolchain : stable
99+ override : true
100+ profile : minimal
101+ components : rustfmt
102+ - name : Format (rustfmt)
103+ run : cargo fmt --all --check
104+
105+ clippy :
106+ name : Lint
107+ runs-on : ubuntu-latest
108+ timeout-minutes : 60
109+ steps :
110+ - uses : actions/checkout@v4
111+ - uses : actions-rs/toolchain@v1.0.7
112+ with :
113+ toolchain : stable
114+ override : true
115+ profile : minimal
116+ components : clippy
117+ - name : Install cargo-workspaces
118+ uses : actions-rs/install@v0.1
119+ with :
120+ crate : cargo-workspaces
121+ - uses : Swatinem/rust-cache@v2
122+ with :
123+ key : clippy
124+ - name : Clippy (All features)
125+ run : cargo workspaces exec cargo clippy --all-features --all-targets -- -D warnings
126+ - name : Clippy (No features)
127+ run : cargo workspaces exec cargo clippy --no-default-features --all-targets -- -D warnings
128+
129+ docs :
130+ name : Documentation
97131 runs-on : ubuntu-latest
98132 timeout-minutes : 60
99133 env :
100- RUSTFLAGS : -D warnings
134+ RUSTDOCFLAGS : -D warnings
135+ steps :
136+ - uses : actions/checkout@v4
137+ - uses : actions-rs/toolchain@v1.0.7
138+ with :
139+ toolchain : stable
140+ override : true
141+ profile : minimal
142+ - uses : Swatinem/rust-cache@v2
143+ with :
144+ key : docs
145+ - name : Generate documentation
146+ run : cargo doc -v --document-private-items --all-features
147+
148+ build-fuzz :
149+ name : Fuzzing
150+ runs-on : ubuntu-latest
151+ timeout-minutes : 60
101152 steps :
102153 - uses : actions/checkout@v4
103154 - uses : actions-rs/toolchain@v1.0.7
104155 with :
105156 toolchain : stable
106157 override : true
107158 profile : minimal
108- components : rustfmt, clippy
109- - uses : actions-rs/install@v0.1
159+ - name : Install cargo-fuzz
160+ uses : actions-rs/install@v0.1
110161 with :
111162 crate : cargo-fuzz
112163 version : latest
113164 - uses : Swatinem/rust-cache@v2
114165 with :
115- key : misc
116- - name : Format (rustfmt)
117- run : cargo fmt --all --check
118- - name : Lint (All features)
119- run : cargo clippy --all-features --all-targets
120- - name : Lint (No features)
121- run : cargo clippy -p boa_engine --no-default-features --all-targets
122- - name : Generate documentation
123- run : cargo doc -v --document-private-items --all-features
124- - name : Build
125- run : cargo build --all-targets --quiet --profile ci
126- - name : Build fuzzers
166+ key : build-fuzz
167+ - name : Build fuzz
127168 run : cargo fuzz build -s none
128- - run : cd boa_examples
129- - name : Build examples
130- run : cargo build --quiet --profile ci
131- - name : Run example classes
132- run : cargo run --bin classes --profile ci
169+
170+ build-run-examples :
171+ name : Build & run examples
172+ runs-on : ubuntu-latest
173+ timeout-minutes : 60
174+ steps :
175+ - uses : actions/checkout@v4
176+ - uses : actions-rs/toolchain@v1.0.7
177+ with :
178+ toolchain : stable
179+ override : true
180+ profile : minimal
181+ - name : Install cargo-workspaces
182+ uses : actions-rs/install@v0.1
183+ with :
184+ crate : cargo-workspaces
185+ - uses : Swatinem/rust-cache@v2
186+ with :
187+ key : build-run-examples
188+
189+ - name : Build (All features)
190+ run : cargo workspaces exec cargo build --all-features --all-targets --profile ci
191+ - name : Build (No features)
192+ run : cargo workspaces exec cargo build --no-default-features --all-targets --profile ci
193+
194+ - name : Run examples
195+ run : |
196+ cd boa_examples
197+ cargo run -p boa_examples --bin 2>&1 \
198+ | grep -E '^ ' \
199+ | xargs -n1 sh -c 'cargo run -p boa_examples --profile ci --bin $0 || exit 255'
0 commit comments