C/C++ MacOS ARM64 #61
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C/C++ MacOS ARM64 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # token: ${{ secrets.ORG_ACTIONS_ACCESS }} | |
| #- name: get QuantLib | |
| # run: | | |
| # git submodule update --init --recursive | |
| - name: Install Boost | |
| run: | | |
| curl -O -L https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz | |
| tar xfz boost_1_84_0.tar.gz | |
| cd boost_1_84_0 | |
| sudo ./bootstrap.sh | |
| sudo ./b2 architecture=arm address-model=64 -s NO_LZMA=1 -s NO_ZSTD=1 abi=aapcs install | |
| - name: Install Swig | |
| run: | | |
| brew install swig | |
| - name: cmake configure and build | |
| run: | | |
| mkdir build | |
| cd build | |
| sudo cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64 -DORE_USE_ZLIB=ON -DORE_BUILD_SWIG=OFF -DORE_BUILD_DOC=OFF -DORE_BUILD_EXAMPLES=OFF -DORE_BUILD_TESTS=OFF -DORE_BUILD_APP=ON -DQL_BUILD_BENCHMARK=OFF -DQL_BUILD_EXAMPLES=OFF -DQL_BUILD_TEST_SUITE=OFF -DQL_ENABLE_SESSIONS=ON -DCMAKE_BUILD_TYPE=Release .. | |
| sudo cmake --build . -j4 | |
| sudo cmake --install . | |
| - name: Wrap ORE-SWIG for Python Wheels | |
| run: | | |
| pwd | |
| cd ORE-SWIG | |
| sudo python -m pip install setuptools | |
| cp Wheels/oreanalytics-config.macos oreanalytics-config | |
| chmod +x oreanalytics-config | |
| cd OREAnalytics-SWIG | |
| ls -al | |
| cd SWIG | |
| ls -al | |
| sudo chmod +x oreanalytics.i | |
| cd .. | |
| cd .. | |
| ls -al | |
| pwd | |
| python setup.py wrap | |
| - name: Build Wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_SKIP: cp36-* | |
| #CIBW_BUILD: cp311-macosx_arm64 | |
| CIBW_ARCHS_MACOS: arm64 | |
| MACOSX_DEPLOYMENT_TARGET: "13.7" | |
| CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=13.7 | |
| CXXFLAGS: -std=c++17 -g0 -O3 -mmacosx-version-min=13.7 | |
| CIBW_BUILD_VERBOSITY: 2 | |
| CIBW_REPAIR_WHEEL_COMMAND_MACOS: > | |
| DYLD_LIBRARY_PATH=/usr/local/lib delocate-listdeps {wheel} && | |
| DYLD_LIBRARY_PATH=/usr/local/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel} | |
| with: | |
| package-dir: ${{ github.workspace }}/ORE-SWIG | |
| - name: Save wheels as artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-macos-arm64 | |
| path: ./wheelhouse/*.whl |