Skip to content

Commit

Permalink
fortran compiler for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
j042 committed Apr 29, 2024
1 parent 5b46a59 commit 3f005f0
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 16 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -24,24 +24,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 11

- name: install dependencies
run: pip install numpy

- name: build splinepy minimal/debug/warning
if: matrix.os != 'windows-latest'
run: |
pip install ".[test]" -v --config-settings=cmake.args="-DSPLINEPY_MORE=OFF;-DSPLINEPY_ENABLE_WARNINGS=ON" --config-settings=cmake.build-type="Debug"
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 11

- name: build splinepy windows
if: matrix.os == 'windows-latest'
- name: build
run: |
pip install ".[test]" -v --config-settings=cmake.args="-DSPLINEPY_MORE=OFF"
pip install ".[test]" -v --config-settings=cmake.args="-DSPLINEPY_MORE=OFF;-DSPLINEPY_ENABLE_WARNINGS=ON" --config-settings=cmake.build-type="Debug"
- name: test
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [ubuntu-20.04, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +26,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: fortran-lang/setup-fortran@v1
- name: setup fortran non window
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.cw_build }}
CIBW_TEST_SKIP: "*-macosx_arm64"
FC: "gfortran"
SPLINEPY_GITHUB_ACTIONS_BUILD: True

- uses: actions/upload-artifact@v3
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test build on windows

on:
push

permissions:
contents: read

jobs:
build_and_tests:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [windows-latest]

steps:
- name: build splinepy windows
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ifx

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}


- name: install dependencies
run: pip install numpy

- name: build windows
run: |
pip install ".[test]" -v --config-settings=cmake.args="-DSPLINEPY_MORE=OFF"
- name: test
run: |
pytest tests
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif(SPLINEPY_MORE)

add_library(slsqp ${SPLINEPY_SLSQP_SRCS})
add_library(splinepy::slsqp ALIAS slsqp)
target_compile_options(slsqp PRIVATE -O3 -std=legacy)
target_compile_options(slsqp PRIVATE -std=legacy -O3 -fPIC)

# target
add_library(splinepy ${SPLINEPY_LIB_TYPE} ${SPLINEPY_SRCS})
Expand Down

0 comments on commit 3f005f0

Please sign in to comment.