Skip to content

Free up space on github runners #414

Free up space on github runners

Free up space on github runners #414

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install bats
shell: bash
run: |
sudo apt-get update
sudo apt-get install bats bash codespell python3-argcomplete
make install-requirements
- name: Print disk space before cleanup
shell: bash
run: |
df -h
- name: Free Disk Space Linux
shell: bash
run: |
sudo docker rmi "$(docker image ls -aq)" >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
# /mnt has ~ 65 GB free disk space. / is too small.
- name: Reconfigure Docker data-root
run: |
set -e
sudo mkdir /mnt/docker /etc/docker
sudo touch /etc/docker/daemon.json
jq '. + {"data-root": "/mnt/docker"}' < /etc/docker/daemon.json | tee /tmp/daemon.json
sudo mv /tmp/daemon.json /etc/docker/daemon.json
sudo systemctl restart docker.service
df -h
- name: Docker info
run: docker info
- name: run test
run: |
make validate
make bats
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: install golang
shell: bash
run: |
brew install go bats bash jq
make install-requirements
- name: Run a one-line script
shell: bash
run: |
make install-requirements
make validate
pipx install .
make bats-nocontainer
# FIXME: ci script should be able to run on MAC.
# - name: Run ci
# shell: bash
# run: make ci