Skip to content

Commit a3f8c4a

Browse files
authored
Merge pull request #194 from PyO3/tmp-run-maturin-action
Write `run-maturin-action.sh` to a tmpdir
2 parents 7b742b7 + 47af593 commit a3f8c4a

File tree

4 files changed

+56
-61
lines changed

4 files changed

+56
-61
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11712,7 +11712,7 @@ async function dockerBuild(container, maturinRelease, args) {
1171211712
commands.push('echo "::group::sccache stats"', 'sccache --show-stats', 'echo "::endgroup::"');
1171311713
}
1171411714
const workspace = process.env.GITHUB_WORKSPACE;
11715-
const scriptPath = path.join(workspace, 'run-maturin-action.sh');
11715+
const scriptPath = path.join(os.tmpdir(), 'run-maturin-action.sh');
1171611716
(0, fs_1.writeFileSync)(scriptPath, commands.join('\n'));
1171711717
await fs_1.promises.chmod(scriptPath, 0o755);
1171811718
const targetDir = getCargoTargetDir(args);
@@ -11784,6 +11784,8 @@ async function dockerBuild(container, maturinRelease, args) {
1178411784
'_PYTHON_SYSCONFIGDATA_NAME',
1178511785
...dockerEnvs,
1178611786
'-v',
11787+
`${scriptPath}:${scriptPath}`,
11788+
'-v',
1178711789
`${workspace}:${workspace}`,
1178811790
...dockerVolumes,
1178911791
...dockerArgs,

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ async function dockerBuild(
533533

534534
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
535535
const workspace = process.env.GITHUB_WORKSPACE!
536-
const scriptPath = path.join(workspace, 'run-maturin-action.sh')
536+
const scriptPath = path.join(os.tmpdir(), 'run-maturin-action.sh')
537537
writeFileSync(scriptPath, commands.join('\n'))
538538
await fs.chmod(scriptPath, 0o755)
539539

@@ -616,6 +616,8 @@ async function dockerBuild(
616616
'-e',
617617
'_PYTHON_SYSCONFIGDATA_NAME',
618618
...dockerEnvs,
619+
'-v',
620+
`${scriptPath}:${scriptPath}`,
619621
// Mount $GITHUB_WORKSPACE at the same path
620622
'-v',
621623
`${workspace}:${workspace}`,

tests/pyo3-pure/Cargo.lock

Lines changed: 49 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/pyo3-pure/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2018"
66
description = "Implements a dummy function (get_fortytwo.DummyClass.get_42()) in rust"
77

88
[dependencies]
9-
pyo3 = { version = "0.18.3", features = ["abi3-py37", "extension-module"], optional = true }
9+
pyo3 = { version = "0.19.1", features = ["abi3-py37", "extension-module"], optional = true }
1010

1111
[lib]
1212
name = "pyo3_pure"

0 commit comments

Comments
 (0)