Skip to content

Commit

Permalink
fix: fix github pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanti committed Jun 11, 2024
1 parent 38c677e commit 0a4b2f3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 62 deletions.
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/[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 }}

0 comments on commit 0a4b2f3

Please sign in to comment.