From e1572bd5b1a9b79e48d7bb15dbe7ed1d4822f382 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 18 May 2026 10:17:42 -0400 Subject: [PATCH 1/3] Provide pre-built binaries for Alpine on ARM Fixes: https://github.com/sourcemeta/jsonschema/issues/757 Signed-off-by: Juan Cruz Viotti --- .github/workflows/package.yml | 9 +++++++++ .github/workflows/test.yml | 8 ++++++++ cmake/fetch-github-releases.cmake | 1 + npm/main.js | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 157c0537c..4e7d8989d 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -38,6 +38,15 @@ jobs: cc: gcc cxx: g++ shell: sh + - os: ubuntu-22.04-arm + type: container + artifact: alpine-arm + container: + image: alpine:3.21 + options: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined + cc: gcc + cxx: g++ + shell: sh - os: macos-15-intel type: native artifact: macos-x64 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 444672bf9..9834286bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,14 @@ jobs: cc: gcc cxx: g++ shell: sh + - os: ubuntu-22.04-arm + type: container + container: + image: alpine:3.21 + options: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined + cc: gcc + cxx: g++ + shell: sh - os: macos-15-intel type: native cc: clang diff --git a/cmake/fetch-github-releases.cmake b/cmake/fetch-github-releases.cmake index c5cd44d03..0c8994996 100644 --- a/cmake/fetch-github-releases.cmake +++ b/cmake/fetch-github-releases.cmake @@ -13,6 +13,7 @@ foreach(PLATFORM linux-x86_64 linux-arm64 linux-x86_64-musl + linux-arm64-musl windows-x86_64) if(PLATFORM MATCHES "windows") set(OUTPUT_BINARY "${RELEASES_DIR}/jsonschema-${PLATFORM}.exe") diff --git a/npm/main.js b/npm/main.js index e416bb7b8..e292fb930 100644 --- a/npm/main.js +++ b/npm/main.js @@ -22,7 +22,7 @@ function isMusl() { } function getExecutableName() { - if (PLATFORM === 'linux' && ARCH === 'x86_64' && isMusl()) { + if (PLATFORM === 'linux' && (ARCH === 'x86_64' || ARCH === 'arm64') && isMusl()) { return `jsonschema-${PLATFORM}-${ARCH}-musl`; } From 2a50be37b5a82615042fc109ee5387fff853a45e Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 18 May 2026 10:53:42 -0400 Subject: [PATCH 2/3] Fix Signed-off-by: Juan Cruz Viotti --- .github/workflows/package.yml | 6 ++++++ .github/workflows/test.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 4e7d8989d..a78eccbbc 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -78,6 +78,12 @@ jobs: CC: ${{ matrix.platform.cc }} CXX: ${{ matrix.platform.cxx }} steps: + # See https://github.com/laverdet/alpine-arm64 + # Required for JavaScript-based actions to work inside Alpine containers + # on ARM64 runners + - uses: laverdet/alpine-arm64@v1 + if: matrix.platform.type == 'container' && runner.arch == 'ARM64' + - name: Install dependencies (Alpine) if: matrix.platform.type == 'container' run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9834286bb..3d05ef528 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,6 +72,12 @@ jobs: CXX: ${{ matrix.platform.cxx }} WSLENV: CC:CXX steps: + # See https://github.com/laverdet/alpine-arm64 + # Required for JavaScript-based actions to work inside Alpine containers + # on ARM64 runners + - uses: laverdet/alpine-arm64@v1 + if: matrix.platform.type == 'container' && runner.arch == 'ARM64' + # See https://github.com/Vampire/setup-wsl - uses: Vampire/setup-wsl@v5 if: runner.os == 'windows' && matrix.platform.type == 'wsl-2' From ea69cb573a42e951101ab374effb080de579927b Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 18 May 2026 12:22:05 -0400 Subject: [PATCH 3/3] No NPM for now Signed-off-by: Juan Cruz Viotti --- cmake/fetch-github-releases.cmake | 1 - npm/main.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/fetch-github-releases.cmake b/cmake/fetch-github-releases.cmake index 0c8994996..c5cd44d03 100644 --- a/cmake/fetch-github-releases.cmake +++ b/cmake/fetch-github-releases.cmake @@ -13,7 +13,6 @@ foreach(PLATFORM linux-x86_64 linux-arm64 linux-x86_64-musl - linux-arm64-musl windows-x86_64) if(PLATFORM MATCHES "windows") set(OUTPUT_BINARY "${RELEASES_DIR}/jsonschema-${PLATFORM}.exe") diff --git a/npm/main.js b/npm/main.js index e292fb930..e416bb7b8 100644 --- a/npm/main.js +++ b/npm/main.js @@ -22,7 +22,7 @@ function isMusl() { } function getExecutableName() { - if (PLATFORM === 'linux' && (ARCH === 'x86_64' || ARCH === 'arm64') && isMusl()) { + if (PLATFORM === 'linux' && ARCH === 'x86_64' && isMusl()) { return `jsonschema-${PLATFORM}-${ARCH}-musl`; }