Skip to content

Commit 0d1819b

Browse files
JohanEngelenGeod24
authored andcommitted
Allow non-x64 architecture with LDC as default
This allows supporting the new MacOS runners which runs on ARM.
1 parent 95d426d commit 0d1819b

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

.github/workflows/test.yml

+17
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ jobs:
2828
dmd-master,
2929
"",
3030
]
31+
include:
32+
- os: macOS-latest
33+
arch: arm64
34+
dc: ""
35+
- os: macos-latest
36+
arch: arm64
37+
dc: ldc-1.30.0
38+
- os: macOS-latest
39+
arch: arm64
40+
dc: ldc-latest
41+
- os: macOS-latest
42+
arch: arm64
43+
dc: ldc-beta
44+
- os: macOS-latest
45+
arch: arm64
46+
dc: ldc-master
47+
3148
runs-on: ${{ matrix.os }}
3249
steps:
3350
- uses: actions/checkout@master

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ import { existsSync } from 'fs';
88

99
async function run() {
1010
try {
11-
if (process.arch != "x64")
12-
throw new Error("Only x64 arch is supported by all platforms");
11+
let default_compiler = "dmd-latest";
12+
if (process.arch != "x64") {
13+
default_compiler = "ldc-latest";
14+
}
15+
const input = core.getInput('compiler') || default_compiler;
16+
if (process.arch != "x64" && input.startsWith("dmd"))
17+
throw new Error("The dmd compiler is not supported for non-x64 architecture");
1318

14-
const input = core.getInput('compiler') || "dmd-latest";
1519
const gh_token = core.getInput('gh_token') || "";
1620
const dub_version = core.getInput('dub') || "";
1721
const descr = await compiler(input, dub_version, gh_token);

0 commit comments

Comments
 (0)