Skip to content

Commit

Permalink
Fix build pycfml lib cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSazonov committed Jul 19, 2024
1 parent 461de7f commit 8db0946
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-22.04, windows-2022, macos-12, macos-14]
toolchain:
- { exe: gfortran, compiler: gcc, version: 13 }
- { exe: ifort, compiler: intel-classic, version: "2021.10" }
- { exe: ifx, compiler: intel, version: "2023.2" }
exclude:
- os: macos-12
toolchain: { exe: ifx, compiler: intel, version: "2023.2" } # no support for macOS
- os: macos-14
toolchain: { exe: ifx, compiler: intel, version: "2023.2" } # no support for macOS on arm64
- os: macos-14
toolchain: { exe: ifort, compiler: intel-classic, version: "2021.10" } # no support for macOS on arm64

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -170,7 +181,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-22.04, windows-2022, macos-12, macos-14]
toolchain:
- { exe: gfortran, compiler: gcc, version: 13 }
- { exe: ifort, compiler: intel-classic, version: "2021.10" }
- { exe: ifx, compiler: intel, version: "2023.2" }
exclude:
- os: macos-12
toolchain: { exe: ifx, compiler: intel, version: "2023.2" } # no support for macOS
- os: macos-14
toolchain: { exe: ifx, compiler: intel, version: "2023.2" } # no support for macOS on arm64
- os: macos-14
toolchain: { exe: ifort, compiler: intel-classic, version: "2021.10" } # no support for macOS on arm64

runs-on: ${{ matrix.os }}

Expand Down
8 changes: 4 additions & 4 deletions scripts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ run-benchmarks.non-master-branch = '--benchmark-compare --benchmark-compare-fail
platforms = ['macos', 'linux', 'windows']
compilers = ['gfortran']
obj-ext = 'o'
build-shared = '{COMPILER} -shared CFML_Wraps.{OBJ_EXT} Wraps_*.{OBJ_EXT} {PATH}.{OBJ_EXT} -o {PATH}.{EXT} -L{CFML_LIB_PATH} -l{CFML_LIB_NAME} {PYTHON_LIB}'
build-shared = '{COMPILER} -shared *.{OBJ_EXT} {PATH}.{OBJ_EXT} -o {PATH}.{EXT} -L{CFML_LIB_PATH} -l{CFML_LIB_NAME} {PYTHON_LIB}'
build-exe = '{COMPILER} {OPTIONS} -o {EXE_NAME} {SOURCE_PATH} -I {CFML_INCLUDE_PATH} -L{CFML_LIB_DIR} -l{CFML_LIB_NAME}'
modes.base = '-cpp -fdec-math -fPIC -fno-stack-arrays -ffree-line-length-none'
modes.debug = ''
Expand All @@ -91,7 +91,7 @@ modes.release = ''
platforms = ['macos']
compilers = ['nagfor']
obj-ext = 'o'
build-shared = '{COMPILER} -Wl,-shared CFML_Wraps.{OBJ_EXT} Wraps_*.{OBJ_EXT} {PATH}.{OBJ_EXT} -o {PATH}.{EXT} -L{CFML_LIB_PATH} -l{CFML_LIB_NAME} {PYTHON_LIB}'
build-shared = '{COMPILER} -Wl,-shared *.{OBJ_EXT} {PATH}.{OBJ_EXT} -o {PATH}.{EXT} -L{CFML_LIB_PATH} -l{CFML_LIB_NAME} {PYTHON_LIB}'
build-exe = '{COMPILER} {OPTIONS} -o {EXE_NAME} {SOURCE_PATH} -I {CFML_INCLUDE_PATH} -L{CFML_LIB_DIR} -l{CFML_LIB_NAME}'
modes.base = '-f2008 -fpp -PIC -quiet -w=all -colour'
modes.debug = ''
Expand All @@ -101,7 +101,7 @@ modes.release = ''
platforms = ['linux', 'macos']
compilers = ['ifort', 'ifx']
obj-ext = 'o'
build-shared = "{COMPILER} -shared CFML_Wraps.{OBJ_EXT} Wraps_*.{OBJ_EXT} {PATH}.{OBJ_EXT} -o {PATH}.{EXT} -L{CFML_LIB_PATH} -l{CFML_LIB_NAME} {IFPORT_LIB} {PYTHON_LIB}"
build-shared = "{COMPILER} -shared *.{OBJ_EXT} {PATH}.{OBJ_EXT} -o {PATH}.{EXT} -L{CFML_LIB_PATH} -l{CFML_LIB_NAME} {IFPORT_LIB} {PYTHON_LIB}"
build-exe = '{COMPILER} {OPTIONS} -o {EXE_NAME} {SOURCE_PATH} -I {CFML_INCLUDE_PATH} -L{CFML_LIB_DIR} -l{CFML_LIB_NAME}'
modes.base = '-w -fpp -fPIC -heap-arrays -nologo'
modes.debug = '' # -g3
Expand All @@ -111,7 +111,7 @@ modes.release = '' # -O3
platforms = ['windows']
compilers = ['ifort', 'ifx']
obj-ext = 'obj'
build-shared = 'link CFML_Wraps.{OBJ_EXT} Wraps_*.{OBJ_EXT} {PATH}.{OBJ_EXT} /out:"{PATH}.{EXT}" /libpath:{CFML_LIB_PATH} /dll {CFML_LIB_NAME}.lib {PYTHON_LIB}'
build-shared = 'link *.{OBJ_EXT} {PATH}.{OBJ_EXT} /out:"{PATH}.{EXT}" /libpath:{CFML_LIB_PATH} /dll {CFML_LIB_NAME}.lib {PYTHON_LIB}'
build-exe = '{COMPILER} {OPTIONS} /exe:{EXE_NAME} {SOURCE_PATH} -I {CFML_INCLUDE_PATH} {CFML_LIB_DIR}\{CFML_LIB_NAME}.{LIB_EXT}'
modes.base = '/w /fpp /heap-arrays /nologo -DWIN32=ON'
modes.debug = ''
Expand Down

0 comments on commit 8db0946

Please sign in to comment.