gluon 0.18.3

A static, type inferred programming language for application embedding
Documentation
name: ci
on:
  pull_request:
  push:
    branches:
    - master
jobs:
  test:
    name: test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust: [stable, nightly]
    env:
      CRATE_NAME: gluon
      CARGO_INCREMENTAL: 0 # Incremental compilation is slower and bloats the cache
      RUST_BACKTRACE: 1
      # RUSTC_WRAPPER: sccache
      SCCACHE_CACHE_SIZE: 500M
      RUST_VERSION: ${{ matrix.rust }}
    steps:
    - name: Checkout repository
      uses: actions/checkout@v7
    - name: Use cache
      uses: actions/cache@v6
      with:
        path: |
          ~/bin
        key: ${{ runner.os }}-${{ matrix.rust }}
    - name: Install Rust
      uses: dtolnay/rust-toolchain@master
      with:
        toolchain: ${{ matrix.rust }}
    - uses: Swatinem/rust-cache@v2
    - run: echo "$HOME/bin" >> $GITHUB_PATH
    - run: mkdir -p $HOME/bin
    - name: Setup tools
      if: steps.cache.outputs.cache-hit != 'true'
      run: |
          # ./scripts/install_sccache.sh $TARGET
          source ~/.cargo/env || true
          ./scripts/install_mdbook.sh $TARGET
    - name: Run tests
      run: |
          if [ ! -z $DISABLE_TESTS ]; then
              return
          elif [[ -z ${WASM+set} ]]; then
              mdbook build book
              ./scripts/ci.sh
              if ! git diff-index HEAD --; then
                  echo "Detected changes in the source after running tests"
                  exit 1
              fi
          else
              rustup target add wasm32-unknown-unknown
              cargo check --target wasm32-unknown-unknown -p gluon_c-api
          fi

  test-windows:
    name: test on Windows
    runs-on: windows-latest
    strategy:
      matrix:
        rust: [stable]
    env:
      CRATE_NAME: gluon
      CARGO_INCREMENTAL: 0 # Incremental compilation is slower and bloats the cache
      RUST_BACKTRACE: 1
      # RUSTC_WRAPPER: sccache
      SCCACHE_CACHE_SIZE: 500M
      RUST_VERSION: ${{ matrix.rust }}
    steps:
    - name: Checkout repository
      uses: actions/checkout@v7
    - name: Install Rust
      uses: dtolnay/rust-toolchain@master
      with:
        toolchain: ${{ matrix.rust }}
    - uses: Swatinem/rust-cache@v2
    - name: Run tests
      run: |
        cargo test --all-features --all-targets --workspace