Increment version #460
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ "*" ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build_cmake: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-latest, ubuntu-latest, windows-latest ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build CMake targets | |
| run: | | |
| mkdir cmake-build-release | |
| cd cmake-build-release | |
| cmake .. -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . | |
| build_wheels: | |
| runs-on: ${{ matrix.target[0] }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: # [ os, cibuildwheel-platform ] | |
| - [ macos-latest, macosx_x86_64 ] | |
| - [ macos-latest, macosx_arm64 ] | |
| - [ ubuntu-latest, manylinux_aarch64 ] | |
| - [ ubuntu-latest, manylinux_x86_64 ] | |
| - [ windows-latest, win_amd64 ] | |
| python-version: [ "cp39-", "cp310-", "cp311-", "cp312-", "cp313-", "cp314-" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| - if: matrix.target[0] == 'ubuntu-latest' | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: all | |
| - name: Build wheel | |
| uses: pypa/cibuildwheel@v3.4.1 | |
| env: | |
| CIBW_ARCHS: all | |
| CIBW_BUILD: ${{ matrix.python-version }}${{ matrix.target[1] }} | |
| CIBW_BEFORE_TEST: pip install matplotlib scipy | |
| CIBW_TEST_COMMAND: >- | |
| cd {project}/Examples/Python && | |
| python advanced_example.py dont_block && | |
| python compass_vs_ahrs.py dont_block && | |
| python simple_example.py dont_block && | |
| python test_convert.py | |
| python test_model.py | |
| python test_remap.py | |
| CIBW_TEST_COMMAND_WINDOWS: >- | |
| cd /D {project}/Examples/Python && | |
| python advanced_example.py dont_block && | |
| python compass_vs_ahrs.py dont_block && | |
| python simple_example.py dont_block && | |
| python test_convert.py | |
| python test_model.py | |
| python test_remap.py | |
| CIBW_TEST_SKIP: "*-macosx_arm64" # fix CI warning | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: wheel-${{ matrix.python-version }}${{ matrix.target[1] }} | |
| path: wheelhouse/* | |
| build_sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install numpy | |
| - name: Build sdist | |
| run: python setup.py sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: sdist | |
| path: dist/* | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: [ build_wheels, build_sdist ] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install twine | |
| python -m pip install -U packaging | |
| # https://github.com/pypa/twine/issues/1216#issuecomment-2606531615 | |
| - name: Publish package | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYTHON_TOKEN }} | |
| run: python -m twine upload --verbose --repository pypi artifacts/* --skip-existing |