buildci: save compute time by singling pre-build steps
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
20
.github/workflows/buildci.yml
vendored
20
.github/workflows/buildci.yml
vendored
@@ -3,7 +3,21 @@ name: Build CI
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
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:
|
build:
|
||||||
|
needs: pre-build-checks
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: [amd64, arm64]
|
arch: [amd64, arm64]
|
||||||
@@ -17,12 +31,6 @@ jobs:
|
|||||||
source ./.github/buildci.sh
|
source ./.github/buildci.sh
|
||||||
setup_cross_compiling ${{ matrix.arch }}
|
setup_cross_compiling ${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Format
|
|
||||||
run: cargo fmt -- --check
|
|
||||||
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy -- -Dwarnings
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
[ $GITHUB_REF_TYPE = "branch" ] && \
|
[ $GITHUB_REF_TYPE = "branch" ] && \
|
||||||
|
|||||||
Reference in New Issue
Block a user