ci: remove setup.sh
This commit is contained in:
parent
7b7c01ac8a
commit
e203229f00
23
.github/workflows/scripts/setup.sh
vendored
23
.github/workflows/scripts/setup.sh
vendored
@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
id
|
|
||||||
|
|
||||||
df -h
|
|
||||||
|
|
||||||
sudo systemd-run --wait rm -rf \
|
|
||||||
/usr/share/az* \
|
|
||||||
/usr/share/dotnet \
|
|
||||||
/usr/share/gradle* \
|
|
||||||
/usr/share/miniconda \
|
|
||||||
/usr/share/swift \
|
|
||||||
/var/lib/gems \
|
|
||||||
/var/lib/mysql \
|
|
||||||
/var/lib/snapd \
|
|
||||||
/opt/hostedtoolcache/CodeQL \
|
|
||||||
/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
|
|
||||||
|
|
||||||
sudo fstrim /
|
|
||||||
|
|
||||||
df -h
|
|
32
.github/workflows/ubuntu.yml
vendored
32
.github/workflows/ubuntu.yml
vendored
@ -65,9 +65,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
|
|
||||||
- name: Setup
|
|
||||||
run: .github/workflows/scripts/setup.sh
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build
|
run: go build
|
||||||
|
|
||||||
@ -141,38 +138,9 @@ jobs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Backup docker files
|
|
||||||
run: |
|
|
||||||
echo "backup moby/buildkit image"
|
|
||||||
sudo docker image save -o ${GITHUB_WORKSPACE}/images.tar moby/buildkit
|
|
||||||
echo "prune docker"
|
|
||||||
sudo docker system prune -a -f
|
|
||||||
echo "back up /var/lib/docker folder structure and other files"
|
|
||||||
sudo rsync -aPq /var/lib/docker/ ${GITHUB_WORKSPACE}/docker
|
|
||||||
|
|
||||||
- name: Maximize build space
|
|
||||||
uses: easimon/maximize-build-space@master
|
|
||||||
with:
|
|
||||||
overprovision-lvm: 'true'
|
|
||||||
remove-dotnet: 'true'
|
|
||||||
# instead of using default value to mount to build path,
|
|
||||||
# /var/lib/docker/ is really the place we need more spaces.
|
|
||||||
build-mount-path: '/var/lib/docker/'
|
|
||||||
|
|
||||||
- name: Restore docker files
|
|
||||||
run: |
|
|
||||||
sudo rsync -aPq ${GITHUB_WORKSPACE}/docker/ /var/lib/docker
|
|
||||||
sudo rm -rf ${GITHUB_WORKSPACE}/docker
|
|
||||||
sudo ls ${GITHUB_WORKSPACE} -l
|
|
||||||
sudo docker image load -i ${GITHUB_WORKSPACE}/images.tar
|
|
||||||
sudo rm ${GITHUB_WORKSPACE}/images.tar
|
|
||||||
|
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
|
|
||||||
- name: Setup
|
|
||||||
run: .github/workflows/scripts/setup.sh
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build
|
run: go build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user