From 522caab316ff0524e7de930375ac4d3762886c78 Mon Sep 17 00:00:00 2001 From: Marcin Czenko Date: Mon, 22 Jun 2026 14:27:27 +0200 Subject: [PATCH] fix(ci): scope disableMarchNative to linux amd64 release builds --- .github/workflows/release.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78cd4c83..6e19b979 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,16 +104,22 @@ jobs: echo "storage_binary=${storage_binary}" >>$GITHUB_ENV echo "c_bindings_lib=${c_bindings_lib}" >>$GITHUB_ENV - - name: Build Logos Storage binary + - name: Compute platform Nim flags + id: platform-nim-flags + shell: bash run: | - nim_flags="${{ env.nim_flags }}" + platform_nim_flags="" # secp256k1's x86_64 inline asm can hit a GCC register-allocation # failure when -march=native expands against this runner's CPU, so # pin a fixed baseline instead. arm64/macOS don't use that asm path. if [[ "${{ matrix.os }}" == "linux" && "${{ matrix.cpu }}" == "amd64" ]]; then - nim_flags="${nim_flags} -d:disableMarchNative" + platform_nim_flags="-d:disableMarchNative" fi - make NIMFLAGS="--out:${{ env.build_dir }}/${{ env.storage_binary }} ${nim_flags}" + echo "nim_flags=${platform_nim_flags}" >> "$GITHUB_OUTPUT" + + - name: Build Logos Storage binary + run: | + make NIMFLAGS="--out:${{ env.build_dir }}/${{ env.storage_binary }} ${{ env.nim_flags }} ${{ steps.platform-nim-flags.outputs.nim_flags }}" - name: Package ${{ env.storage_binary_base }} Linux (compress and preserve perms) if: matrix.os == 'linux' @@ -160,20 +166,20 @@ jobs: if: matrix.os == 'linux' run: | make -j${ncpu} update - make -j${ncpu} NIMFLAGS="-d:disableMarchNative" libstorage + make -j${ncpu} NIMFLAGS="${{ steps.platform-nim-flags.outputs.nim_flags }}" libstorage - name: Build ${{ env.c_bindings_lib_base }} (MacOS) if: matrix.os == 'macos' run: | make -j${ncpu} update - STORAGE_LIB_PARAMS="--passL:\"-Wl,-install_name,@rpath/${{ env.c_bindings_lib_base }}.dylib\"" make -j${ncpu} NIMFLAGS="-d:disableMarchNative" libstorage + STORAGE_LIB_PARAMS="--passL:\"-Wl,-install_name,@rpath/${{ env.c_bindings_lib_base }}.dylib\"" make -j${ncpu} NIMFLAGS="${{ steps.platform-nim-flags.outputs.nim_flags }}" libstorage - name: Build ${{ env.c_bindings_lib_base }} (Windows) if: matrix.os == 'windows' shell: msys2 {0} run: | make -j${ncpu} update - make -j${ncpu} NIMFLAGS="-d:disableMarchNative" libstorage + make -j${ncpu} NIMFLAGS="${{ steps.platform-nim-flags.outputs.nim_flags }}" libstorage - name: Package ${{ env.c_bindings_lib_base }} Linux if: matrix.os == 'linux'