workflows: rework names and split checks

This commit is contained in:
Alex Zenla 2024-03-21 20:21:42 -07:00
parent 88f6edb608
commit aaf8e50c0e
No known key found for this signature in database
GPG Key ID: 067B238899B51269
2 changed files with 68 additions and 65 deletions

View File

@ -1,70 +1,6 @@
name: check name: check
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: build ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: ./hack/ci/install-deps.sh
- run: ./hack/build/cargo.sh build
test:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: test ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: ./hack/ci/install-deps.sh
- run: ./hack/build/cargo.sh test
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: clippy ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: ./hack/ci/install-deps.sh
- run: ./hack/build/cargo.sh clippy
initrd:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: initrd ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.arch }}-unknown-linux-gnu,${{ matrix.arch }}-unknown-linux-musl"
- run: ./hack/ci/install-deps.sh
- run: ./hack/initrd/build.sh
fmt: fmt:
name: fmt name: fmt
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -73,7 +9,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
with: with:
components: rustfmt components: rustfmt
- run: ./hack/ci/install-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh fmt --all -- --check - run: ./hack/build/cargo.sh fmt --all -- --check
shellcheck: shellcheck:
name: shellcheck name: shellcheck

67
.github/workflows/server.yml vendored Normal file
View File

@ -0,0 +1,67 @@
name: server
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: build ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh build
test:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: test ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh test
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: clippy ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh clippy
initrd:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
env:
TARGET_ARCH: "${{ matrix.arch }}"
name: initrd ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.arch }}-unknown-linux-gnu,${{ matrix.arch }}-unknown-linux-musl"
- run: ./hack/ci/install-linux-deps.sh
- run: ./hack/initrd/build.sh