Units module #328
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: Pip | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build with Pip | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [windows-latest, macos-latest, ubuntu-latest, ubuntu-24.04-arm] | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set min macOS version | |
| if: runner.os == 'macOS' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV | |
| - name: Build and install | |
| run: | | |
| python -m pip install pytest | |
| pip install -vv . | |
| - name: Test | |
| run: python -m pytest ./test/python | |
| build_shared: | |
| name: Build with Pip shared lib | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ macos-latest, ubuntu-latest] | |
| python-version: ["3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set min macOS version | |
| if: runner.os == 'macOS' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV | |
| - name: Build and install | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. -DBUILD_SHARED_LIBS=ON -DUNITS_INSTALL=ON -DUNITS_ENABLE_TESTS=OFF | |
| make -j 4 | |
| sudo make install | |
| cd .. | |
| python -m pip install pytest | |
| pip install -vv -C cmake.define.BUILD_SHARED_LIBS:BOOL=ON . | |
| - name: Test | |
| run: | | |
| export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" | |
| export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib" | |
| python -m pytest ./test/python | |
| build_shared_windows: | |
| name: Build with Pip shared lib | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [windows-latest] | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build and install | |
| run: | | |
| python -m pip install pytest | |
| pip install -vv -C cmake.define.BUILD_SHARED_LIBS:BOOL=ON -C cmake.define.UNITS_PYTHON_INSTALL_SHARED_LIBRARY:BOOL=ON . | |
| - name: Test | |
| run: python -m pytest ./test/python |