Wire namespace caches and agenix secrets
This commit is contained in:
parent
5bd95b7a7c
commit
028627bfcb
8 changed files with 66 additions and 102 deletions
|
|
@ -85,12 +85,6 @@ jobs:
|
|||
"${shared_root}/apple/SourcePackages" \
|
||||
"${lane_root}/cargo-target" \
|
||||
"${lane_root}/DerivedData"
|
||||
rm -rf \
|
||||
"${lane_root}/cargo-target" \
|
||||
"${lane_root}/DerivedData"
|
||||
mkdir -p \
|
||||
"${lane_root}/cargo-target" \
|
||||
"${lane_root}/DerivedData"
|
||||
echo "CARGO_HOME=${shared_root}/cargo" >> "${GITHUB_ENV}"
|
||||
echo "CARGO_TARGET_DIR=${lane_root}/cargo-target" >> "${GITHUB_ENV}"
|
||||
echo "RUSTUP_HOME=${shared_root}/rustup" >> "${GITHUB_ENV}"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ concurrency:
|
|||
jobs:
|
||||
rust:
|
||||
name: Cargo Test
|
||||
runs-on: [self-hosted, linux, x86_64, burrow-forge]
|
||||
runs-on: namespace-profile-linux-medium
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
|
@ -32,11 +32,19 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cache_root="${HOME}/.cache/burrow"
|
||||
mkdir -p "${cache_root}/cargo" "${cache_root}/sccache" "${cache_root}/cargo-target/build-rust"
|
||||
echo "CARGO_HOME=${cache_root}/cargo" >> "${GITHUB_ENV}"
|
||||
echo "SCCACHE_DIR=${cache_root}/sccache" >> "${GITHUB_ENV}"
|
||||
echo "CARGO_TARGET_DIR=${cache_root}/cargo-target/build-rust" >> "${GITHUB_ENV}"
|
||||
cache_root="${NSC_CACHE_PATH:-${HOME}/.cache/burrow}"
|
||||
shared_root="${NSC_SHARED_CACHE_PATH:-${cache_root}/shared}"
|
||||
lane_root="${NSC_LANE_CACHE_PATH:-${cache_root}/lane/build-rust}"
|
||||
mkdir -p \
|
||||
"${shared_root}/cargo" \
|
||||
"${shared_root}/sccache" \
|
||||
"${shared_root}/xdg" \
|
||||
"${lane_root}/cargo-target"
|
||||
echo "CARGO_HOME=${shared_root}/cargo" >> "${GITHUB_ENV}"
|
||||
echo "SCCACHE_DIR=${shared_root}/sccache" >> "${GITHUB_ENV}"
|
||||
echo "XDG_CACHE_HOME=${shared_root}/xdg" >> "${GITHUB_ENV}"
|
||||
echo "CARGO_TARGET_DIR=${lane_root}/cargo-target" >> "${GITHUB_ENV}"
|
||||
df -h /nix "${shared_root}" "${lane_root}" || true
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ concurrency:
|
|||
jobs:
|
||||
site:
|
||||
name: Next.js Build
|
||||
runs-on: [self-hosted, linux, x86_64, burrow-forge]
|
||||
runs-on: namespace-profile-linux-medium
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
|
@ -28,12 +28,27 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cache_root="${HOME}/.cache/burrow"
|
||||
mkdir -p "${cache_root}/npm"
|
||||
echo "NPM_CONFIG_CACHE=${cache_root}/npm" >> "${GITHUB_ENV}"
|
||||
cache_root="${NSC_CACHE_PATH:-${HOME}/.cache/burrow}"
|
||||
shared_root="${NSC_SHARED_CACHE_PATH:-${cache_root}/shared}"
|
||||
lane_root="${NSC_LANE_CACHE_PATH:-${cache_root}/lane/build-site}"
|
||||
mkdir -p \
|
||||
"${shared_root}/npm" \
|
||||
"${shared_root}/xdg" \
|
||||
"${lane_root}/next-cache"
|
||||
echo "NPM_CONFIG_CACHE=${shared_root}/npm" >> "${GITHUB_ENV}"
|
||||
echo "XDG_CACHE_HOME=${shared_root}/xdg" >> "${GITHUB_ENV}"
|
||||
echo "NEXT_CACHE_DIR=${lane_root}/next-cache" >> "${GITHUB_ENV}"
|
||||
df -h /nix "${shared_root}" "${lane_root}" || true
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
nix develop .#ci -c bash -lc 'cd site && npm install && npm run build'
|
||||
nix develop .#ci -c bash -lc '
|
||||
mkdir -p site/.next
|
||||
rm -rf site/.next/cache
|
||||
ln -sfn "${NEXT_CACHE_DIR}" site/.next/cache
|
||||
cd site
|
||||
npm install
|
||||
npm run build
|
||||
'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue