Skip to content

Commit

Permalink
fortran compilear 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 536be79
Show file tree
Hide file tree
Showing 5 changed files with 61 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
49 changes: 49 additions & 0 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Builds minimal and runs tests

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: msys2/setup-msys2@v2
with:
msystem: minggw64
path-type: inherit
update: true
install: >-
base-devel git
pacboy: >-
python:p python-pip:p gcc:p cmake:p
- 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 536be79

Please sign in to comment.