Skip to content

Upgrade Eigen

Upgrade Eigen #2682

Workflow file for this run

name: Build
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-native:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
# Windows, Linux, macOS x86_64, macOS arm64
os: [windows-2022, ubuntu-22.04, macOS-13, macOS-14]
name: "${{ matrix.os }} - native"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -B build -S . -DBUILD_EXAMPLES=ON
- name: Build
run: cmake --build build --config RelWithDebInfo --parallel $(nproc)
- name: Test
working-directory: build
run: ctest -C RelWithDebInfo --output-on-failure
- name: Install
run: cmake --install build --config RelWithDebInfo --prefix pkg
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} - native
path: pkg
build-python:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
# Windows, Linux, macOS x86_64, macOS arm64
os: [windows-2022, ubuntu-22.04, macOS-13, macOS-14]
version: ['3.9', '3.10', '3.11', '3.12']
exclude:
- os: macOS-14
version: '3.9'
name: "${{ matrix.os }} - python ${{ matrix.version }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
- name: Update version string
run: python3 ./tools/update_version.py
- name: Install build and tox Python packages
run: pip3 install build tox
- name: Build
run: python3 -m build
- name: Repair wheel
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
run: python3 ../.github/workflows/repair_wheel.py sleipnirgroup_jormungandr-*.whl
working-directory: dist
- name: Test
run: python3 -m tox -e ${{ matrix.version }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} - python ${{ matrix.version }}
path: dist
build-cross:
strategy:
fail-fast: false
matrix:
include:
- artifact-name: roboRIO
container: wpilib/roborio-cross-ubuntu:2024-22.04
toolchain: /usr/local/toolchain-config.cmake
name: "${{ matrix.artifact-name }}"
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -B build -S . --toolchain ${{ matrix.toolchain }} -DBUILD_EXAMPLES=ON
- name: Build
run: cmake --build build --config RelWithDebInfo --parallel $(nproc)
- name: Install
run: cmake --install build --config RelWithDebInfo --prefix pkg
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: pkg
build-wasm:
name: "Wasm"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup emscripten
uses: numworks/setup-emscripten@latest
- name: Configure
run: emcmake cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF
- name: Build
run: cmake --build build --config Release --parallel $(nproc)
- name: Install
run: cmake --install build --config Release --prefix pkg
- uses: actions/upload-artifact@v4
with:
name: Wasm
path: pkg
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-22.04
needs: [build-python]
if: github.repository_owner == 'SleipnirGroup' && github.ref == 'refs/heads/main'
environment:
name: pypi
url: https://pypi.org/p/sleipnirgroup-jormungandr
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: '* - python *'
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1