Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Jun 14, 2024
1 parent 50d4e6d commit f11536f
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 22 deletions.
29 changes: 21 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 20 additions & 7 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions packages/setup-ocaml/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
import * as os from "node:os";
import * as path from "node:path";
import * as process from "node:process";
import * as core from "@actions/core";
import * as yaml from "yaml";

export const ARCHITECTURE = (() => {
switch (os.arch()) {
case "x64": {
return "x86_64";
switch (process.arch) {
case "arm": {
return "armhf";
}
case "arm64": {
return "arm64";
}
case "s390x": {
return "s390x";
}
case "x64": {
return "x86_64";
}
default: {
throw new Error("The architecture is not supported.");
}
}
})();

export const PLATFORM = (() => {
switch (os.platform()) {
switch (process.platform) {
case "darwin": {
return "macos";
}
case "freebsd": {
return "freebsd";
}
case "linux": {
return "linux";
}
case "darwin": {
return "macos";
case "openbsd": {
return "openbsd";
}
case "win32": {
return "windows";
Expand Down
2 changes: 1 addition & 1 deletion packages/setup-ocaml/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function installer() {
}
core.exportVariable("OPAMCOLOR", "always");
core.exportVariable("OPAMCONFIRMLEVEL", "unsafe-yes");
core.exportVariable("OPAMDOWNLOADJOBS", os.cpus().length * 2);
core.exportVariable("OPAMDOWNLOADJOBS", os.availableParallelism());
core.exportVariable("OPAMERRLOGLEN", 0);
core.exportVariable("OPAMPRECISETRACKING", 1);
core.exportVariable("OPAMROOT", OPAM_ROOT);
Expand Down

0 comments on commit f11536f

Please sign in to comment.