three-d 0.7.2

A renderer which compiles to both desktop (OpenGL) and web (WebAssembly + WebGL).
Documentation
name: build

on: [ push, pull_request ]

env:
  CARGO_TERM_COLOR: always

jobs:
  desktop:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-latest, windows-latest, macos-latest ]
        rust: [ stable, nightly ]

    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

      - name: Rustfmt
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: -- --check

      - name: Test
        uses: actions-rs/cargo@v1
        with:
          command: test

  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