Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
Build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
if: ${{ !contains(github.event.pull_request.labels.*.name, 'docs-only') }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -24,3 +24,49 @@ jobs:
use_conda: true
check_import: true
python: ${{ matrix.python }}

build_wheels:
name: Test wheel building on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: manylinux
- os: macos-latest
platform: mac
- os: windows-latest
platform: windows

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install cibuildwheel
run: pipx install cibuildwheel==2.23.1

- name: Build wheels
run: cibuildwheel --output-dir wheelhouse .

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.platform }}
path: wheelhouse/*.whl

build_sdist:
name: Test source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,10 @@ scripts/
ext/**
external/
**/external/

# ------------------------------------------------------------------------------
# cibuildwheel
# ------------------------------------------------------------------------------

wheelhouse
wheelhouse/**
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

* Added MeshSolver class.
* Added documentation for cibuildwheel.

### Changed

* Fix circular Solver import.
* Fix build.yml to match release.yml.
* Fix license files.

### Removed

Expand Down
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ option(ENABLE_PRECOMPILED_HEADERS "Enable precompiled headers" ON)
option(FAST_COMPILE "Optimize for faster compilation (-O0) vs execution (-O3)" OFF)
option(USE_OPENMP "Enable OpenMP support for parallel processing" OFF)

# Apply optimization flags
# Apply optimization flags in a cross-platform way
if(FAST_COMPILE)
add_compile_options(-O0)
if(MSVC)
add_compile_options(/Od) # Disable optimization (MSVC)
else()
add_compile_options(-O0) # Disable optimization (GCC/Clang)
endif()
else()
add_compile_options(-O3)
if(MSVC)
add_compile_options(/O2) # Optimize for speed (MSVC)
else()
add_compile_options(-O3) # Optimize for speed (GCC/Clang)
endif()
endif()

# ==============================================================================
Expand Down
Loading
Loading