Skip to content

[choreolib] Fix SwerveSample docs typo (#1103) #2770

[choreolib] Fix SwerveSample docs typo (#1103)

[choreolib] Fix SwerveSample docs typo (#1103) #2770

Workflow file for this run

name: ChoreoLib
on: [push, pull_request]
jobs:
build-docker:
strategy:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2025-22.04
artifact-name: Athena
build-options: -Ponlylinuxathena
- container: wpilib/raspbian-cross-ubuntu:bookworm-22.04
artifact-name: Linux-arm32
build-options: -Ponlylinuxarm32
- container: wpilib/aarch64-cross-ubuntu:bookworm-22.04
artifact-name: Linux-arm64
build-options: -Ponlylinuxarm64
- container: wpilib/ubuntu-base:22.04
artifact-name: Linux-x86_64
build-options:
name: "Build C++ and Java / ${{ matrix.artifact-name }}"
runs-on: ubuntu-24.04
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
persist-credentials: false
token: ${{secrets.GITHUB_TOKEN}}
- name: Fetch all history and metadata
run: |
git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
- name: Set version (release)
if: startsWith(github.ref, 'refs/tags/v')
working-directory: choreolib
run: sed -i "s/0.0.0/${GITHUB_REF##*v}/g" publish.gradle
- name: Build with Gradle
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
working-directory: choreolib
run: ./gradlew build ${{ matrix.build-options }}
- name: Build with Gradle (release)
if: startsWith(github.ref, 'refs/tags/v')
working-directory: choreolib
run: ./gradlew build ${{ matrix.build-options }} -PreleaseMode
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: choreolib/build/allOutputs
build-host:
env:
MACOSX_DEPLOYMENT_TARGET: 13.3
strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
artifact-name: Windows-x86_64
build-options:
# FIXME: Link failure on commands library
# - os: windows-2022
# artifact-name: Windows-aarch64
# build-options: -Pbuildwinarm64 -Ponlywindowsarm64
- os: macOS-13
artifact-name: macOS-x86_64
build-options:
- os: macOS-14
artifact-name: macOS-arm64
build-options:
name: "Build C++ and Java / ${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
token: ${{secrets.GITHUB_TOKEN}}
- name: Fetch all history and metadata
run: git fetch --prune --unshallow
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Set version (Windows release)
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags/v')
run: |
sed -i "s/0.0.0/${GITHUB_REF##*v}/g" publish.gradle
./gradlew spotlessApply # Undo line ending changes from sed
working-directory: choreolib
- name: Set version (macOS release)
if: startsWith(matrix.os, 'macOS') && startsWith(github.ref, 'refs/tags/v')
run: sed -i '' "s/0.0.0/${GITHUB_REF##*v}/g" publish.gradle
working-directory: choreolib
- name: Build with Gradle
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
working-directory: choreolib
run: ./gradlew build ${{ matrix.build-options }}
- name: Build with Gradle (release)
if: startsWith(github.ref, 'refs/tags/v')
working-directory: choreolib
run: ./gradlew build ${{ matrix.build-options }} -PreleaseMode
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: choreolib/build/allOutputs
vendordep:
name: Upload vendordep JSON
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
token: ${{secrets.GITHUB_TOKEN}}
- uses: actions/upload-artifact@v4
with:
name: ChoreoLib-json
path: choreolib/ChoreoLib2025Beta.json
combine:
name: Combine
needs: [build-docker, build-host]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
repository: wpilibsuite/build-tools
persist-credentials: false
token: ${{secrets.GITHUB_TOKEN}}
- uses: actions/download-artifact@v4
with:
path: combiner/products/build/allOutputs
- name: Generate a token
if: startsWith(github.ref, 'refs/tags/v')
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CHOREOLIB_RELEASE_APP_ID }}
private-key: ${{ secrets.CHOREOLIB_RELEASE_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout ChoreoLib repository
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/checkout@v4
with:
repository: SleipnirGroup/ChoreoLib
path: ChoreoLib
token: ${{ steps.generate-token.outputs.token }}
persist-credentials: false
- name: Copy ChoreoLib JSON
if: startsWith(github.ref, 'refs/tags/v')
run: |
cp combiner/products/build/allOutputs/ChoreoLib-json/ChoreoLib2025Beta.json ChoreoLib/dep/ChoreoLib2025Beta.json
- name: Remove JSON Artifact From Download
run: rm combiner/products/build/allOutputs/ChoreoLib-json/ChoreoLib2025Beta.json
- name: Flatten Artifacts
run: rsync -a --delete combiner/products/build/allOutputs/*/* combiner/products/build/allOutputs
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Combine
run: ./gradlew publish -Pthirdparty
working-directory: combiner
- name: Transfer ChoreoLib Artifacts
if: startsWith(github.ref, 'refs/tags/v')
run: cp -r ~/releases/maven/development/choreo/* ChoreoLib/dep/choreo
- name: Create Pull Request
if: startsWith(github.ref, 'refs/tags/v')
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
path: ./ChoreoLib
title: Add ChoreoLib ${{github.ref_name}}
commit-message: Add ChoreoLib ${{github.ref_name}}
body:
branch: publish-${{github.ref_name}}
- uses: actions/upload-artifact@v4
with:
name: ChoreoLib-Maven
path: ~/releases
build-python:
name: "Build Python"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
token: ${{secrets.GITHUB_TOKEN}}
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: pip3 install build wheel pytest
- run: python3 -m build
working-directory: ./choreolib/py
- run: pip3 install --no-cache-dir dist/*.whl
working-directory: ./choreolib/py
- run: pytest
working-directory: ./choreolib/py
- uses: actions/upload-artifact@v4
with:
name: Python
path: ./choreolib/py/dist
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-24.04
needs: [build-python]
if: github.repository_owner == 'SleipnirGroup' && startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
url: https://pypi.org/p/sleipnirgroup-choreolib
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