does this work? #7
Workflow file for this run
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
on: [push, pull_request] | |
name: build | |
jobs: | |
pingora: | |
strategy: | |
matrix: | |
toolchain: [nightly, stable] | |
profile: [minimal, default] | |
runs-on: ubuntu-latest | |
container: ubuntu | |
# Only run on "pull_request" event for external PRs. This is to avoid | |
# duplicate builds for PRs created from internal branches. | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Install build dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y cmake libclang-dev | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
profile: ${{ matrix.profile }} | |
components: rustfmt, clippy | |
override: true | |
default: true | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose --lib --bins --tests --no-fail-fast | |
# Need to run doc tests separately. | |
# (https://github.com/rust-lang/cargo/issues/6669) | |
- name: Run cargo doc test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose --doc | |
- name: Run cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --all -- --deny=warnings | |
- name: Run cargo audit | |
uses: actions-rust-lang/audit@v1 | |
- name: Run cargo doc | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --no-deps --all-features --document-private-items |