From 14876725bf3959ec4bbddc8537a7a825d0186fb3 Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Mon, 18 Nov 2024 10:55:54 +1100 Subject: [PATCH] Clean up toolchain after build (leave runners' rustup in working condition) --- .github/workflows/test.yml | 5 +++++ Makefile | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fa71b9..402a3d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,3 +53,8 @@ jobs: - name: 'Run smir integration tests' run: | make integration-test + + - name: 'Clean up toolchain' + if: always() + run: | + make rustup-clear-toolchain diff --git a/Makefile b/Makefile index 65ced1a..e6d8c8d 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,12 @@ rust_set_toolchain: ${RUST_LIB_DIR} rustup override set "${TOOLCHAIN_NAME}" echo ${STAGE} > ${STAGE_FILE} +.PHONY: rustup-clear-toolchain +rustup-clear-toolchain: + rustup override unset + rustup override unset --nonexistent + rustup toolchain uninstall "${TOOLCHAIN_NAME}" + generate_ui_tests: mkdir -p "${RUST_DIR}"/tests cd "${RUST_SRC}"; ./get_runpass.sh tests/ui > "${RUST_DIR}"/tests_ui_sources