From ea98114d8833789a595d62bd5eb9e9842aea3ce3 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 15 Oct 2026 16:31:45 -0700 Subject: [PATCH 1/3] add Arm builds to CI --- .github/workflows/build.yml | 6 ++++-- .github/workflows/release.yml | 16 +++++++++------- cmake_modules/package.cmake | 9 +++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbfa3b33..71859c2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,12 +35,14 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] include: - os: windows-latest windows-arch: x64 - os: windows-latest windows-arch: Win32 + - os: windows-11-arm + windows-arch: ARM64 runs-on: ${{matrix.os}} @@ -54,7 +56,7 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build run: | - if [[ "${{ matrix.os }}" == "windows-latest" ]]; then + if [[ -n "${{ matrix.windows-arch }}" ]]; then cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -A ${{ matrix.windows-arch }} $GITHUB_WORKSPACE else cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE $GITHUB_WORKSPACE diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad8d9ffc..8d601005 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,14 @@ jobs: release: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, ubuntu-24.04-arm] include: - os: windows-latest windows-arch: x64 - os: windows-latest windows-arch: Win32 + - os: windows-11-arm + windows-arch: ARM64 runs-on: ${{matrix.os}} @@ -49,7 +51,7 @@ jobs: shell: bash working-directory: ./build run: | - if [[ "${{ matrix.os }}" == "windows-latest" ]]; then + if [[ -n "${{ matrix.windows-arch }}" ]]; then cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -A ${{ matrix.windows-arch }} $GITHUB_WORKSPACE else cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE $GITHUB_WORKSPACE @@ -61,7 +63,7 @@ jobs: run: cmake --build . --parallel --config $BUILD_TYPE --target package - name: Update Python (Windows) - if: matrix.os == 'windows-latest' + if: runner.os == 'Windows' uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.12' @@ -69,7 +71,7 @@ jobs: - name: Sign (Windows zip) if: | startsWith(github.ref, 'refs/tags/') && - matrix.os == 'windows-latest' + runner.os == 'Windows' uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 #v3.5.0 with: inputs: | @@ -78,7 +80,7 @@ jobs: - name: Sign (Linux tgz) if: | startsWith(github.ref, 'refs/tags/') && - matrix.os == 'ubuntu-latest' + runner.os == 'Linux' uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 #v3.5.0 with: inputs: | @@ -87,7 +89,7 @@ jobs: - name: Release (Windows zip) if: | startsWith(github.ref, 'refs/tags/') && - matrix.os == 'windows-latest' + runner.os == 'Windows' uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3 with: draft: true @@ -98,7 +100,7 @@ jobs: - name: Release (Linux tgz) if: | startsWith(github.ref, 'refs/tags/') && - matrix.os == 'ubuntu-latest' + runner.os == 'Linux' uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3 with: draft: true diff --git a/cmake_modules/package.cmake b/cmake_modules/package.cmake index a80577ee..d78df26b 100644 --- a/cmake_modules/package.cmake +++ b/cmake_modules/package.cmake @@ -46,6 +46,15 @@ else() endif() endif() +# By default CPack names packages by OS and pointer size only, so give Arm packages a distinct name. +if(NOT DEFINED CPACK_SYSTEM_NAME) + if(WIN32 AND CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") + set(CPACK_SYSTEM_NAME "win-arm64") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$") + set(CPACK_SYSTEM_NAME "Linux-aarch64") + endif() +endif() + set(CPACK_COMPONENT_INSTALL ON) set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_RPM_COMPONENT_INSTALL ON) From b4588161abb875c4416693e12c46a8a8dd7a8fa4 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 15 Oct 2026 16:34:19 -0700 Subject: [PATCH 2/3] add a build for ARM64EC also --- .github/workflows/build.yml | 2 ++ .github/workflows/release.yml | 2 ++ cmake_modules/package.cmake | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71859c2c..115aef26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,8 @@ jobs: windows-arch: Win32 - os: windows-11-arm windows-arch: ARM64 + - os: windows-11-arm + windows-arch: ARM64EC runs-on: ${{matrix.os}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d601005..b78cff9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,8 @@ jobs: windows-arch: Win32 - os: windows-11-arm windows-arch: ARM64 + - os: windows-11-arm + windows-arch: ARM64EC runs-on: ${{matrix.os}} diff --git a/cmake_modules/package.cmake b/cmake_modules/package.cmake index d78df26b..26ad67a4 100644 --- a/cmake_modules/package.cmake +++ b/cmake_modules/package.cmake @@ -50,6 +50,8 @@ endif() if(NOT DEFINED CPACK_SYSTEM_NAME) if(WIN32 AND CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") set(CPACK_SYSTEM_NAME "win-arm64") + elseif(WIN32 AND CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64EC") + set(CPACK_SYSTEM_NAME "win-arm64ec") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$") set(CPACK_SYSTEM_NAME "Linux-aarch64") endif() From 5c260b54737cdb4e810db43f0276f101e56a9af3 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Fri, 16 Oct 2026 11:31:59 -0700 Subject: [PATCH 3/3] perform the signing job on Ubuntu unconditionally --- .github/workflows/build.yml | 8 ++--- .github/workflows/release.yml | 66 +++++++++++++++-------------------- 2 files changed, 32 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 115aef26..bd7cc6b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,11 +52,11 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Create Build Directory - run: cmake -E make_directory ${{runner.workspace}}/build + run: cmake -E make_directory ./build - name: Run CMake shell: bash - working-directory: ${{runner.workspace}}/build + working-directory: ./build run: | if [[ -n "${{ matrix.windows-arch }}" ]]; then cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -A ${{ matrix.windows-arch }} $GITHUB_WORKSPACE @@ -65,11 +65,11 @@ jobs: fi - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ./build shell: bash run: cmake --build . --parallel 4 --config $BUILD_TYPE #- name: Test - # working-directory: ${{runner.workspace}}/build + # working-directory: ./build # shell: bash # run: ctest -C $BUILD_TYPE diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b78cff9d..db0c612b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ env: BUILD_TYPE: Release jobs: - release: + build: strategy: matrix: os: [ubuntu-latest, ubuntu-24.04-arm] @@ -28,10 +28,6 @@ jobs: runs-on: ${{matrix.os}} - permissions: - contents: write - id-token: write - steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # This isn't working currently, see https://github.com/actions/checkout/issues/1467. @@ -64,48 +60,42 @@ jobs: shell: bash run: cmake --build . --parallel --config $BUILD_TYPE --target package - - name: Update Python (Windows) - if: runner.os == 'Windows' - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + - name: Upload Package + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - python-version: '3.12' + name: package-${{ matrix.os }}${{ matrix.windows-arch && format('-{0}', matrix.windows-arch) || '' }} + path: | + ./build/clintercept-*.zip + ./build/clintercept-*.tar.gz + if-no-files-found: error - - name: Sign (Windows zip) - if: | - startsWith(github.ref, 'refs/tags/') && - runner.os == 'Windows' - uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 #v3.5.0 + # Sign and release on Linux, since the signing tools do not install on Windows on Arm. + release: + needs: build + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + + permissions: + contents: write + id-token: write + + steps: + - name: Download Packages + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - inputs: | - ./build/clintercept-*.zip + pattern: package-* + path: ./packages + merge-multiple: true - - name: Sign (Linux tgz) - if: | - startsWith(github.ref, 'refs/tags/') && - runner.os == 'Linux' + - name: Sign uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 #v3.5.0 with: inputs: | - ./build/clintercept-*.tar.gz - - - name: Release (Windows zip) - if: | - startsWith(github.ref, 'refs/tags/') && - runner.os == 'Windows' - uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3 - with: - draft: true - files: | - ./build/clintercept-*.zip - ./build/clintercept-*.zip.sigstore.json + ./packages/clintercept-* - - name: Release (Linux tgz) - if: | - startsWith(github.ref, 'refs/tags/') && - runner.os == 'Linux' + - name: Release uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3 with: draft: true files: | - ./build/clintercept-*.tar.gz - ./build/clintercept-*.tar.gz.sigstore.json + ./packages/clintercept-*