From e9ca48a4fb2749a95ee529b5aeb60d8aa0dfed2c Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sun, 12 Jan 2025 00:06:10 -0800 Subject: [PATCH] ci: build executables on older OS --- .github/workflows/CI.yml | 10 +++++----- dev/scripts/pack-exe.mjs | 33 +++++++++++---------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 32555e9c..141ea965 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -82,9 +82,9 @@ jobs: fail-fast: false matrix: os: - - windows-2022 - - ubuntu-24.04 - - macos-13 + - windows-2019 + - ubuntu-20.04 + - macos-13 # x64 - macos-14 # arm64 steps: - uses: actions/checkout@v4 @@ -144,9 +144,9 @@ jobs: - ubuntu-22.04 - ubuntu-20.04 - macos-15 # arm64 - - macos-15-large # x64 + # - macos-15-large # x64 - macos-14 # arm64 - - macos-14-large # x64 + # - macos-14-large # x64 # - macos-14-xlarge #arm64 - macos-13 # x64 steps: diff --git a/dev/scripts/pack-exe.mjs b/dev/scripts/pack-exe.mjs index 14310e69..e1d55510 100644 --- a/dev/scripts/pack-exe.mjs +++ b/dev/scripts/pack-exe.mjs @@ -15,29 +15,18 @@ function getPlatformName() { } } -function main() { - let exes - if (process.platform === "win32") { - exes = [".exe"] - } else if (process.platform === "darwin") { - exes = [""] - } else { - exes = [""] - } +async function main() { + const exe = process.platform === "win32" ? ".exe" : "" - return Promise.all( - exes.map((exe) => - execaNode("./node_modules/caxa/build/index.mjs", [ - "--input", - "./dist/modern", - "--output", - `./exe/setup-cpp-${process.arch}-${getPlatformName()}${exe}`, - "--", - `{{caxa}}/node_modules/.bin/node${exe}`, - "{{caxa}}/setup-cpp.mjs", - ]) - ), - ) + await execaNode("./node_modules/caxa/build/index.mjs", [ + "--input", + "./dist/modern", + "--output", + `./exe/setup-cpp-${process.arch}-${getPlatformName()}${exe}`, + "--", + `{{caxa}}/node_modules/.bin/node${exe}`, + "{{caxa}}/setup-cpp.mjs", + ]) } main().catch((err) => {