mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-25 01:48:04 +00:00
Merge pull request #8 from cachix/5-max-jobs
fix #5: set max-jobs = auto
This commit is contained in:
commit
2b219c86f3
2 changed files with 7 additions and 2 deletions
|
@ -30,7 +30,9 @@ function run() {
|
||||||
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
|
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
|
||||||
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
||||||
yield exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
|
yield exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
|
||||||
yield exec.exec("sudo", ["echo", "http2 = false", ">>", "/etc/nix/nix.conf"]);
|
yield exec.exec("sudo", ["sh", "-c", "echo http2 = false >> /etc/nix/nix.conf"]);
|
||||||
|
// Set jobs to number of cores
|
||||||
|
yield exec.exec("sudo", ["sh", "-c", "echo max-jobs = auto >> /etc/nix/nix.conf"]);
|
||||||
// TODO: retry due to all the things that go wrong
|
// TODO: retry due to all the things that go wrong
|
||||||
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
|
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
|
||||||
yield exec.exec("sh", [nixInstall]);
|
yield exec.exec("sh", [nixInstall]);
|
||||||
|
|
|
@ -13,7 +13,10 @@ async function run() {
|
||||||
|
|
||||||
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
||||||
await exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
|
await exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
|
||||||
await exec.exec("sudo", ["echo", "http2 = false", ">>", "/etc/nix/nix.conf"]);
|
await exec.exec("sudo", ["sh", "-c", "echo http2 = false >> /etc/nix/nix.conf"]);
|
||||||
|
|
||||||
|
// Set jobs to number of cores
|
||||||
|
await exec.exec("sudo", ["sh", "-c", "echo max-jobs = auto >> /etc/nix/nix.conf"]);
|
||||||
|
|
||||||
// TODO: retry due to all the things that go wrong
|
// TODO: retry due to all the things that go wrong
|
||||||
const nixInstall = await tc.downloadTool('https://nixos.org/nix/install');
|
const nixInstall = await tc.downloadTool('https://nixos.org/nix/install');
|
||||||
|
|
Loading…
Reference in a new issue