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

update actions #205

Closed
wants to merge 2 commits into from
Closed
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
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ jobs:
tool: cargo-nextest
- run: cargo make check --features "${{ matrix.features }}"

miri:
name: test-with-miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/setup-build
with:
toolchain: nightly
components: miri
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo make miri

build-docs:
name: build-docs
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,25 @@ defaults:
run:
shell: bash

env:
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"

jobs:
changed-files:
name: changed-files
runs-on: ubuntu-latest
outputs:
src: ${{ steps.changed-files-yaml.outputs.src_any_changed }}
steps:
- uses: actions/checkout@v4
- id: changed-files-yaml
uses: tj-actions/changed-files@v45
with:
files_yaml: |
src:
- '**/*.rs'
- '**/Cargo.toml'

coverage:
needs: changed-files
if: github.event_name != 'pull_request' || ${{ needs.changed-files.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -28,9 +41,11 @@ jobs:
- uses: ./.github/actions/setup-build
with:
components: llvm-tools
- run: cargo install grcov
- run: |
cargo make cov lcov
- uses: SierraSoftworks/setup-grcov@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: latest
- run: cargo make cov lcov
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: |
cargo make -e CARGO_TOOLCHAIN=${{ inputs.channel }} miri
- run: cargo make -e CARGO_TOOLCHAIN=${{ inputs.channel }} miri
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ jobs:
- if: ${{ needs.test.result == 'failure' || needs.test.result == 'cancelled' }}
run: exit 1

miri:
needs: changed-files
if: ${{ needs.changed-files.outputs.src == 'true' }}
name: test-with-miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/setup-build
with:
toolchain: nightly
components: miri
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo make miri

build-docs:
needs: changed-files
if: ${{ needs.changed-files.outputs.src == 'true' }}
Expand Down Expand Up @@ -96,6 +114,7 @@ jobs:
auto-merge:
needs:
- all-tests-passed
- miri
- build-docs
permissions:
pull-requests: write
Expand Down
Loading