Repository navigation
44 lines (38 loc) · 1.49 KB
/
Copy pathrust.yml
File metadata and controls
44 lines (38 loc) · 1.49 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
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
# A new push to a pull request cancels its run that is still going.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
# Incremental builds only help when the same tree is rebuilt locally.
CARGO_INCREMENTAL: 0
# Keep line numbers for backtraces, but skip the rest of the debug info.
CARGO_PROFILE_DEV_DEBUG: line-tables-only
CARGO_PROFILE_TEST_DEBUG: line-tables-only
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
# Other workspace crates enable the stdlib's default features, so only
# building it on its own checks that it compiles without them.
- name: Build stdlib without default features
run: cargo build -p ndc_stdlib --no-default-features
# The language features without the server, as the browser uses them.
- name: Build the language features without the server
run: cargo clippy -p ndc_lsp --no-default-features --all-targets
- name: Build with tracing
run: cargo build --features trace
# The manual runs its examples on this build, deployed only from master.
- name: Build for the browser
run: |
rustup target add wasm32-unknown-unknown
cargo build -p ndc_wasm --target wasm32-unknown-unknown