Update Github Actions CI set-env/add-path (#2265)

In accordance with [this
advisory](https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/)
it's recommended we moved to a different scheme of setting env vars and
updating PATH.
This commit is contained in:
Alex Crichton
2020-10-05 15:08:56 -05:00
committed by GitHub
parent 9e87e45745
commit e22e2c3722
4 changed files with 42 additions and 26 deletions

View File

@@ -1,13 +1,19 @@
#!/usr/bin/env node
const fs = require('fs');
function set_env(name, val) {
fs.appendFileSync(process.env['GITHUB_ENV'], `${name}=${val}\n`)
}
// On OSX pointing to brew's LLVM location.
if (process.platform == 'darwin') {
console.log("::set-env name=DWARFDUMP::/usr/local/opt/llvm/bin/llvm-dwarfdump");
console.log("::set-env name=LLDB::/usr/local/opt/llvm/bin/lldb");
set_env("DWARFDUMP", "/usr/local/opt/llvm/bin/llvm-dwarfdump");
set_env("LLDB", "/usr/local/opt/llvm/bin/lldb");
}
// On Linux pointing to specific version
if (process.platform == 'linux') {
console.log("::set-env name=DWARFDUMP::/usr/bin/llvm-dwarfdump-9");
console.log("::set-env name=LLDB::/usr/bin/lldb-9");
set_env("DWARFDUMP", "/usr/bin/llvm-dwarfdump-9");
set_env("LLDB", "/usr/bin/lldb-9");
}