Debian Codegraph @

.github/workflows/test.yaml

raw symbols SCIP
1 name: Test
2
3 on:
4 pull_request:
5 push:
6 branches:
7 - master
8
9 env:
10 CARGO_INCREMENTAL: 0
11
12 jobs:
13 test-nix:
14 strategy:
15 matrix:
16 platform: [ubuntu-latest, macos-latest]
17 runs-on: ${{ matrix.platform }}
18 steps:
19 - name: Setup Rust
20 uses: actions-rs/toolchain@v1
21 with:
22 toolchain: 1.65.0
23 override: true
24 components: rustfmt
25 - name: Add wasm32 target
26 run: rustup target add wasm32-unknown-unknown
27 - name: Checkout
28 uses: actions/checkout@v2
29 with:
30 submodules: true
31 - name: Check Rust formatting
32 run: cargo fmt -- --check
33 - name: build
34 run: cargo build --release
35 - name: unit tests
36 run: cargo test -- --nocapture
37 - name: (MacOS) install LLVM
38 uses: KyleMayes/install-llvm-action@v2
39 if: "${{ matrix.platform == 'macos-latest' }}"
40 with:
41 version: "17"
42 - name: (MacOS) set LLVM as CC
43 if: "${{ matrix.platform == 'macos-latest' }}"
44 run: echo "CC=$(pwd)/llvm/bin/clang-17" >> $GITHUB_ENV
45 - name: build (wasm32)
46 run: cargo build --target wasm32-unknown-unknown
47 - name: check (wasm32)
48 run: cargo check --target wasm32-unknown-unknown
49 test-windows:
50 runs-on: windows-latest
51 steps:
52 - name: Setup Rust
53 uses: actions-rs/toolchain@v1
54 with:
55 toolchain: 1.65.0
56 target: i686-pc-windows-msvc
57 override: true
58 components: rustfmt
59 - name: Checkout
60 uses: actions/checkout@v2
61 with:
62 submodules: true
63 - name: Check Rust formatting
64 run: cargo fmt -- --check
65 - name: build 64-bit
66 run: cargo build --release
67 - name: build 32-bit
68 run: cargo build --release --target i686-pc-windows-msvc
69 - name: build 64-bit static
70 env:
71 CRT_STATIC: "true"
72 RUSTFLAGS: "-C target-feature=+crt-static"
73 run: cargo build --release
74 - name: build 32-bit static
75 env:
76 CRT_STATIC: "true"
77 RUSTFLAGS: "-C target-feature=+crt-static"
78 run: cargo build --release --target i686-pc-windows-msvc
79 - name: unit tests
80 run: cargo test -- --nocapture