Skip to content

Commit

Permalink
Merge pull request #68 from lbl-srg/issue61_macOSUniversal
Browse files Browse the repository at this point in the history
Issue61 mac os universal
  • Loading branch information
JayHuLBL authored Sep 12, 2023
2 parents 9f2991f + ef2d7a1 commit 29080f8
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
shell: bash
run: ctest -C $BUILD_TYPE --verbose

- name: Push changes to remote
if: contains(matrix.os, 'latest') && contains(matrix.python-version, '3.9')
- name: Push binaries
if: contains(matrix.os, 'latest') && contains(matrix.python-version, '3.9') && github.event.pull_request.merged == true
run: |
git config --global user.name $GH_USERNAME
git config --global user.email [email protected]
git config --global pull.rebase false
git add ${{ github.workspace }}/pyfunnel/lib
git commit -m "Add ${{ matrix.os }} binaries" --allow-empty
git pull
git add ${{ github.workspace }}/pyfunnel/lib
git diff-index --quiet HEAD || git commit -m "Add ${{ matrix.os }} binaries"
git push
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Change Log

## Version 1.0.0

- Add macOS universal build
- Add support for headless Linux
- Other bug fixes and improvements

## Version 0.3.1

- Add tube size limit to avoid vanishing tube size in case of relative tolerance and low variable value
- Change print format for higher precision (`%.16g`)

## Version 0.3.0

- Add local tolerance parameters `ltolx` and `ltoly`
Expand Down
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
cmake_policy(SET CMP0048 NEW)
cmake_minimum_required(VERSION 3.22)
file(READ "${CMAKE_SOURCE_DIR}/pyfunnel/VERSION" VERSION)

# Configure macOS universal build.
# This should be set prior to the first project() or enable_language() command invocation because
# it may influence configuration of the toolchain and flags.
# This is ignored on platforms other than Apple.
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")

# Set up project.
project(funnel VERSION ${VERSION} LANGUAGES C)
enable_testing()

Expand All @@ -30,7 +38,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
set(MACOSX 1)
message("Mac OS X system detected.")
else()
message(WARNING "OS unknown!")
message(FATAL_ERROR "OS unknown!")
endif()

# Set compiling and linking options.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ By convention, the error is `max(0, y - y_up) - min(0, y - y_low)` and hence it

The software is tested on the following platforms.

* Linux x64
* Windows x64
* macOS
* Linux x64 (Ubuntu 22.04)
* Windows x64 (Windows Server 2022)
* macOS x64 and arm64 (macOS 12)

A Python binding is available to access the library. It is supported on Python versions 3.8 through 3.9.

Expand Down
2 changes: 1 addition & 1 deletion pyfunnel/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.1
1.0.0
Binary file modified pyfunnel/lib/darwin64/libfunnel.dylib
Binary file not shown.
Binary file modified pyfunnel/lib/win64/funnel.dll
Binary file not shown.
Binary file modified pyfunnel/lib/win64/funnel.lib
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/test_bin/results/upperBound.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ x,y
0.048,0.002
0.098,1.002
0.202,1.002
0.249,0.06200000000000061
0.249,0.06199999999999956
0.298,3.002
0.352,3.002
0.402,0.002
Expand Down

0 comments on commit 29080f8

Please sign in to comment.