This reverts commit 0249d47acc,
https://github.com/gem5/gem5/pull/271.
This solution doesn't work. GitHub runners pull the images they need at
the start of job (i.e., all the images they may need for each step).
They then create the containers later, at the step they are needed.
This solution therefore breaks in the case a cleanup happens during the
running of a job. I.e., a `docker system prune` happens after setup,
therefore deleting all the images, then the job tries to use one of the
images during a step.
This crontab solution may work if we can only do it when the runner is
in an idle state. Whether this is possible is unknown.
Change-Id: I7cb5b2d98d596e9380ae1525c7d66ad97af1b59b
16 lines
724 B
Bash
16 lines
724 B
Bash
#!/usr/bin/env bash
|
|
|
|
# fail on unset variables and command errors
|
|
set -eu -o pipefail # -x: is for debugging
|
|
|
|
# Install deno
|
|
curl -fsSL https://deno.land/x/install/install.sh | sh
|
|
echo "export PATH=\"\${HOME}/.deno/bin:\${PATH}\"" >> ~/.profile
|
|
echo "export PATH=\"\${HOME}/.deno/bin:\${PATH}\"" >> ~/.bash_profile
|
|
|
|
# Install docker compose
|
|
DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.tag_name')
|
|
mkdir -p "${HOME}/.docker/cli-plugins"
|
|
curl -sL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o "${HOME}/.docker/cli-plugins/docker-compose"
|
|
chmod +x "${HOME}/.docker/cli-plugins/docker-compose"
|