Skip to content

Add camera view example #1254

Add camera view example

Add camera view example #1254

Workflow file for this run

name: build
on:
push:
branches:
- master
- 0.*
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
desktop:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
steps:
- uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --examples --all-features
- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build examples
run: |
for example in `find examples -maxdepth 1 -mindepth 1 -type d -printf "%f\n"` ; do
if [ -f "examples/$example/Cargo.toml" ]; then
echo "::group::Build $example example"
pushd examples/$example
CARGO_TARGET_DIR=../../target wasm-pack build --target web --out-name web --dev
popd
echo "::endgroup::"
fi
done
headless:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt-get update && sudo apt-get install -y xvfb
- run: xvfb-run -a cargo run --example headless --features="headless"