From 72100bbd0bd6ec40084736967e4dbdaeeb285388 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Fri, 8 Nov 2024 21:50:14 -0500 Subject: [PATCH] Temporarily break `pure-rust-build` for testing This consists of several changes to verify that the `pure-rust-build` CI job (still) works to verify that building `max-pure` doesn't require tools it is not intended to require. The main goal of this testing is to allow each step to be undone after upgrading the Docker image to a newer version of Debian, while verifying that doing so doesn't break or otherwise weaken the test. See the individual commit messages below for details. * Temporarily break `pure-rust-build` to verify that it can fail This makes the `pure-rust-build` CI job attempt to install gitoxide from `.` with implicit `max`, rather than explicit `max-pure`. This job, introduced in ed4deac (#624), is intended to identify unintended C toolchain dependencies. If, without the current breakage, it is (still) capable of doing this, then as temporarily modified here, it should fail. If it fails and the error messages clearly relate to the absence of components necessary to build/use C libraries, then it is probably (still) working. Assuming it fails as expected, the Debian version can then be increased, and then the changes here (and in any follow-up testing adjustments) undone: if that fails, then succeeds, respectively, then the job's functionality is most likely preserved across the upgrade. * Temporarily add `cmake` to `pure-rust-build` job This needs to be undone, since `max-pure` definitely should not require `cmake`. The reason for this temporary change is to figure out how robust the test is: currently, it fails on `max` as it should, but reports the absence of `cmake` as the reason. For the test to be robust, its failure should be for a deeper reason, and preferably even implicate the `minimal` Rust profile. * Temporarily add `build-essential` to `pure-rust-build` job This still installs `gcc` and `libc-dev` because `build-essential` depends on them, but this als installs packages such as `g++` and `make`, the absence of which seems to trigger failure before the effects of installing the `minimal` toolchain do (if they do). As in the previous change, this will of course need to be undone. * Temporarily add `pkgconf` and `libssl-dev` to `pure-rust-build` job This too must of course be undone. Like the last couple temporary changes, this is to see if the significance of using the `minimal` Rust toolchain can be identified. Note: This causes the test to pass, even with the `minimal` Rust toolchain. That's okay. These effects can be compared to those of the reverse incremental changes to be made after increasing the Debian image version. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 523e909c8e2..bbbb99f52ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,11 +24,11 @@ jobs: steps: - uses: actions/checkout@v4 - name: Prerequisites - run: apt-get update && apt-get install --no-install-recommends -y ca-certificates curl gcc libc-dev # gcc is required as OS abstraction + run: apt-get update && apt-get install --no-install-recommends -y ca-certificates curl build-essential pkgconf libssl-dev cmake # gcc is required as OS abstraction - name: install Rust via Rustup run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal; - uses: Swatinem/rust-cache@v2 - - run: /github/home/.cargo/bin/cargo install --debug --locked --no-default-features --features max-pure --path . + - run: /github/home/.cargo/bin/cargo install --debug --locked --path . test: runs-on: ubuntu-latest