|
|
@@ -370,7 +370,7 @@ describe('CI workflow', () => {
|
|
|
name: 'python runtime / release-shaped matrix',
|
|
|
uses: './.github/workflows/build-exe-for-python-sdk.yml',
|
|
|
with: {
|
|
|
- targets: 'node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-win-x64',
|
|
|
+ targets: 'node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-macos-x64,node24-win-x64',
|
|
|
ci: true,
|
|
|
},
|
|
|
secrets: {
|
|
|
@@ -462,7 +462,7 @@ describe('Python release workflows', () => {
|
|
|
expect(build).toMatchObject({
|
|
|
uses: './.github/workflows/build-exe-for-python-sdk.yml',
|
|
|
with: {
|
|
|
- targets: 'node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-win-x64',
|
|
|
+ targets: 'node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-macos-x64,node24-win-x64',
|
|
|
release: true,
|
|
|
},
|
|
|
})
|
|
|
@@ -531,7 +531,7 @@ describe('Python release workflows', () => {
|
|
|
|
|
|
const buildSteps: unknown[] = build.steps
|
|
|
const manylinuxAddon = buildSteps.find(step => isRecord(step) && step.name === 'Rebuild Linux node-pty against manylinux 2.28')
|
|
|
- const macosCheck = buildSteps.find(step => isRecord(step) && step.name === 'Check macOS deployment target')
|
|
|
+ const macosCheck = buildSteps.find(step => isRecord(step) && step.name === 'Check macOS payload architecture and deployment target')
|
|
|
const manylinuxSmoke = buildSteps.find(step => isRecord(step) && step.name === 'Run wheel in a manylinux 2.28 container')
|
|
|
const cleanVenvPosix = buildSteps.find(step => isRecord(step) && step.name === 'Install local SDK and runtime wheels into a clean venv (POSIX)')
|
|
|
const cleanVenvWindows = buildSteps.find(step => isRecord(step) && step.name === 'Install local SDK and runtime wheels into a clean venv (Windows)')
|
|
|
@@ -541,7 +541,8 @@ describe('Python release workflows', () => {
|
|
|
const realApiPreflightWindows = buildSteps.find(step => isRecord(step) && step.name === 'Preflight installed-wheel real API test (Windows)')
|
|
|
const installedRealApiPosix = buildSteps.find(step => isRecord(step) && step.name === 'Run installed-wheel real API black-box test (POSIX)')
|
|
|
const installedRealApiWindows = buildSteps.find(step => isRecord(step) && step.name === 'Run installed-wheel real API black-box test (Windows)')
|
|
|
- if (!isRecord(cleanVenvPosix) || !isRecord(cleanVenvWindows)
|
|
|
+ if (!isRecord(macosCheck) || typeof macosCheck.run !== 'string'
|
|
|
+ || !isRecord(cleanVenvPosix) || !isRecord(cleanVenvWindows)
|
|
|
|| !isRecord(installedKeylessPosix) || !isRecord(installedKeylessWindows)
|
|
|
|| !isRecord(realApiPreflightPosix) || !isRecord(realApiPreflightWindows)
|
|
|
|| !isRecord(installedRealApiPosix) || !isRecord(installedRealApiWindows)) {
|
|
|
@@ -564,6 +565,9 @@ describe('Python release workflows', () => {
|
|
|
expect(JSON.stringify(plan.steps)).toContain('pep440_version')
|
|
|
const workflowJson = JSON.stringify(workflow)
|
|
|
expect(workflowJson).toContain('macosx_14_0_arm64')
|
|
|
+ expect(workflowJson).toContain('macosx_14_0_x86_64')
|
|
|
+ expect(workflowJson).toContain('node24-macos-x64')
|
|
|
+ expect(workflowJson).toContain('macos-15-intel')
|
|
|
expect(workflowJson).toContain('win_amd64')
|
|
|
expect(workflowJson).toContain('node24-win-x64')
|
|
|
expect(workflowJson).toContain('windows-2025')
|
|
|
@@ -583,8 +587,10 @@ describe('Python release workflows', () => {
|
|
|
expect(JSON.stringify(manylinuxAddon)).toContain('node-pty-glibc-versions.txt')
|
|
|
expect(JSON.stringify(manylinuxAddon)).toContain('le 2.28')
|
|
|
expect(macosCheck).toMatchObject({ if: "runner.os == 'macOS'" })
|
|
|
- expect(JSON.stringify(macosCheck)).toContain('scripts/check-macos-deployment-target.py')
|
|
|
- expect(JSON.stringify(macosCheck)).toContain('$EXE-spawn-helper')
|
|
|
+ expect(macosCheck.run).toContain('scripts/check-macos-deployment-target.py')
|
|
|
+ expect(macosCheck.run).toContain('lipo "$payload" -verify_arch')
|
|
|
+ expect(macosCheck.run).toContain('$EXE-rg')
|
|
|
+ expect(macosCheck.run).toContain('$EXE-spawn-helper')
|
|
|
expect(JSON.stringify(installedKeylessPosix)).toContain('--scenario all')
|
|
|
expect(JSON.stringify(installedKeylessPosix)).toContain('env -u PYTHONPATH')
|
|
|
expect(JSON.stringify(installedKeylessWindows)).toContain('--scenario all --installed-wheel')
|
|
|
@@ -620,14 +626,29 @@ describe('Python release workflows', () => {
|
|
|
}
|
|
|
const runtimeScript: unknown[] = runtimeWheel.script
|
|
|
const macosCheck = runtimeScript.find(
|
|
|
- step => typeof step === 'string' && step.includes('PLATFORM" = macos-arm64'),
|
|
|
+ step => typeof step === 'string' && step.includes('${PLATFORM#macos-}'),
|
|
|
)
|
|
|
if (typeof macosCheck !== 'string') {
|
|
|
throw new TypeError('GitLab CI must check the macOS deployment target')
|
|
|
}
|
|
|
|
|
|
expect(macosCheck).toContain('scripts/check-macos-deployment-target.py')
|
|
|
- expect(macosCheck).toContain('"$EXE" "$EXE-spawn-helper"')
|
|
|
+ expect(macosCheck).toContain('lipo "$payload" -verify_arch')
|
|
|
+ expect(macosCheck).toContain('"$EXE" "$EXE-rg" "$EXE-spawn-helper"')
|
|
|
+ })
|
|
|
+
|
|
|
+ it('builds the macOS x64 wheel on the matching GitLab runner', () => {
|
|
|
+ const workflow = loadWorkflow('.gitlab-ci.yml')
|
|
|
+ const macosX64 = workflow['runtime-macos-x64']
|
|
|
+ const publish = workflow['publish-python']
|
|
|
+ if (!isRecord(macosX64) || !isRecord(publish) || !Array.isArray(publish.needs)) {
|
|
|
+ throw new TypeError('GitLab CI must define the macOS x64 runtime and publication jobs')
|
|
|
+ }
|
|
|
+
|
|
|
+ expect(macosX64.tags).toEqual(['macos-x64'])
|
|
|
+ expect(macosX64.variables).toMatchObject({ PKG_TARGET: 'node24-macos-x64', PLATFORM: 'macos-x64' })
|
|
|
+ expect(publish.needs).toContainEqual({ job: 'runtime-macos-x64', artifacts: true })
|
|
|
+ expect(JSON.stringify(publish.script)).toContain('macosx_14_0_x86_64.whl')
|
|
|
})
|
|
|
|
|
|
it('builds and black-box tests the Windows x64 wheel in GitLab', () => {
|