Skip to content

Commit

Permalink
Merge pull request #2 from vegardjervell/ci_actions
Browse files Browse the repository at this point in the history
Tweaking runs 5 (moving tweaks from dummies to real workflows)
  • Loading branch information
vegardjervell authored Oct 11, 2024
2 parents 97a92f7 + 05dfc33 commit 406f2b9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 59 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/before_windows_build.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#Set-PSDebug -Trace 1
echo "Running before_build on windows ..."
$tp_version = $args[0]

echo "Running before_build on windows for version $tp_version"
mkdir build
echo "Created build dir ..."
cd build
echo "Moved into build dir ..."
cmake .. -G Ninja -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release
echo "cmake finished ..."
cmake --build . --config=Release --target install
echo "build finished ..."
# python -c "import sys; sys.path.insert(0, '../addon/pycThermopack'); import makescript; makescript.windows_make('v3')"
python ../addon/pycThermopack/map_platform_specifics.py --diffs=v3 --ifort=True
python ../addon/pycThermopack/map_platform_specifics.py --diffs=$tp_version --ifort=True
echo "--- pycThermopack contents ---"
dir ../addon/pycThermopack
echo "--- pycThermopack/thermopack contents ---"
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: cibuildwheel

on: []
on:
push:
branches:
- main
pull_request:

jobs:
build_wheels:
if: github.ref == 'refs/heads/main' || github.event_name != 'push'
name: Build ${{ matrix.tp_version }} wheels on ${{ matrix.os }}-${{ matrix.version }}
runs-on: ${{ matrix.os }}-${{ matrix.version }}
timeout-minutes: 30
Expand Down Expand Up @@ -57,9 +62,9 @@ jobs:
CIBW_BEFORE_ALL_LINUX: |
yum install -y blas blas-devel
yum install -y lapack lapack-devel
CIBW_BEFORE_BUILD_WINDOWS: powershell -ExecutionPolicy Bypass -File .github/scripts/before_windows_build.ps1
CIBW_BEFORE_BUILD_WINDOWS: powershell -ExecutionPolicy Bypass -File .github/scripts/before_windows_build.ps1 ${{ matrix.tp_version }}

CIBW_BEFORE_BUILD: |
${{ env.gfortran }} --version
export FC=${{ env.gfortran }}
Expand Down Expand Up @@ -91,7 +96,7 @@ jobs:

release_wheels: # Create or update the release tagged Latest-beta, and upload wheels to that release.
name: Update prerelease
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build_wheels
runs-on: ubuntu-latest
permissions:
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/dummy_build.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/dummy_test.yml

This file was deleted.

13 changes: 5 additions & 8 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: unittests

on: []
on:
push:
branches:
- main
pull_request:

jobs:
run-tests:
Expand All @@ -13,15 +17,8 @@ jobs:
toolchain:
- {compiler: gcc, version: 13}
include:
# - os: ubuntu-latest
# toolchain: {nvidia-hpc, version: '23.11'}
# - os: windows-2022
# toolchain: {compiler: intel, version: '2024.1'}
- os: windows-2022
toolchain: {compiler: intel-classic, version: '2021.12'}
# exclude:
# - os: windows-latest
# toolchain: {compiler: gcc, version: 13}

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ if(MSVC)
target_link_options(thermopack PRIVATE "/NODEFAULTLIB:libmmd" "/NODEFAULTLIB:MSVCRT" "/NODEFAULTLIB:libifcoremd" "/NODEFAULTLIB:svml_dispmd")
else(MSVC)
if(APPLE)
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${CMAKE_SOURCE_DIR}/libthermopack_export.symbols")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../libthermopack_export.symbols")
else(APPLE)
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/libthermopack_export.version")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../libthermopack_export.version")
endif(APPLE)
add_library(thermopack SHARED $<TARGET_OBJECTS:libthermopack>)
set_target_properties(thermopack PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
Expand Down

0 comments on commit 406f2b9

Please sign in to comment.