Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ FROM myoung34/github-runner:$VERSION AS core
# Packages that do not depend on JAVA_VERSION/NODE_VERSION, so this layer is
# shared by every tag too.
# - iproute2: ip tools
# - cmake, build-essential, swig: native builds
# - cmake, ninja-build, build-essential, swig: native builds
# - xxd: not in the base image
# - pigz: parallel gzip, used by tar/docker when available
RUN apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
iproute2 cmake build-essential swig xxd pigz \
iproute2 cmake ninja-build build-essential swig xxd pigz \
&& rm -rf /var/lib/apt/lists/*

# rustup-init only, no toolchain: ~/.cargo and ~/.rustup are links into the
Expand Down
2 changes: 1 addition & 1 deletion tests/image-smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fi
if [ "$variant" = ndk ]; then
check "NDK is installed" 'ls -d "$ANDROID_SDK_ROOT"/ndk/*/ >/dev/null'
fi
for tool in xxd flock jq git rustup-init; do
for tool in xxd flock jq git ninja rustup-init; do
check "$tool is on PATH" "command -v $tool"
done

Expand Down
9 changes: 5 additions & 4 deletions tests/slots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ home="$work/home"
mkdir -p "$data" "$home"

# Run setup_slot in a child that holds its slot for $2 seconds and reports
# "<id> <labels> <workdir>" to file $1.
# "<id> <labels> <workdir>" to file $1. $3 is the container's home: runners have
# one each, so claims that run at the same time must not share one.
claim() {
local out="$1" hold="$2"
local out="$1" hold="$2" container_home="${3:-$home}"
(
# shellcheck source=SCRIPTDIR/../preflight-entrypoint.sh
source "$root/preflight-entrypoint.sh"
CACHE_LINKS=("bun:$home/.bun" "pnpm/store:$home/.local/share/pnpm" "toolcache:$home/toolcache")
CACHE_LINKS=("bun:$container_home/.bun" "pnpm/store:$container_home/.local/share/pnpm" "toolcache:$container_home/toolcache")
RUNNER_DATA_DIR="$data" setup_slot >/dev/null
echo "$RUNNER_SLOT $LABELS $RUNNER_WORKDIR" >"$out"
sleep "$hold"
Expand All @@ -38,7 +39,7 @@ claim() {

# --- concurrent claims -------------------------------------------------------
export LABELS=docker,light RUNNER_2_LABELS=docker,light,large
for i in 1 2 3 4; do claim "$work/claim.$i" 3 & done
for i in 1 2 3 4; do claim "$work/claim.$i" 3 "$work/home.$i" & done
sleep 1
ids=$(cut -d' ' -f1 "$work"/claim.* | sort -n | tr '\n' ' ')
[ "$ids" = "1 2 3 4 " ] || fail "concurrent claims got '$ids', want '1 2 3 4 '"
Expand Down
Loading