Skip to content

Commit

Permalink
linux [pypi]
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Aug 19, 2024
1 parent 56137f7 commit 1bcf15c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-12, macos-13-xlarge, macos-14, ubuntu-24.04, windows-latest ]
os: [ macos-12, macos-13-xlarge, macos-14, ubuntu-latest, windows-latest ]

steps:
- uses: fortran-lang/setup-fortran@main
Expand All @@ -20,7 +20,10 @@ jobs:
version: 13

- run: ln -s $(which gfortran-14) /usr/local/bin/gfortran
if: matrix.os != 'windows-latest'
if: matrix.os != 'windows-latest' && matrix.os != 'ubuntu-latest'

- run: ln -s $(which gfortran-12) /usr/local/bin/gfortran
if: matrix.os == 'ubuntu-latest'

- run: gfortran --version

Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:
run: python -m cibuildwheel --output-dir wheelhouse

- name: Build wheels
if: matrix.os == 'macos-14' || matrix.os == 'ubuntu-24.04' || matrix.os == 'windows-latest'
if: matrix.os == 'macos-14' || matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
env:
MACOSX_DEPLOYMENT_TARGET: 14
CIBW_BUILD: cp311-*
Expand All @@ -69,7 +72,7 @@ jobs:
wheelhouse/*.whl
build-sdist-and-upload:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
needs: [ 'build_wheels' ]
environment: wheels
if: github.repository_owner == 'cmbant'
Expand All @@ -84,7 +87,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.11"
cache: pip
cache-dependency-path: "setup.py"

Expand Down
10 changes: 7 additions & 3 deletions fortran/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,18 @@ FFLAGS = -O3 $(COMMON_FFLAGS)
DEBUGFLAGS = -g -fbacktrace -ffpe-trap=invalid,overflow,zero -fbounds-check $(COMMON_FFLAGS)
ifeq ($(shell uname -s),Darwin)
SFFLAGS = -dynamiclib #-fpic
ifneq ($(shell echo $(compiler_ver) | awk '{print ($$1 >= 14.0)}'),0)
SFFLAGS += -static-libgfortran -static-libgcc -static-libquadmath
endif
else
SFFLAGS = -shared -fpic
ifneq ($(CIBW_BUILD),)
SFFLAGS += -static-libgfortran -static-libgcc
endif

ifneq ($(shell echo $(compiler_ver) | awk '{print ($$1 > 14.0)}'),0)
SFFLAGS += -static-libgfortran -static-libgcc -static-libquadmath
endif



MODOUT = -J$(OUTPUT_DIR)
SMODOUT = -J$(DLL_DIR)

Expand Down

0 comments on commit 1bcf15c

Please sign in to comment.