test: Draw spheres and triangles #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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 |