Skip to content

Commit 15dabd5

Browse files
LucasStec410-f3r
authored andcommitted
[SOL] Free up space in github runner
1 parent 837a8c8 commit 15dabd5

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

.github/workflows/ci.yml

+13-20
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,13 @@ jobs:
130130
- name: add extra environment variables
131131
run: src/ci/scripts/setup-environment.sh
132132
env:
133-
# Since it's not possible to merge `${{ matrix.env }}` with the other
134-
# variables in `job.<name>.env`, the variables defined in the matrix
135-
# are passed to the `setup-environment.sh` script encoded in JSON,
136-
# which then uses log commands to actually set them.
137-
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
138-
139-
- name: ensure the channel matches the target branch
140-
run: src/ci/scripts/verify-channel.sh
141-
133+
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
134+
if: success() && !env.SKIP_JOB
135+
- name: decide whether to skip this job
136+
run: src/ci/scripts/should-skip-this.sh
137+
if: success() && !env.SKIP_JOB
138+
- name: free up space in github runner
139+
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
142140
- name: collect CPU statistics
143141
run: src/ci/scripts/collect-cpu-stats.sh
144142

@@ -271,11 +269,8 @@ jobs:
271269
- name: decide whether to skip this job
272270
run: src/ci/scripts/should-skip-this.sh
273271
if: success() && !env.SKIP_JOB
274-
- name: configure GitHub Actions to kill the build when outdated
275-
uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
276-
with:
277-
github_token: "${{ secrets.github_token }}"
278-
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try' && github.ref != 'refs/heads/try-perf'"
272+
- name: free up space in github runner
273+
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
279274
- name: collect CPU statistics
280275
run: src/ci/scripts/collect-cpu-stats.sh
281276
if: success() && !env.SKIP_JOB
@@ -658,9 +653,8 @@ jobs:
658653
- name: decide whether to skip this job
659654
run: src/ci/scripts/should-skip-this.sh
660655
if: success() && !env.SKIP_JOB
661-
- name: ensure the channel matches the target branch
662-
run: src/ci/scripts/verify-channel.sh
663-
if: success() && !env.SKIP_JOB
656+
- name: free up space in github runner
657+
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
664658
- name: collect CPU statistics
665659
run: src/ci/scripts/collect-cpu-stats.sh
666660
if: success() && !env.SKIP_JOB
@@ -788,9 +782,8 @@ jobs:
788782
- name: decide whether to skip this job
789783
run: src/ci/scripts/should-skip-this.sh
790784
if: success() && !env.SKIP_JOB
791-
- name: ensure the channel matches the target branch
792-
run: src/ci/scripts/verify-channel.sh
793-
if: success() && !env.SKIP_JOB
785+
- name: free up space in github runner
786+
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
794787
- name: collect CPU statistics
795788
run: src/ci/scripts/collect-cpu-stats.sh
796789
if: success() && !env.SKIP_JOB

0 commit comments

Comments
 (0)