From aaf8e50c0e627b3c3aff973a034a458ee27840ca Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Thu, 21 Mar 2024 20:21:42 -0700 Subject: [PATCH] workflows: rework names and split checks --- .github/workflows/check.yml | 66 +---------------------------------- .github/workflows/server.yml | 67 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/server.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1598d52..cedd034 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,70 +1,6 @@ name: check 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-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: name: fmt runs-on: ubuntu-latest @@ -73,7 +9,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - run: ./hack/ci/install-deps.sh + - run: ./hack/ci/install-linux-deps.sh - run: ./hack/build/cargo.sh fmt --all -- --check shellcheck: name: shellcheck diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml new file mode 100644 index 0000000..e8213fe --- /dev/null +++ b/.github/workflows/server.yml @@ -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