Repository navigation
C++ Port, 2027 Precursor Refractor, and Swerve #804
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: YAMS CI | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| validation: | |
| name: Validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: gradle/actions/wrapper-validation@v4 | |
| build-cross: | |
| name: Build - ${{ matrix.artifact-name }} | |
| needs: [validation] | |
| 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: arm32 | |
| build-options: "-Ponlylinuxarm32" | |
| - container: wpilib/aarch64-cross-ubuntu:bookworm-22.04 | |
| artifact-name: arm64 | |
| build-options: "-Ponlylinuxarm64" | |
| runs-on: ubuntu-22.04 | |
| container: ${{ matrix.container }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} | |
| - name: Publish | |
| run: ./gradlew publish ${{ matrix.build-options }} | |
| working-directory: vendordep | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: maven-${{ matrix.artifact-name }} | |
| path: vendordep/build/maven/ | |
| build-linux: | |
| name: Build - Linux | |
| needs: [validation] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: vendordep | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - run: chmod +x gradlew | |
| - name: Install doxygen and graphviz | |
| run: sudo apt-get install -y doxygen graphviz | |
| - name: Cache roboRIO toolchain | |
| id: toolchain-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/wpilib/2026/roborio | |
| key: roborio-toolchain-linux | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Install roboRIO toolchain | |
| if: steps.toolchain-cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| for i in 1 2 3; do | |
| ./gradlew installRoboRioToolchain && break | |
| echo "Attempt $i failed, retrying in 15s..." | |
| sleep 15 | |
| done | |
| - name: C++ unit tests | |
| run: ./gradlew googleTest | |
| - name: Java unit tests | |
| run: ./gradlew test | |
| - name: Publish | |
| run: ./gradlew publish | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: maven-linux | |
| path: vendordep/build/maven/ | |
| build-host: | |
| name: Build - ${{ matrix.artifact-name }} | |
| needs: [validation] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| artifact-name: windows | |
| gradlew: ./gradlew.bat | |
| toolchain-path: C:/Users/Public/wpilib/2026/roborio | |
| - os: macos-latest | |
| artifact-name: macos | |
| gradlew: ./gradlew | |
| toolchain-path: ~/wpilib/2026/roborio | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: vendordep | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Make gradlew executable | |
| if: runner.os != 'Windows' | |
| run: chmod +x gradlew | |
| - name: Cache roboRIO toolchain | |
| id: toolchain-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ matrix.toolchain-path }} | |
| key: roborio-toolchain-${{ matrix.artifact-name }} | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Install roboRIO toolchain | |
| if: steps.toolchain-cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| for i in 1 2 3; do | |
| ./gradlew installRoboRioToolchain && break | |
| echo "Attempt $i failed, retrying in 15s..." | |
| sleep 5 | |
| done | |
| - name: Publish | |
| run: ${{ matrix.gradlew }} publish | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: maven-${{ matrix.artifact-name }} | |
| path: vendordep/build/maven/ | |
| combine: | |
| name: Combine | |
| needs: [build-cross, build-linux, build-host] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: maven-* | |
| path: combined-maven/ | |
| merge-multiple: true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: maven-combined | |
| path: combined-maven/ |