projectm 3.1.2

Bindings for ProjectM
Documentation
name: Emscripten

on:
  push:
    branches:
      - "*"
    tags:
      - "*"

  pull_request:
    branches:
      - "*"

jobs:
  build:
    name: Build & Test Rust Crate
    runs-on: ubuntu-latest

    env:
      RUST_BACKTRACE: full

    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive

      - name: Setup EMSDK
        uses: mymindstorm/setup-emsdk@v14
        with:
          # Make sure to set a version number!
          version: 3.1.69
          # This is the name of the cache folder.
          # The cache folder will be placed in the build directory,
          #  so make sure it doesn't conflict with anything!
          actions-cache-folder: "emsdk-cache"

      - name: Verify EMSDK
        run: emcc -v

      - name: Install Packages
        run: |
          sudo apt-get update
          sudo apt-get install -y gcc-multilib libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev

      - name: Update Local Toolchain
        run: |
          rustup update
          rustup component add clippy
          rustup target add wasm32-unknown-emscripten

      - name: Toolchain Info
        run: |
          cargo --version --verbose
          rustc --version
          cargo clippy --version

      - name: Lint
        run: |
          cargo fmt -- --check
          # cargo clippy -- -D warnings

      - name: Run Tests
        run: |
          cargo check
          # cargo test --all

      - name: Build Debug
        run: cargo build --target wasm32-unknown-emscripten