-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.29 KB
/
ci.yml
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
name: GithubCi
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
EMSDK_VER: 3.1.43
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Emscripten SDK
shell: bash
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install $EMSDK_VER
./emsdk activate $EMSDK_VER
- name: Build Emscripten targets
shell: bash
run: |
rustup target add wasm32-unknown-emscripten
source "emsdk/emsdk_env.sh"
cargo build --release --target=wasm32-unknown-emscripten
- name: Build native target
run: |
cargo install cargo-vcpkg
cargo vcpkg -v build
cargo build --release
- name: Run native tests
run: cargo test --release
- name: Check for clippy warnings
run: |
rustup component add clippy
cargo clippy --version
cargo clippy --all-targets --all-features -- -D warnings
- name: Check formatting
run: cargo fmt -- --check