ci: split build and test jobs, disable tests
The test suite is too heavy for the current CI infra (CPU/RAM exhaustion), so it must not run alongside lint/build feedback. - add a dedicated test job (needs: build) running runtime deps install, subuid/subgid setup and 'cargo test' - share the compiled target/ dir and cargo caches between both jobs via actions/cache keyed on the commit sha, so the test job only compiles the test binaries - disable the test job with 'if: false' until infra can handle it; re-enable by removing that line - snap: bump upload-artifact v3 -> v4 (v3 is decommissioned) and checkout to v6 - update images to ubuntu:26.04
This commit is contained in:
@@ -13,7 +13,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ubuntu:24.04
|
image: ubuntu:26.04
|
||||||
options: --privileged --cap-add SYS_ADMIN --security-opt apparmor:unconfined
|
options: --privileged --cap-add SYS_ADMIN --security-opt apparmor:unconfined
|
||||||
steps:
|
steps:
|
||||||
- name: Set up container image
|
- name: Set up container image
|
||||||
@@ -30,6 +30,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y pkg-config libssl-dev libgpg-error-dev libgpgme-dev
|
sudo apt-get install -y pkg-config libssl-dev libgpg-error-dev libgpgme-dev
|
||||||
|
- name: Restore cargo/target cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: ci-build-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
ci-build-
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build
|
run: cargo build
|
||||||
env:
|
env:
|
||||||
@@ -38,6 +48,37 @@ jobs:
|
|||||||
run: cargo clippy --all-targets --all-features
|
run: cargo clippy --all-targets --all-features
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings
|
RUSTFLAGS: -Dwarnings
|
||||||
|
|
||||||
|
test:
|
||||||
|
# Disabled: test suite is too heavy for current CI infra (CPU/RAM exhaustion).
|
||||||
|
# Re-enable by removing the `if: false` line below.
|
||||||
|
if: false
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:26.04
|
||||||
|
options: --privileged --cap-add SYS_ADMIN --security-opt apparmor:unconfined
|
||||||
|
steps:
|
||||||
|
- name: Set up container image
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y nodejs sudo curl wget ca-certificates build-essential
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Restore cargo/target cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: ci-build-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
ci-build-
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y pkg-config libssl-dev libgpg-error-dev libgpgme-dev
|
||||||
- name: Install runtime system dependencies
|
- name: Install runtime system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -56,10 +97,10 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
snap-file: ${{ steps.build-snap.outputs.snap }}
|
snap-file: ${{ steps.build-snap.outputs.snap }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: snapcore/action-build@v1
|
- uses: snapcore/action-build@v1
|
||||||
id: build-snap
|
id: build-snap
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: snap
|
name: snap
|
||||||
path: ${{ steps.build-snap.outputs.snap }}
|
path: ${{ steps.build-snap.outputs.snap }}
|
||||||
|
|||||||
Reference in New Issue
Block a user