Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/actions/set-platform-arch/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Set Platform-Arch
description: Composes the platform-arch string (converting win32→win, appending -musl when applicable) from matrix inputs
description: Composes the platform-arch string from matrix inputs, matching pnpm pack-app's target convention (win32, darwin, linux + arch + optional -musl)

inputs:
platform:
Expand All @@ -15,7 +15,7 @@ inputs:

outputs:
platform_arch:
description: 'Release-ready platform-arch string (e.g. darwin-arm64, linux-x64-musl, win-x64)'
description: 'Release-ready platform-arch string (e.g. darwin-arm64, linux-x64-musl, win32-x64) — matches pack-app target naming'
value: ${{ steps.resolve.outputs.platform_arch }}

runs:
Expand All @@ -29,13 +29,12 @@ runs:
ARCH: ${{ inputs.arch }}
LIBC: ${{ inputs.libc }}
run: |
# Convert win32 -> win for file/folder names.
if [ "${PLATFORM}" = "win32" ]; then
RELEASE_PLATFORM="win"
else
RELEASE_PLATFORM="${PLATFORM}"
fi
PLATFORM_ARCH="${RELEASE_PLATFORM}-${ARCH}"
# Use Node.js platform string verbatim (win32, not win) so
# asset filenames, build dirs, and consumer-side
# process.platform comparisons all share one vocabulary.
# Aligns with pnpm pack-app's target convention used fleet-
# wide (ultrathink, future stuie/cli, etc.).
PLATFORM_ARCH="${PLATFORM}-${ARCH}"
if [ "${LIBC}" = "musl" ]; then
PLATFORM_ARCH="${PLATFORM_ARCH}-musl"
fi
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/binsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1430,19 +1430,19 @@ jobs:
fi

# Windows x64
if [ -d "artifacts/${TOOL}-win-x64" ]; then
mv artifacts/${TOOL}-win-x64/${TOOL}.exe \
dist/${TOOL}/${TOOL}-win-x64.exe 2>/dev/null || \
mv artifacts/${TOOL}-win-x64/${TOOL} \
dist/${TOOL}/${TOOL}-win-x64 2>/dev/null || true
if [ -d "artifacts/${TOOL}-win32-x64" ]; then
mv artifacts/${TOOL}-win32-x64/${TOOL}.exe \
dist/${TOOL}/${TOOL}-win32-x64.exe 2>/dev/null || \
mv artifacts/${TOOL}-win32-x64/${TOOL} \
dist/${TOOL}/${TOOL}-win32-x64 2>/dev/null || true
fi

# Windows ARM64
if [ -d "artifacts/${TOOL}-win-arm64" ]; then
mv artifacts/${TOOL}-win-arm64/${TOOL}.exe \
dist/${TOOL}/${TOOL}-win-arm64.exe 2>/dev/null || \
mv artifacts/${TOOL}-win-arm64/${TOOL} \
dist/${TOOL}/${TOOL}-win-arm64 2>/dev/null || true
if [ -d "artifacts/${TOOL}-win32-arm64" ]; then
mv artifacts/${TOOL}-win32-arm64/${TOOL}.exe \
dist/${TOOL}/${TOOL}-win32-arm64.exe 2>/dev/null || \
mv artifacts/${TOOL}-win32-arm64/${TOOL} \
dist/${TOOL}/${TOOL}-win32-arm64 2>/dev/null || true
fi

# Make Unix binaries executable
Expand Down Expand Up @@ -1528,8 +1528,8 @@ jobs:
- linux-x64
- linux-arm64-musl
- linux-x64-musl
- win-arm64
- win-x64
- win32-arm64
- win32-x64

## Files
- \`${TOOL}-darwin-arm64\` - macOS Apple Silicon
Expand All @@ -1538,8 +1538,8 @@ jobs:
- \`${TOOL}-linux-x64\` - Linux x64 (glibc)
- \`${TOOL}-linux-arm64-musl\` - Linux ARM64 (musl/Alpine)
- \`${TOOL}-linux-x64-musl\` - Linux x64 (musl/Alpine)
- \`${TOOL}-win-arm64.exe\` - Windows ARM64
- \`${TOOL}-win-x64.exe\` - Windows x64
- \`${TOOL}-win32-arm64.exe\` - Windows ARM64
- \`${TOOL}-win32-x64.exe\` - Windows x64
- \`checksums.txt\` - SHA256 checksums

## Usage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ jobs:
- linux-x64
- linux-arm64-musl
- linux-x64-musl
- win-arm64
- win-x64
- win32-arm64
- win32-x64

## Files
Each platform archive contains:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iocraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@ jobs:
- \`iocraft-${VERSION}-linux-arm64-musl.node\` - Linux ARM64 musl native module
- \`iocraft-${VERSION}-darwin-x64.node\` - macOS Intel native module
- \`iocraft-${VERSION}-darwin-arm64.node\` - macOS Apple Silicon native module
- \`iocraft-${VERSION}-win-x64.node\` - Windows x64 native module
- \`iocraft-${VERSION}-win-arm64.node\` - Windows ARM64 native module
- \`iocraft-${VERSION}-win32-x64.node\` - Windows x64 native module
- \`iocraft-${VERSION}-win32-arm64.node\` - Windows ARM64 native module
- \`checksums.txt\` - SHA256 checksums

## Usage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lief.yml
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ jobs:
- linux-x64
- linux-arm64-musl
- linux-x64-musl
- win-arm64
- win-x64
- win32-arm64
- win32-x64

## Files
Each platform archive contains:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/node-smol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ jobs:

- name: Validate artifact count
run: |
# Expected artifacts: 8 (darwin-arm64, darwin-x64, linux-x64, linux-arm64, linux-x64-musl, linux-arm64-musl, win-x64, win-arm64)
# Expected artifacts: 8 (darwin-arm64, darwin-x64, linux-x64, linux-arm64, linux-x64-musl, linux-arm64-musl, win32-x64, win32-arm64)
EXPECTED_COUNT=8
ACTUAL_COUNT=$(find artifacts -mindepth 1 -maxdepth 1 -type d | wc -l)
if [ "$ACTUAL_COUNT" -ne "$EXPECTED_COUNT" ]; then
Expand Down Expand Up @@ -1149,10 +1149,10 @@ jobs:
mv artifacts/node-smol-linux-arm64-musl/node packages/node-smol-builder/dist/node-linux-arm64-musl

# Windows x64
mv artifacts/node-smol-win-x64/node.exe packages/node-smol-builder/dist/node-win-x64.exe
mv artifacts/node-smol-win32-x64/node.exe packages/node-smol-builder/dist/node-win32-x64.exe

# Windows ARM64 (cross-compiled)
mv artifacts/node-smol-win-arm64/node.exe packages/node-smol-builder/dist/node-win-arm64.exe
mv artifacts/node-smol-win32-arm64/node.exe packages/node-smol-builder/dist/node-win32-arm64.exe

# Make Unix binaries executable. The prior `node-*[!.exe]` glob
# used a single-character negated class which matches any char
Expand All @@ -1172,8 +1172,8 @@ jobs:
"node-linux-arm64"
"node-linux-x64-musl"
"node-linux-arm64-musl"
"node-win-x64.exe"
"node-win-arm64.exe"
"node-win32-x64.exe"
"node-win32-arm64.exe"
)

MISSING=()
Expand Down Expand Up @@ -1264,8 +1264,8 @@ jobs:
- linux-x64
- linux-arm64-musl
- linux-x64-musl
- win-arm64
- win-x64
- win32-arm64
- win32-x64

## Files
- \`node-darwin-arm64\` - macOS Apple Silicon
Expand All @@ -1274,8 +1274,8 @@ jobs:
- \`node-linux-x64\` - Linux x64 (glibc)
- \`node-linux-arm64-musl\` - Linux ARM64 (musl/Alpine)
- \`node-linux-x64-musl\` - Linux x64 (musl/Alpine)
- \`node-win-arm64.exe\` - Windows ARM64
- \`node-win-x64.exe\` - Windows x64
- \`node-win32-arm64.exe\` - Windows ARM64
- \`node-win32-x64.exe\` - Windows x64
- \`checksums.txt\` - SHA256 checksums

## Usage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/opentui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ jobs:
- \`opentui-${VERSION}-linux-arm64-musl.node\` - Linux ARM64 musl native module
- \`opentui-${VERSION}-darwin-x64.node\` - macOS Intel native module
- \`opentui-${VERSION}-darwin-arm64.node\` - macOS Apple Silicon native module
- \`opentui-${VERSION}-win-x64.node\` - Windows x64 native module
- \`opentui-${VERSION}-win-arm64.node\` - Windows ARM64 native module
- \`opentui-${VERSION}-win32-x64.node\` - Windows x64 native module
- \`opentui-${VERSION}-win32-arm64.node\` - Windows ARM64 native module
- \`checksums.txt\` - SHA256 checksums

## Usage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stubs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@ jobs:
- linux-x64
- linux-arm64-musl
- linux-x64-musl
- win-arm64
- win-x64
- win32-arm64
- win32-x64

## Files
Each platform archive contains a small stub binary used by \`binpress\` to create self-extracting executables.
Expand Down
8 changes: 4 additions & 4 deletions packages/binpress/scripts/generate-embedded-stubs.mts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ await safeMkdir(BUILD_DIR)
await safeMkdir(path.dirname(OUTPUT_FILE))

// Detect current platform for local stub usage
const currentPlatform = WIN32 ? 'win' : process.platform
const currentPlatform = process.platform
const currentArch = process.env.TARGET_ARCH || process.arch
const currentLibc = (await isMusl()) ? 'musl' : undefined

Expand Down Expand Up @@ -179,7 +179,7 @@ async function downloadStub(
}

// Determine extracted file name
const extractedName = platform === 'win' ? 'smol_stub.exe' : 'smol_stub'
const extractedName = platform === 'win32' ? 'smol_stub.exe' : 'smol_stub'
const extractedPath = path.join(platformDir, extractedName)

// Move to build directory with platform-specific name for embedding
Expand Down Expand Up @@ -260,8 +260,8 @@ const stubConfigs = [
{ arch: 'x64', libc: undefined, name: 'linux-x64', platform: 'linux' },
{ arch: 'arm64', libc: 'musl', name: 'linux-arm64-musl', platform: 'linux' },
{ arch: 'x64', libc: 'musl', name: 'linux-x64-musl', platform: 'linux' },
{ arch: 'arm64', libc: undefined, name: 'win-arm64', platform: 'win' },
{ arch: 'x64', libc: undefined, name: 'win-x64', platform: 'win' },
{ arch: 'arm64', libc: undefined, name: 'win32-arm64', platform: 'win32' },
{ arch: 'x64', libc: undefined, name: 'win32-x64', platform: 'win32' },
]
const stubResults = await Promise.allSettled(
stubConfigs.map(config =>
Expand Down
7 changes: 6 additions & 1 deletion packages/build-infra/lib/platform-mappings.mts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ const logger = getDefaultLogger()
/**
* Maps Node.js platform names to GitHub release platform names.
*
* Aligned with pnpm pack-app's target convention so asset filenames,
* internal build directories, and consumer-side process.platform
* comparisons all share one vocabulary. Historical naming used the
* shortened `win` form; that translation layer is removed.
*
* @type {Readonly<Record<string, string>>}
*/
export const RELEASE_PLATFORM_MAP = Object.freeze({
__proto__: null,
darwin: 'darwin',
linux: 'linux',
win32: 'win',
win32: 'win32',
})

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/opentui-builder/lib/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const PLATFORM_ARCH_MAP = {
__proto__: null,
darwin: 'darwin',
linux: 'linux',
win32: 'win',
win32: 'win32',
}

function detectMusl() {
Expand Down
Loading