Skip to content

Commit

Permalink
cargo bump
Browse files Browse the repository at this point in the history
  • Loading branch information
nbari committed Nov 22, 2024
1 parent dffde5e commit 279cb05
Show file tree
Hide file tree
Showing 6 changed files with 410 additions and 168 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
test:
uses: ./.github/workflows/test.yml

coverage:
uses: ./.github/workflows/coverage.yml
secrets: inherit

build:
name: Build
runs-on: ${{ matrix.os }}
Expand All @@ -25,11 +29,6 @@ jobs:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl

- build: macos
os: macos-latest
target: x86_64-apple-darwin

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -48,6 +47,12 @@ jobs:
- run: sudo apt -y install musl-dev musl-tools
if: matrix.build == 'linux'

- name: Build
run: |-
- name: Build Linux
run: |
cargo build --release --locked --target ${{ matrix.target }} --features "openssl/vendored"
if: matrix.build == 'linux'

- name: Build
run: |
cargo build --release --locked --target ${{ matrix.target }}
if: matrix.build != 'linux'
36 changes: 22 additions & 14 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,42 @@
name: Coverage

on:
push:
branches-ignore:
- develop
- main
workflow_call:
secrets:
CODECOV_TOKEN:
required: true

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Run tests
run: cargo test --verbose -- --nocapture
env:
RUST_BACKTRACE: full
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
CARGO_INCREMENTAL: 0
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
RUSTFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off
RUSTDOCFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off

- name: rust-grcov
uses: actions-rs/grcov@v0.1
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
- name: Run grcov
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing
--ignore '../**' --ignore '/*' -o coverage.lcov

- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.lcov
flags: rust

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
os: ubuntu-latest
target: x86_64-unknown-linux-musl

- build: macos
os: macos-latest
target: x86_64-apple-darwin

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -45,9 +41,15 @@ jobs:
- run: sudo apt -y install musl-dev musl-tools
if: matrix.build == 'linux'

- name: Build
- name: Build Linux
run: |
cargo build --release --locked --target ${{ matrix.target }} --features "openssl/vendored"
if: matrix.build == 'linux'

- name: Build
run: |
cargo build --release --locked --target ${{ matrix.target }}
if: matrix.build != 'linux'

- name: Build archive
shell: bash
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
matrix:
os:
- ubuntu-latest
- macOS-latest
rust:
- stable
runs-on: ${{ matrix.os }}
Expand All @@ -58,28 +57,3 @@ jobs:

- name: test
run: cargo test

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly

- name: Run tests
run: cargo test --verbose
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

- name: rust-grcov
uses: actions-rs/grcov@v0.1

- name: Upload to codecov.io
uses: codecov/codecov-action@v3

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
Loading

0 comments on commit 279cb05

Please sign in to comment.