Skip to content

Fix web build issues #3

Fix web build issues

Fix web build issues #3

Workflow file for this run

name: CI
on: [push, pull_request]
env:
CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
WGPU_DX12_COMPILER: dxc
RUST_LOG: info
RUST_BACKTRACE: full
RUSTFLAGS: --cfg=web_sys_unstable_apis
RUSTDOCFLAGS: -Dwarnings
jobs:
native_build:
name: Native build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo check
web_build:
name: Web build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
components: rust-src
- run: cargo +nightly check -Zbuild-std --target wasm32-unknown-unknown
cargo-deny:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
web_test:
name: Web test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install wasm-pack
uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- name: execute tests
run: wasm-pack test --headless --chrome
native_test:
name: Native test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install cargo-nextest and cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest,cargo-llvm-cov
- name: Install llvmpipe, lavapipe, vulkan sdk
shell: bash
run: |
set -e
sudo apt-get update -y -qq
# vulkan sdk
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt-get update
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev vulkan-sdk mesa-vulkan-drivers
- name: Run tests
shell: bash
run: |
set -e
cargo llvm-cov --no-cfg-coverage --no-report nextest --no-fail-fast
- name: Run release tests
shell: bash
run: |
set -e
cargo nextest run --no-fail-fast --release --all-features