diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e7e1f544..f89bdfe86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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: | diff --git a/.github/workflows/test_full.yml b/.github/workflows/test_full.yml index dbf68799c..9cdf8d6a7 100644 --- a/.github/workflows/test_full.yml +++ b/.github/workflows/test_full.yml @@ -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 @@ -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 diff --git a/.github/workflows/test_wheels.yml b/.github/workflows/test_wheels.yml index b69d15f74..2f02a2561 100644 --- a/.github/workflows/test_wheels.yml +++ b/.github/workflows/test_wheels.yml @@ -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 diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 000000000..98d9ba5dc --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -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: intel + + - 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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 817faee53..9a7d6abdd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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})