diff --git a/dist/index.js b/dist/index.js index 99737db..dee6ce2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11905,7 +11905,7 @@ async function dockerBuild(container, maturinRelease, hostHomeMount, args) { target.includes('i686')) { commands.push('echo "::group::Install libatomic"', 'if command -v yum &> /dev/null; then yum install -y libatomic; else apt-get update && apt-get install -y libatomic1; fi', 'echo "::endgroup::"'); } - commands.push('echo "::group::Install Rust"', `command -v rustup &> /dev/null && { rm -frv ~/.rustup/toolchains/; rustup show; } || curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${rustToolchain}`, '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`, 'echo "::endgroup::"', 'export PATH="$PATH:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:/opt/python/cp312-cp312/bin"', 'echo "::group::Install maturin"', `curl -L ${url} | tar -xz -C /usr/local/bin`, 'maturin --version || true', 'which patchelf > /dev/null || python3 -m pip install --user patchelf', 'python3 -m pip install --user cffi || true', 'echo "::endgroup::"'); + commands.push('echo "::group::Install Rust"', `command -v rustup &> /dev/null && { rm -frv ~/.rustup/toolchains/; rustup show; } || curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${rustToolchain}`, '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`, 'echo "::endgroup::"', 'export PATH="$PATH:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:/opt/python/cp312-cp312/bin"', 'echo "::group::Install maturin"', `curl -L ${url} | tar -xz -C /usr/local/bin`, 'maturin --version || true', 'which uv > /dev/null || curl -LsSf https://astral.sh/uv/install.sh | sh', 'which patchelf > /dev/null || uv tool install patchelf', 'python3 -m pip install --user cffi || true', 'echo "::endgroup::"'); if (args.includes('--zig')) { commands.push('echo "::group::Install Zig"', 'python3 -m pip install --user "ziglang<0.14.0"', 'echo "::endgroup::"'); } @@ -11921,7 +11921,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 --user "sccache>=0.10.0"', 'sccache --version', 'echo "::endgroup::"'); + commands.push('echo "::group::Install sccache"', 'uv tool install "sccache>=0.10.0"', 'sccache --version', 'echo "::endgroup::"'); setupSccacheEnv(); } commands.push(`maturin ${args.join(' ')}`); diff --git a/package-lock.json b/package-lock.json index 5c68c39..f80d05c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "maturin-action", - "version": "1.48.0", + "version": "1.48.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "maturin-action", - "version": "1.48.0", + "version": "1.48.1", "license": "MIT", "dependencies": { "@actions/core": "^1.10.0", diff --git a/package.json b/package.json index 8794655..1f3cffe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "maturin-action", - "version": "1.48.0", + "version": "1.48.1", "description": "GitHub Action to install and run a custom maturin command", "main": "dist/index.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index 2263a96..6bab5cb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -669,7 +669,9 @@ 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 --user patchelf', + // Install uv + 'which uv > /dev/null || curl -LsSf https://astral.sh/uv/install.sh | sh', + 'which patchelf > /dev/null || uv tool install patchelf', 'python3 -m pip install --user cffi || true', // Allow failure for now 'echo "::endgroup::"' ) @@ -708,7 +710,7 @@ async function dockerBuild( if (sccache) { commands.push( 'echo "::group::Install sccache"', - 'python3 -m pip install --user "sccache>=0.10.0"', + 'uv tool install "sccache>=0.10.0"', 'sccache --version', 'echo "::endgroup::"' ) @@ -984,6 +986,7 @@ async function hostBuild( const maturinPath = await installMaturin(maturinRelease) await exec.exec(maturinPath, ['--version'], {ignoreReturnCode: true}) await exec.exec('python3', ['-m', 'pip', 'install', 'cffi']) + // TODO: switch to uv tool install if (IS_LINUX) { await exec.exec('python3', ['-m', 'pip', 'install', 'patchelf']) }