From e213bc9002c8096f26258268b70c23d54af9f31f Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 21 Oct 2024 21:09:29 +0800 Subject: [PATCH 1/2] Use `pip install --user` --- dist/index.js | 10 +++++----- src/index.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0833494..499d98f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11815,7 +11815,7 @@ async function dockerBuild(container, maturinRelease, hostHomeMount, args) { 'set -e', 'echo "::group::Install Rust"', `which rustup > /dev/null || curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${rustToolchain}`, - 'export PATH="$HOME/.cargo/bin:$PATH"', + 'export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"', `echo "Install Rust toolchain ${rustToolchain}"`, `rustup override set ${rustToolchain}`, `rustup component add llvm-tools-preview || true`, @@ -11824,12 +11824,12 @@ async function dockerBuild(container, maturinRelease, hostHomeMount, args) { 'echo "::group::Install maturin"', `curl -L ${url} | tar -xz -C /usr/local/bin`, 'maturin --version || true', - 'which patchelf > /dev/null || python3 -m pip install patchelf', - 'python3 -m pip install cffi || true', + 'which patchelf > /dev/null || python3 -m pip install --user patchelf', + 'python3 -m pip install --user cffi || true', 'echo "::endgroup::"' ]; if (args.includes('--zig')) { - commands.push('echo "::group::Install Zig"', 'python3 -m pip install ziglang', 'echo "::endgroup::"'); + commands.push('echo "::group::Install Zig"', 'python3 -m pip install --user ziglang', 'echo "::endgroup::"'); } if (target.length > 0) { commands.push('echo "::group::Install Rust target"', `if [[ ! -d $(rustc --print target-libdir --target ${target}) ]]; then rustup target add ${target}; fi`, 'echo "::endgroup::"'); @@ -11843,7 +11843,7 @@ async function dockerBuild(container, maturinRelease, hostHomeMount, args) { commands.push('echo "::group::Run before script"', ...beforeScript.split('\n'), 'echo "::endgroup::"'); } if (sccache) { - commands.push('echo "::group::Install sccache"', 'python3 -m pip install "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"'); + commands.push('echo "::group::Install sccache"', 'python3 -m pip install --user "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"'); setupSccacheEnv(); } commands.push(`maturin ${args.join(' ')}`); diff --git a/src/index.ts b/src/index.ts index eb69db0..429f002 100644 --- a/src/index.ts +++ b/src/index.ts @@ -554,7 +554,7 @@ async function dockerBuild( // Install Rust 'echo "::group::Install Rust"', `which rustup > /dev/null || curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${rustToolchain}`, - 'export PATH="$HOME/.cargo/bin:$PATH"', + 'export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"', `echo "Install Rust toolchain ${rustToolchain}"`, `rustup override set ${rustToolchain}`, `rustup component add llvm-tools-preview || true`, @@ -565,14 +565,14 @@ async function dockerBuild( 'echo "::group::Install maturin"', `curl -L ${url} | tar -xz -C /usr/local/bin`, 'maturin --version || true', - 'which patchelf > /dev/null || python3 -m pip install patchelf', - 'python3 -m pip install cffi || true', // Allow failure for now + 'which patchelf > /dev/null || python3 -m pip install --user patchelf', + 'python3 -m pip install --user cffi || true', // Allow failure for now 'echo "::endgroup::"' ] if (args.includes('--zig')) { commands.push( 'echo "::group::Install Zig"', - 'python3 -m pip install ziglang', + 'python3 -m pip install --user ziglang', 'echo "::endgroup::"' ) } @@ -604,7 +604,7 @@ async function dockerBuild( if (sccache) { commands.push( 'echo "::group::Install sccache"', - 'python3 -m pip install "sccache>=0.4.0"', + 'python3 -m pip install --user "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"' ) From 78d2b0fbd3b2ad68e0c2c7929d50b7299dc9b210 Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 21 Oct 2024 21:15:41 +0800 Subject: [PATCH 2/2] Test on Ubuntu 24.04 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68eeae6..a30bd11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }} matrix: os: - - ubuntu-latest + - ubuntu-24.04 - macos-13 - windows-latest toolchain: [stable, nightly]