From 79ccf490d37155b1f9f4b825f8a5ff2d5a1c51d5 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 30 Nov 2023 16:30:03 +0100 Subject: [PATCH 1/2] Improve CI --- .github/workflows/rust.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d54fa2f..6363d51 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,21 +2,36 @@ name: Rust on: push: - branches: [ "master" ] + branches: [ "**" ] pull_request: - branches: [ "master" ] + branches: [ "**" ] env: CARGO_TERM_COLOR: always + RUSTFLAGS: '-D warnings' + RUST_BACKTRACE: 1 jobs: build: - runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Build + run: cargo build --verbose + test: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v3 + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Run tests + run: cargo test --release From 167044ac011e170538e739b5b5f7241fc0f648fd Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 30 Nov 2023 16:34:07 +0100 Subject: [PATCH 2/2] Add wasm32 build to CI --- .github/workflows/rust.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6363d51..6bec65d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,6 +24,19 @@ jobs: - name: Build run: cargo build --verbose + build-wasm32: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown + - name: Build + run: cargo build --verbose --no-default-features --target wasm32-unknown-unknown + test: runs-on: ubuntu-latest steps: