-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.44 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
56
57
58
59
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check
run: cargo check --release
- name: Test
run: |
git submodule update --init
cargo test --release
- name: Profile
run: |
cargo install flamegraph
sudo sysctl -w kernel.perf_event_paranoid=-1
sudo sysctl -w kernel.kptr_restrict=0
sudo chmod 666 /proc/kallsyms
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -c "record -F 997 --call-graph dwarf,16384 -g -o ./perf.data" --no-default-features --test test -- cube_over_plane
mkdir www/dist
mv flamegraph.svg www/dist/
- name: Web
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack build -- --no-default-features
cd www
npm install
npm run build
cp ../target/*.png dist
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
external_repository: fahien/rayca-web
personal_token: ${{ secrets.RAYCA_WEB }}
publish_dir: www/dist