mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-06-28 13:29:28 +00:00
fix(ci): scope disableMarchNative to linux amd64 release builds
This commit is contained in:
parent
36f28c6cf2
commit
522caab316
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user