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
8 changes: 5 additions & 3 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ jobs:
update: true
# OpenBLAS provides both BLAS and LAPACK. The package prefix differs by
# environment (mingw-w64-x86_64-* vs mingw-w64-clang-aarch64-*).
# gcc-fortran (gfortran + gcc/cc), openblas (BLAS+LAPACK), python (for
# patch_sources.py). Package prefix differs by environment.
install: >-
${{ matrix.msystem == 'CLANGARM64'
&& 'mingw-w64-clang-aarch64-gcc-fortran mingw-w64-clang-aarch64-openblas'
|| 'mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-openblas' }}
&& 'mingw-w64-clang-aarch64-gcc-fortran mingw-w64-clang-aarch64-openblas mingw-w64-clang-aarch64-python'
|| 'mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-openblas mingw-w64-x86_64-python' }}

# --- Build -----------------------------------------------------------
- name: Build native binary
Expand All @@ -90,7 +92,7 @@ jobs:
;;
linux-*)
# Static LAPACK/BLAS + Fortran runtime; glibc stays dynamic.
export LAPACK_LIBS="-l:liblapack.a -l:lblas.a"
export LAPACK_LIBS="-l:liblapack.a -l:libblas.a"
export EXTRA_LDFLAGS="-static-libquadmath"
;;
windows-*)
Expand Down
7 changes: 5 additions & 2 deletions native/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ mode="${MPI_MODE:-shim}"
build_dir="$here/build_$mode"
out="${OUT:-$here/amica15_$mode}"
os="$(uname -s)"
cc="${CC:-cc}"
# `cc` is not always present (MSYS2 mingw ships `gcc`, not `cc`); fall back.
cc="${CC:-$(command -v cc 2>/dev/null || command -v gcc 2>/dev/null || echo cc)}"
# patch_sources.py needs a Python; MSYS2 mingw calls it `python`, not `python3`.
python="${PYTHON:-$(command -v python3 2>/dev/null || command -v python 2>/dev/null || echo python3)}"

if [[ "$mode" == "shim" ]]; then
fc="${FC:-gfortran}"
Expand Down Expand Up @@ -53,7 +56,7 @@ work="$build_dir/src"
cp "$src_dir/funmod2.f90" "$src_dir/amica15.f90" "$src_dir/amica15_header.f90" "$work/"

# --- Patch the build copy only (the tracked sources stay the parity reference).
python3 "$here/patch_sources.py" "$work/amica15.f90" "$work/amica15_header.f90"
"$python" "$here/patch_sources.py" "$work/amica15.f90" "$work/amica15_header.f90"

set -x
# Vector-math shim (vrda_exp/vrda_log as libm loops); portable, no AMD LibM.
Expand Down
Loading