Skip to content

Commit

Permalink
buildci: save compute time by singling pre-build steps
Browse files Browse the repository at this point in the history
Signed-off-by: Gunwant Jain <[email protected]>
  • Loading branch information
wantguns committed Jan 20, 2022
1 parent a6709a1 commit 78e3319
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/buildci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ name: Build CI
on: [push, pull_request]

jobs:
pre-build-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2

- name: Format
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy -- -Dwarnings


build:
needs: pre-build-checks
strategy:
matrix:
arch: [amd64, arm64]
Expand All @@ -17,12 +31,6 @@ jobs:
source ./.github/buildci.sh
setup_cross_compiling ${{ matrix.arch }}
- name: Format
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy -- -Dwarnings

- name: Build
run: |
[ $GITHUB_REF_TYPE = "branch" ] && \
Expand Down

0 comments on commit 78e3319

Please sign in to comment.