From 8db0946ce024906954ab848ea5f1da1a4b7a6c83 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Fri, 19 Jul 2024 12:33:03 +0200 Subject: [PATCH] Fix build pycfml lib cmd --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++-- scripts.toml | 8 ++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65f9f31..3730674 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }} @@ -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 }} diff --git a/scripts.toml b/scripts.toml index 579c64e..da1d10e 100644 --- a/scripts.toml +++ b/scripts.toml @@ -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 = '' @@ -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 = '' @@ -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 @@ -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 = ''