-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: [ push ] | |
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-Dwarnings" | ||
|
||
jobs: | ||
build: | ||
|
@@ -17,67 +18,42 @@ jobs: | |
submodules: recursive | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: wasm32-wasi | ||
components: rustfmt, clippy | ||
|
||
- name: Release build | ||
uses: actions-rs/cargo@v1 | ||
- name: Run cargo-audit binary crate | ||
uses: rustsec/audit-check@v1.4.1 | ||
with: | ||
command: build | ||
args: --release --all-features | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install cargo-audit binary crate | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-audit | ||
version: latest | ||
use-tool-cache: true | ||
- name: Release Build | ||
run: cargo build --release --all-features | ||
|
||
- name: Annotate commit with clippy warnings | ||
uses: actions-rs/clippy-check@v1 | ||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
needs: build | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features | ||
submodules: recursive | ||
|
||
- name: Security audit | ||
uses: actions-rs/audit-check@v1 | ||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target: wasm32-wasi | ||
components: rustfmt, clippy | ||
|
||
# coverage: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# if: github.ref != 'refs/heads/main' | ||
# steps: | ||
# - name: Clone repo | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# submodules: recursive | ||
# | ||
# - uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: nightly | ||
# override: true | ||
# | ||
# - uses: actions-rs/cargo@v1 | ||
# name: Run test with code coverage report | ||
# with: | ||
# command: test | ||
# args: --workspace --all-features --no-fail-fast | ||
# env: | ||
# CARGO_INCREMENTAL: '0' | ||
# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# | ||
# - id: coverage | ||
# name: Collect code coverage | ||
# uses: actions-rs/[email protected] | ||
# | ||
# - name: Archive code coverage results | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: code-coverage-report | ||
# path: ${{ steps.coverage.outputs.report }} | ||
- name: Run Release PR | ||
uses: MarcoIeni/[email protected] | ||
with: | ||
command: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |