Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pip install --user #296

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -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::"');
Expand All @@ -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(' ')}`);
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -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::"'
)
}
Expand Down Expand Up @@ -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::"'
)
Expand Down
Loading