Skip to content

Commit

Permalink
ci: build executables on older OS
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 12, 2025
1 parent d98f950 commit e9ca48a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
33 changes: 11 additions & 22 deletions dev/scripts/pack-exe.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit e9ca48a

Please sign in to comment.