aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authorzaidoon <[email protected]>2024-03-11 18:43:05 -0400
committerYuchen Wu <[email protected]>2024-03-22 10:50:10 -0700
commitb9d4428809385b8d72d74176e92941a0eddb4829 (patch)
tree85bafdef4ed5bb36f7e322205d15216fff3c594a /.github/workflows/build.yml
parent8a84b24ad061c40583b7d90b38296805fbb1b1ef (diff)
downloadpingora-b9d4428809385b8d72d74176e92941a0eddb4829.tar.gz
pingora-b9d4428809385b8d72d74176e92941a0eddb4829.zip
modernize ci
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml30
1 files changed, 7 insertions, 23 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6e91352..21a0e69 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,16 +8,15 @@ jobs:
matrix:
# TODO: add nightly
toolchain: [stable]
- profile: [minimal, default]
runs-on: ubuntu-latest
# 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
+ uses: actions/checkout@v4
with:
- submodules: 'recursive'
+ submodules: "recursive"
- name: Install build dependencies
run: |
@@ -30,39 +29,24 @@ jobs:
sudo apt install -y openresty --no-install-recommends
- name: Install toolchain
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@master
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
+ run: cargo fmt --all -- --check
- name: Run cargo test
- uses: actions-rs/cargo@v1
- with:
- command: test
- args: --verbose --lib --bins --tests --no-fail-fast
+ run: cargo test --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
+ run: cargo test --verbose --doc
- name: Run cargo clippy
- uses: actions-rs/cargo@v1
- with:
- command: clippy
- args: --all-targets --all -- --deny=warnings
+ run: cargo clippy --all-targets --all -- --deny=warnings
- name: Run cargo audit
uses: actions-rust-lang/audit@v1