Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix github pipeline #8

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions-rs/grcov.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ 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
with:
command: build
args: --release --bin cli
run: cargo build --release

- name: Upload target binary
uses: actions/upload-artifact@v4
Expand Down
84 changes: 30 additions & 54 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [ push ]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
build:
Expand All @@ -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/install@v0.1
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/grcov@v0.1
#
# - 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/release-plz-action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Loading