Enable Nix and refresh linux cache volumes
This commit is contained in:
parent
0310ef17dc
commit
c47f0e6bea
5 changed files with 19 additions and 13 deletions
|
|
@ -48,7 +48,8 @@ profile. The important knobs are:
|
||||||
- `namespace.linux_cache_*` / `namespace.macos_cache_*` – persistent cache
|
- `namespace.linux_cache_*` / `namespace.macos_cache_*` – persistent cache
|
||||||
volumes mounted into runners so Linux can keep `/nix` plus shared build
|
volumes mounted into runners so Linux can keep `/nix` plus shared build
|
||||||
caches warm and macOS can reuse Rust toolchains, Xcode package caches, and
|
caches warm and macOS can reuse Rust toolchains, Xcode package caches, and
|
||||||
lane-local derived data.
|
lane-local derived data. If Namespace keeps reusing an older undersized cache
|
||||||
|
volume, bump the cache tag name to force a fresh allocation at the new size.
|
||||||
|
|
||||||
### Running locally
|
### Running locally
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,12 @@ namespace:
|
||||||
network: ""
|
network: ""
|
||||||
linux_cache_path: "/var/cache/burrow"
|
linux_cache_path: "/var/cache/burrow"
|
||||||
linux_cache_volumes:
|
linux_cache_volumes:
|
||||||
- tag: "burrow-forgejo-linux-nix"
|
- tag: "burrow-forgejo-linux-nix-v2"
|
||||||
mount_point: "/nix"
|
mount_point: "/nix"
|
||||||
size_gb: 60
|
size_gb: 80
|
||||||
- tag: "burrow-forgejo-linux-cache"
|
- tag: "burrow-forgejo-linux-cache-v2"
|
||||||
mount_point: "/var/cache/burrow"
|
mount_point: "/var/cache/burrow"
|
||||||
size_gb: 40
|
size_gb: 80
|
||||||
macos_cache_path: "/Users/runner/.cache/burrow"
|
macos_cache_path: "/Users/runner/.cache/burrow"
|
||||||
macos_cache_volumes:
|
macos_cache_volumes:
|
||||||
- tag: "burrow-forgejo-macos-shared-v1"
|
- tag: "burrow-forgejo-macos-shared-v1"
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,12 @@ namespace:
|
||||||
network: ""
|
network: ""
|
||||||
linux_cache_path: "/var/cache/burrow"
|
linux_cache_path: "/var/cache/burrow"
|
||||||
linux_cache_volumes:
|
linux_cache_volumes:
|
||||||
- tag: "burrow-forgejo-linux-nix"
|
- tag: "burrow-forgejo-linux-nix-v2"
|
||||||
mount_point: "/nix"
|
mount_point: "/nix"
|
||||||
size_gb: 60
|
size_gb: 80
|
||||||
- tag: "burrow-forgejo-linux-cache"
|
- tag: "burrow-forgejo-linux-cache-v2"
|
||||||
mount_point: "/var/cache/burrow"
|
mount_point: "/var/cache/burrow"
|
||||||
size_gb: 40
|
size_gb: 80
|
||||||
macos_cache_path: "/Users/runner/.cache/burrow"
|
macos_cache_path: "/Users/runner/.cache/burrow"
|
||||||
macos_cache_volumes:
|
macos_cache_volumes:
|
||||||
- tag: "burrow-forgejo-macos-shared-v1"
|
- tag: "burrow-forgejo-macos-shared-v1"
|
||||||
|
|
|
||||||
|
|
@ -176,14 +176,14 @@ func (c *Config) Validate() error {
|
||||||
if len(c.Namespace.LinuxCacheVolumes) == 0 {
|
if len(c.Namespace.LinuxCacheVolumes) == 0 {
|
||||||
c.Namespace.LinuxCacheVolumes = []CacheVolumeConfig{
|
c.Namespace.LinuxCacheVolumes = []CacheVolumeConfig{
|
||||||
{
|
{
|
||||||
Tag: "burrow-forgejo-linux-nix",
|
Tag: "burrow-forgejo-linux-nix-v2",
|
||||||
MountPoint: "/nix",
|
MountPoint: "/nix",
|
||||||
SizeGb: 60,
|
SizeGb: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Tag: "burrow-forgejo-linux-cache",
|
Tag: "burrow-forgejo-linux-cache-v2",
|
||||||
MountPoint: c.Namespace.LinuxCachePath,
|
MountPoint: c.Namespace.LinuxCachePath,
|
||||||
SizeGb: 40,
|
SizeGb: 80,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -410,6 +410,8 @@ func appendVolumeArgs(args []string, volumes []CacheVolume) []string {
|
||||||
func (d *Dispatcher) bootstrapScript() string {
|
func (d *Dispatcher) bootstrapScript() string {
|
||||||
var builder strings.Builder
|
var builder strings.Builder
|
||||||
builder.WriteString(`set -euo pipefail
|
builder.WriteString(`set -euo pipefail
|
||||||
|
export HOME=/root
|
||||||
|
export USER=root
|
||||||
mkdir -p "${FORGEJO_RUNNER_WORKDIR:-/tmp/forgejo-runner}"
|
mkdir -p "${FORGEJO_RUNNER_WORKDIR:-/tmp/forgejo-runner}"
|
||||||
cd "${FORGEJO_RUNNER_WORKDIR:-/tmp/forgejo-runner}"
|
cd "${FORGEJO_RUNNER_WORKDIR:-/tmp/forgejo-runner}"
|
||||||
|
|
||||||
|
|
@ -437,6 +439,9 @@ if [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
fi
|
fi
|
||||||
|
export PATH="/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}"
|
||||||
|
export NIX_CONFIG="experimental-features = nix-command flakes
|
||||||
|
accept-flake-config = true"
|
||||||
node --version >/dev/null
|
node --version >/dev/null
|
||||||
nix --version >/dev/null
|
nix --version >/dev/null
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue