workflow: drop apt/rustup install steps for host runner #32
@@ -9,25 +9,23 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Cargo build (clawstor-cached)
|
name: Cargo build (clawstor-cached)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest # host runner — cargo/cmake pre-installed
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install system build deps
|
- name: Preflight tools + toolchain
|
||||||
|
# Host runner: cmake/gcc/pkg-config come from the OS,
|
||||||
|
# cargo/rustup come from the act_runner user's ~/.cargo/bin
|
||||||
|
# (already on PATH via systemd unit Environment=).
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
apt-get install -y --no-install-recommends \
|
for bin in rustc cargo cmake pkg-config; do
|
||||||
cmake build-essential pkg-config
|
if ! command -v $bin >/dev/null 2>&1; then
|
||||||
|
echo "::error::$bin not found on PATH"
|
||||||
- name: Ensure rustup toolchain matches rust-toolchain.toml
|
exit 1
|
||||||
run: |
|
fi
|
||||||
if ! command -v rustup >/dev/null 2>&1; then
|
$bin --version | head -1
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
done
|
||||||
| sh -s -- -y --profile minimal
|
|
||||||
. "$HOME/.cargo/env"
|
|
||||||
fi
|
|
||||||
# rustup will honour rust-toolchain.toml on next invocation
|
|
||||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
||||||
|
|
||||||
- name: Build with clawstor cache
|
- name: Build with clawstor cache
|
||||||
id: cache
|
id: cache
|
||||||
@@ -35,8 +33,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
workspace: '.'
|
workspace: '.'
|
||||||
profile: 'dev'
|
profile: 'dev'
|
||||||
# On main-branch pushes we populate the cache; on PRs we
|
# Read-only from forks so a malicious PR can't poison the cache.
|
||||||
# read-only to avoid a fork poisoning the cache.
|
|
||||||
no-upload: ${{ github.event_name == 'pull_request' }}
|
no-upload: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
- name: Announce outcome
|
- name: Announce outcome
|
||||||
|
|||||||
Reference in New Issue
Block a user