Rust edition 2024 / 1.85 and bump gloo to 0.12 #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Run Tests & Publishing | |
| on: [push, pull_request] | |
| jobs: | |
| lint: | |
| name: Lint Codebase | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Run clippy | |
| run: cargo clippy --all-features | |
| - name: Run clippy (WebAssembly) | |
| run: cargo clippy --all-features --target=wasm32-unknown-unknown | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Run tests | |
| run: cargo test --all-features | |
| publish: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - test | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Run cargo publish --dry-run | |
| if: github.ref == 'refs/heads/master' | |
| run: cargo publish --dry-run | |
| env: | |
| RUSTFLAGS: "--cfg releasing" | |
| - name: Run cargo publish | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} | |
| env: | |
| RUSTFLAGS: "--cfg releasing" |