aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml85+5 −80
1 files changed, 5 insertions, 80 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 09866d3..921d397 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -17,92 +17,25 @@ concurrency:
group: gilti-build-${{ github.ref }}
cancel-in-progress: true
-env:
- CARGO_TERM_COLOR: always
- RELEASE_TAG: nightly
-
jobs:
- lint:
+ check:
name: Static checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
-
- uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3
with:
version: 2026.7.5
experimental: true
- install: false
- - name: Install dependencies
- run: mise bootstrap --locked --yes --update
- - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
-
- - name: formatting
- run: cargo fmt --all --check
-
- - name: shellcheck
- run: shellcheck scripts/*.sh tests/*.sh
-
- build:
- name: Build (${{ matrix.arch }})
- runs-on: ${{ matrix.runner }}
- needs: [lint]
- strategy:
- fail-fast: false
- matrix:
- include:
- - runner: ubuntu-24.04
- arch: amd64
- - runner: ubuntu-24.04-arm
- arch: arm64
- steps:
- - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
-
- - uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3
- with:
- version: 2026.7.5
- experimental: true
- install: false
- - name: Install dependencies
- run: mise bootstrap --locked --yes --update
- - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
-
- - run: cargo clippy --workspace --locked --all-targets --all-features --release -- -D warnings
- - run: cargo test --all-features --release --locked
+ install: true
+ cache: true
+ - run: shellcheck scripts/*.sh tests/*.sh
- run: tests/chart.sh
- - name: Build container artifacts
- env:
- RUST_IMAGE: docker.io/library/rust:1.97.1-alpine3.22@sha256:df4efa4e0cdfb5245fa06e3f431387b2bcc96782ce5681b7fb6b0297d745bc29
- run: |
- docker run --rm \
- --volume "$PWD:/src" \
- --workdir /src \
- --env "HOST_UID=$(id -u)" \
- --env "HOST_GID=$(id -g)" \
- "$RUST_IMAGE" sh -euxc '
- rustc --version | grep -qx "rustc 1.97.1 (8bab26f4f 2026-07-14)"
- cargo --version | grep -q "^cargo 1.97.1 "
- apk add --no-cache \
- build-base=0.5-r3 \
- cmake \
- python3 \
- zlib-dev=1.3.2-r0 \
- zlib-static=1.3.2-r0
- scripts/build-artifacts.sh "${{ matrix.arch }}"
- chown -R "$HOST_UID:$HOST_GID" .container
- '
-
- - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
- with:
- name: binary-${{ matrix.arch }}
- path: .container/binary-${{ matrix.arch }}/
- if-no-files-found: error
-
image:
name: Image and smoke test
runs-on: ubuntu-latest
- needs: [build]
+ needs: [check]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3
@@ -110,10 +43,6 @@ jobs:
version: 2026.7.5
experimental: true
install: false
- - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
- with:
- name: binary-amd64
- path: .container/binary-amd64
- name: Build local image
run: |
mise run container -- \
@@ -141,10 +70,6 @@ jobs:
version: 2026.7.5
experimental: true
install: false
- - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
- with:
- pattern: binary-*
- path: .container
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.6.0
with: