mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
install with debug artifacts
This commit is contained in:
parent
dc73133d4d
commit
18cb1cda61
1 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
|
@ -49,7 +50,21 @@ async function installPython(workingDirectory: string) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
await exec.exec('powershell', ['./setup.ps1'], options);
|
const ps1 = './setup.ps1';
|
||||||
|
|
||||||
|
// augment default options to include debug libraries
|
||||||
|
const installArgs =
|
||||||
|
'DefaultAllUsersTargetDir=$PythonArchPath InstallAllUsers=1';
|
||||||
|
|
||||||
|
const data = fs.readFileSync(ps1, 'utf8');
|
||||||
|
const result = data.replace(
|
||||||
|
/`(${installArgs})`/g,
|
||||||
|
'$1 Include_debug=1 Include_symbols=1'
|
||||||
|
);
|
||||||
|
|
||||||
|
fs.writeFileSync(ps1, result, 'utf8');
|
||||||
|
|
||||||
|
await exec.exec('powershell', [ps1], options);
|
||||||
} else {
|
} else {
|
||||||
await exec.exec('bash', ['./setup.sh'], options);
|
await exec.exec('bash', ['./setup.sh'], options);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue