From 1ed13aa6c83f9c802f870276b8d432e9ed0a863e Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Tue, 21 Jul 2026 13:31:59 +0300 Subject: [PATCH] chore(ci): extend GitHub Actions workflows --- .github/workflows/main.yml | 72 +++++++++++++++++++++++++++++--------- src/lib.rs | 2 +- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7f1ca5..9382d52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,48 +1,86 @@ name: CI -on: [pull_request] + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: jobs: test-ubuntu: name: Test-ubuntu runs-on: ubuntu-latest + strategy: matrix: - rust: [stable, beta, nightly] + toolchain: + - stable + - beta + - nightly + steps: - - uses: actions/checkout@master - - name: Install Rust ( - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - uses: actions/checkout@v7 + + - name: Install Rust Toolchain (${{ matrix.toolchain }}) + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }} + components: rustfmt, clippy + - run: cargo test --features=checks --release + - run: cargo run --release --features=checks --example hello test-macos: name: Test-macos runs-on: macos-latest + strategy: matrix: - rust: [stable, beta, nightly] + toolchain: + - stable + - beta + - nightly + steps: - - uses: actions/checkout@master - - name: Install Rust ( - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - uses: actions/checkout@v7 + + - name: Install Rust Toolchain (${{ matrix.toolchain }}) + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }} + components: rustfmt, clippy + - run: cargo test --features=checks --release + - run: cargo run --release --features=checks --example hello rustfmt: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Install Rust - run: rustup update stable && rustup default stable && rustup component add rustfmt + - uses: actions/checkout@v7 + + - name: Install Rust Toolchain (stable) + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - run: cargo fmt -- --check wasm: name: WebAssembly runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Install Rust - run: rustup update stable && rustup default stable && rustup target add wasm32-unknown-unknown - - run: cargo build --target wasm32-unknown-unknown - - run: cargo build --target wasm32-unknown-unknown --release + - uses: actions/checkout@v7 + + - name: Install Rust Toolchain (stable) + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32v1-none + components: rustfmt, clippy + + - run: cargo build --target wasm32v1-none + + - run: cargo build --target wasm32v1-none --release diff --git a/src/lib.rs b/src/lib.rs index 55ebf35..f852d53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,7 @@ //! currently. //! //! The primary purpose of this crate is that it serves as the default memory -//! allocator for the `wasm32-unknown-unknown` target in the standard library. +//! allocator for the `wasm32v1-none` target in the standard library. //! Support for other platforms is largely untested and unused, but is used when //! testing this crate.