Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
sudo apt-get install --yes musl-tools
- name: Build native CLI
run: cargo build --locked --release --package skilld-native --target ${{ matrix.target }}
env:
CFLAGS: ${{ matrix.cflags }}
- name: Stage native CLI
if: runner.os != 'Windows'
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion scripts/release/native-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const nativePackageSpecs = Object.freeze([
nativePackage({ directory: 'cli-darwin-arm64', runner: 'macos-15', target: 'aarch64-apple-darwin', os: 'darwin', cpu: 'arm64', format: 'mach-o' }),
nativePackage({ directory: 'cli-darwin-x64', runner: 'macos-15-intel', target: 'x86_64-apple-darwin', os: 'darwin', cpu: 'x64', format: 'mach-o' }),
nativePackage({ directory: 'cli-linux-arm64-gnu', runner: 'ubuntu-24.04-arm', target: 'aarch64-unknown-linux-gnu', os: 'linux', cpu: 'arm64', libc: 'glibc', format: 'elf' }),
nativePackage({ directory: 'cli-linux-arm64-musl', runner: 'ubuntu-24.04-arm', target: 'aarch64-unknown-linux-musl', os: 'linux', cpu: 'arm64', libc: 'musl', format: 'elf' }),
nativePackage({ directory: 'cli-linux-arm64-musl', runner: 'ubuntu-24.04-arm', target: 'aarch64-unknown-linux-musl', os: 'linux', cpu: 'arm64', libc: 'musl', format: 'elf', cflags: '-mno-outline-atomics' }),
nativePackage({ directory: 'cli-linux-x64-gnu', runner: 'ubuntu-24.04', target: 'x86_64-unknown-linux-gnu', os: 'linux', cpu: 'x64', libc: 'glibc', format: 'elf' }),
nativePackage({ directory: 'cli-linux-x64-musl', runner: 'ubuntu-24.04', target: 'x86_64-unknown-linux-musl', os: 'linux', cpu: 'x64', libc: 'musl', format: 'elf' }),
nativePackage({ directory: 'cli-win32-arm64-msvc', runner: 'windows-11-arm', target: 'aarch64-pc-windows-msvc', os: 'win32', cpu: 'arm64', format: 'pe' }),
Expand All @@ -26,6 +26,7 @@ export function nativeReleaseMatrix() {
include: nativePackageSpecs.map(spec => ({
directory: spec.directory,
executable: spec.executable,
cflags: spec.cflags ?? '',
libc: spec.libc ?? 'none',
runner: spec.runner,
target: spec.target,
Expand Down
8 changes: 8 additions & 0 deletions tests/loader/native-packages.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { afterEach, it } from 'vitest'
import {
independentPackagePublishDecision,
nativePackageSpecs,
nativeReleaseMatrix,
npmTagForVersion,
packagePublishDecision,
verifyNativePackages,
Expand Down Expand Up @@ -110,6 +111,13 @@ it('publishes stable versions under the latest npm tag', () => {
assert.equal(npmTagForVersion('3.0.0'), 'latest')
})

it('disables GCC outline atomics for the ARM64 musl build', () => {
const release = nativeReleaseMatrix()
const arm64Musl = release.include.find(item => item.target === 'aarch64-unknown-linux-musl')

assert.equal(arm64Musl.cflags, '-mno-outline-atomics')
})

it('rejects a release when Harness has a different v3 version', async () => {
const root = await temporaryDirectory()
await writeReleaseManifests(root, '3.0.0-alpha.2', '2.4.0')
Expand Down