three-d 0.19.0

2D/3D renderer - makes it simple to draw stuff across platforms (including web)
Documentation
name: build

on:
  push:
    branches:
      - master
      - 0.*
  pull_request:
    branches:
      - master

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1
  RUSTFLAGS: "-Dwarnings"

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

    steps:
      - uses: actions/checkout@v4

      - name: Install Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          components: rustfmt, clippy
          override: true

      - if: startsWith(matrix.os, 'ubuntu')
        run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev

      - name: Check
        uses: actions-rs/cargo@v1
        with:
          command: check
          args: --examples --all-features

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

      - name: Clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy

  web:
    name: Check Web
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - 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