Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2dc0c49
Upgrade github actions agents to latest
ezralanglois Jun 10, 2025
36cd08e
Fix bug
ezralanglois Jun 10, 2025
bad3981
Fix more issues
ezralanglois Jun 10, 2025
fe27a83
Upgrade windows compiler
ezralanglois Jun 10, 2025
b7152f0
Improve robustness and downgrade mac for dotnet
ezralanglois Jun 10, 2025
5ef7fce
Try with update arch
ezralanglois Jun 10, 2025
586c4cd
Fix mac
ezralanglois Jun 10, 2025
d57e84f
Fix mac
ezralanglois Jun 10, 2025
f4e9378
Fix mac
ezralanglois Jun 11, 2025
f21b5e9
Fix mac
ezralanglois Jun 11, 2025
a200279
Fix mac
ezralanglois Jun 11, 2025
4e08b80
Fix mac
ezralanglois Jun 11, 2025
5d5f7da
Fix mac
ezralanglois Jun 11, 2025
017b760
Fix mac
ezralanglois Jun 11, 2025
a630a86
Fix mac
ezralanglois Jun 11, 2025
d52b8f3
Fix mac
ezralanglois Jun 11, 2025
9494b28
Fix bug
ezralanglois Jun 11, 2025
a7ccca7
Fix bug
ezralanglois Jun 11, 2025
caa48d5
Fix bug
ezralanglois Jun 11, 2025
9fe294b
Fix bug
ezralanglois Jun 11, 2025
f4488d7
Fix mac bug
ezralanglois Jun 11, 2025
7fa45e8
Tmp fix windows
ezralanglois Jun 11, 2025
4941901
Tmp fix windows
ezralanglois Jun 11, 2025
48c7b8c
Tmp fix windows
ezralanglois Jun 11, 2025
f7e8be8
Fix missing arg
ezralanglois Jun 11, 2025
b8a80d1
Try reducing threads
ezralanglois Jun 12, 2025
dd5c668
Fix bug
ezralanglois Jun 12, 2025
cfdd739
Try another fix
ezralanglois Jun 12, 2025
bf39eef
Try another windows VM
ezralanglois Jun 12, 2025
474b98c
Try something more
ezralanglois Jun 12, 2025
2ac5fc2
Another fix
ezralanglois Jun 13, 2025
2fb32e8
Ensure taking fix
ezralanglois Jun 13, 2025
a77756d
Try fix
ezralanglois Jun 13, 2025
088f42a
Fix again
ezralanglois Jun 13, 2025
f78c405
Try updating swig
ezralanglois Jun 14, 2025
a57a523
Add token
ezralanglois Jun 14, 2025
171f2a2
Workaround MSVC segfault
ezralanglois Jun 14, 2025
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
12 changes: 6 additions & 6 deletions .github/workflows/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ jobs:
git --version

- name: Configure Windows
if: matrix.os == 'windows-latest'
if: ${{ startsWith(matrix.os, 'windows') }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change the name from 2019 to latest, then this will prevent bugs

run: cmake ${{github.workspace}} -Ax64 -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=OFF -DENABLE_PORTABLE=ON -DDISABLE_PACKAGE_SUBDIR=ON

- name: Configure OSX
if: matrix.os == 'macOS-latest'
if: ${{ startsWith(matrix.os, 'macOS') }}
run: cmake ${{github.workspace}} -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=OFF -DENABLE_PORTABLE=ON -DDISABLE_PACKAGE_SUBDIR=ON

- name: Build OSX and Windows
if: matrix.os != 'ubuntu-latest'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}}

- name: Test OSX and Windows
if: matrix.os != 'ubuntu-latest'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}} --target check

- name: Package OSX and Windows
if: matrix.os != 'ubuntu-latest'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}} --target bundle

- name: Linux Build, Test and Package in Docker
if: matrix.os == 'ubuntu-latest'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop bash -c "cmake /io -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=/io/dist -DENABLE_SWIG=OFF -DENABLE_PORTABLE=ON -DDISABLE_PACKAGE_SUBDIR=ON && cmake --build build && cmake --build build --target check && cmake --build build --target bundle"

- name: Test Artifacts
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-13]
os: [ubuntu-latest, windows-latest, macOS-latest]
buildtype: ["Debug", "Release"]

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix crash when using the wrong dotnet core

with:
dotnet-version: '8.0.x'

- name: Setup Git name
run: |
Expand All @@ -28,31 +31,31 @@ jobs:
mkdir dist

- name: Configure Windows
if: matrix.os == 'windows-latest'
if: ${{ startsWith(matrix.os, 'windows') }}
run: cmake ${{github.workspace}} -Ax64 -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp8

- name: Install Swig
if: matrix.os == 'macOS-13'
if: ${{ startsWith(matrix.os, 'macOS') }}
run: pip install swig==4.0.2 --prefix="$(pwd)/usr"

- name: Configure OSX
if: matrix.os == 'macOS-13'
run: cmake ${{github.workspace}} -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp8 -DSWIG_EXECUTABLE=$(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/bin/swig) -DSWIG_DIR=$(dirname $(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/share/swig/4.0.2/swig.swg))
if: ${{ startsWith(matrix.os, 'macOS') }}
run: cmake ${{github.workspace}} -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp9 -DSWIG_EXECUTABLE=$(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/bin/swig) -DSWIG_DIR=$(dirname $(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/share/swig/4.0.2/swig.swg)) -DDotNetStandard_EXECUTABLE=${{env.DOTNET_ROOT}}/dotnet

- name: Build OSX and Windows
if: matrix.os != 'ubuntu-latest'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}}

- name: Test OSX and Windows
if: matrix.os != 'ubuntu-latest'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}} --target check

- name: Package OSX and Windows
if: matrix.os != 'ubuntu-latest'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}} --target nupack

- name: Linux Build, Test and Package in Docker
if: matrix.os == 'ubuntu-latest'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop bash -c "cmake /io -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=/io/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF && cmake --build build && cmake --build build --target check && cmake --build build --target nupack"

- name: Test Artifacts
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macOS-13]
os: [ubuntu-latest, windows-latest, macOS-latest]
pyver: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
Expand All @@ -37,38 +37,38 @@ jobs:
git --version

- name: Package Python 3.8 and earlier
if: matrix.os == 'ubuntu-latest' && matrix.pyver != '3.9' && matrix.pyver != '3.10' && matrix.pyver != '3.11' && matrix.pyver != '3.12' && matrix.pyver != '3.13'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.pyver == '3.8' }}
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop sh /io/tools/package.sh /io /io/dist travis OFF

- name: Package Python 3.9
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.9'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.pyver == '3.9' }}
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp39-cp39

- name: Package Python 3.10
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.10'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.pyver == '3.10' }}
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp310-cp310

- name: Package Python 3.11
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.11'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.pyver == '3.11' }}
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp311-cp311

- name: Package Python 3.12
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.12'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.pyver == '3.12' }}
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp312-cp312

- name: Package Python 3.13
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.13'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.pyver == '3.13' }}
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp313-cp313

- name: Windows Package Python
if: matrix.os == 'windows-2019'
if: ${{ startsWith(matrix.os, 'windows') }}
shell: cmd
run: |
python -m pip install --upgrade pip setuptools wheel numpy
tools\package.bat Release "Visual Studio 16 2019" package_wheel "-DENABLE_APPS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=OFF -DPython_EXECUTABLE=${{ steps.cpver.outputs.python-path }}" -DENABLE_PORTABLE=ON -A x64
tools\package.bat Release "Visual Studio 17 2022" package_wheel "-DENABLE_APPS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=OFF -DPython_EXECUTABLE=${{ steps.cpver.outputs.python-path }} -DENABLE_PORTABLE=ON"

- name: Mac OSX Package Python
if: matrix.os == 'macOS-latest' || matrix.os == 'macOS-13'
if: ${{ startsWith(matrix.os, 'macOS') }}
run: bash ./tools/package.sh ${{github.workspace}} ${{github.workspace}}/dist travis OFF Release ${{matrix.pyver}}

- uses: actions/upload-artifact@v4
Expand Down
8 changes: 8 additions & 0 deletions cmake/Modules/csharp/UseCSharpProjectBuilder.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ macro( csharp_add_project type name )
message(STATUS "DotNetStandard_FOUND=${DotNetStandard_FOUND}")
message(STATUS "CSBUILD_NUSPEC_FILE=${CSBUILD_NUSPEC_FILE}")

set(IPA_VALID_ARM64_PROCESSORS "aarch64;ARM64;arm64")
if(CMAKE_SYSTEM_PROCESSOR IN_LIST IPA_VALID_ARM64_PROCESSORS)
set(DotNetCore_PLATFORM "arm64" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium")
else()
set(DotNetCore_PLATFORM "x64" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium")
endif()

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake/ConfigureFile.cmake "configure_file(\${CONFIG_INPUT_FILE} \${CONFIG_OUTPUT_FILE} @ONLY)")
set(CSBUILD_${name}_CSPROJ "${name}_${CSBUILD_CSPROJ}")
file(TO_NATIVE_PATH ${CSHARP_BUILDER_OUTPUT_PATH} CSHARP_BUILDER_OUTPUT_PATH_NATIVE)
Expand All @@ -172,6 +179,7 @@ macro( csharp_add_project type name )
-DCSHARP_BUILDER_SOURCES="${CSHARP_BUILDER_SOURCES}"
-DCSHARP_TARGET_FRAMEWORK_VERSION="${CSHARP_TARGET_FRAMEWORK_VERSION}"
-DCSHARP_PACKAGE_REFERENCES="${CSHARP_PACKAGE_REFERENCES}"
-DDotNetCore_PLATFORM="${DotNetCore_PLATFORM}"
-DMSBUILD_TOOLSET="${MSBUILD_TOOLSET}"
-DCSHARP_IMPORTS="${CSHARP_IMPORTS}"
-DCONFIG_INPUT_FILE="${CSBUILD_CSPROJ_IN}"
Expand Down
1 change: 1 addition & 0 deletions cmake/Modules/csharp/dotnetStandard.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<OutputPath>@CSHARP_BUILDER_OUTPUT_PATH@</OutputPath>
<PlatformTarget>@CSHARP_PLATFORM@</PlatformTarget>
<AssemblyName>@CSHARP_BUILDER_OUTPUT_NAME@</AssemblyName>
<PlatformTarget>@DotNetCore_PLATFORM@</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
Expand Down
8 changes: 8 additions & 0 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changes {#changes}

## v1.6.0

| Date | Description |
|------------|------------------------------------------------------------------------|
| 2025-06-11 | Add support for ARM Mac |
| 2025-06-10 | Upgrade github actions agents to latest |
| 2025-06-10 | Update to Visual Studio 17 2022 (workaround segfault in MSVC compiler) |

## v1.5.0

| Date | Description |
Expand Down
10 changes: 9 additions & 1 deletion src/ext/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,15 @@ foreach(SRC ${SWIG_SRCS})
set(SWIG_MODULE ${SWIG_MODULE_${MODULE}_REAL_NAME})

if(PYTHON_GENERATED_COMPILE_FLAGS)
set_target_properties(${SWIG_MODULE} PROPERTIES COMPILE_FLAGS "${PYTHON_GENERATED_COMPILE_FLAGS}")
if(MSVC) # Workaround compiler bug
if(SRC MATCHES "metrics.i$")
set_target_properties(${SWIG_MODULE} PROPERTIES COMPILE_FLAGS "${PYTHON_GENERATED_COMPILE_FLAGS} /Od")
else()
set_target_properties(${SWIG_MODULE} PROPERTIES COMPILE_FLAGS "${PYTHON_GENERATED_COMPILE_FLAGS}")
endif()
else()
set_target_properties(${SWIG_MODULE} PROPERTIES COMPILE_FLAGS "${PYTHON_GENERATED_COMPILE_FLAGS}")
endif()
endif()

if(PYTHON_GENERATED_LINK_FLAGS)
Expand Down
2 changes: 1 addition & 1 deletion tools/package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ rem ----------------------------------------------------------------------------

rem https://github.com/actions/setup-python/issues/121
echo %PREFIX_BEG% Configure %SUFFIX%
cmake %SOURCE_DIR% -G%COMPILER% -B%BUILD_DIR% %BUILD_PARAM%
cmake %SOURCE_DIR% -G%COMPILER% -B%BUILD_DIR% %BUILD_PARAM% -A x64

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix crash when trying to accidentally build 32-bit version

if "%errorlevel%" == "0" goto CONFIGURE_SUCCESS
set level=%errorlevel%
type %BUILD_DIR%\CMakeFiles\CMakeError.log
Expand Down
Loading