|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + validation: |
| 7 | + name: "Validation" |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v4 |
| 11 | + - uses: gradle/actions/wrapper-validation@v4 |
| 12 | + |
| 13 | + build-docker: |
| 14 | + needs: [validation] |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - container: wpilib/roborio-cross-ubuntu:2025-22.04 |
| 20 | + artifact-name: Athena |
| 21 | + build-options: "-Ponlylinuxathena" |
| 22 | + - container: wpilib/raspbian-cross-ubuntu:bookworm-22.04 |
| 23 | + artifact-name: Arm32 |
| 24 | + build-options: "-Ponlylinuxarm32" |
| 25 | + - container: wpilib/aarch64-cross-ubuntu:bookworm-22.04 |
| 26 | + artifact-name: Arm64 |
| 27 | + build-options: "-Ponlylinuxarm64" |
| 28 | + - container: wpilib/ubuntu-base:22.04 |
| 29 | + artifact-name: Linux |
| 30 | + build-options: "" |
| 31 | + name: "Build - ${{ matrix.artifact-name }}" |
| 32 | + runs-on: ubuntu-22.04 |
| 33 | + container: ${{ matrix.container }} |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + submodules: true |
| 38 | + fetch-depth: 0 |
| 39 | + - name: Fetch all history and metadata |
| 40 | + run: | |
| 41 | + git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} |
| 42 | + - name: Build with Gradle |
| 43 | + run: ./gradlew build ${{ matrix.build-options }} |
| 44 | + - uses: actions/upload-artifact@v4 |
| 45 | + with: |
| 46 | + name: ${{ matrix.artifact-name }} |
| 47 | + path: build/allOutputs |
| 48 | + |
| 49 | + build-host: |
| 50 | + needs: [validation] |
| 51 | + env: |
| 52 | + MACOSX_DEPLOYMENT_TARGET: 13.3 |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + matrix: |
| 56 | + include: |
| 57 | + - os: windows-2022 |
| 58 | + artifact-name: Win64 |
| 59 | + architecture: x64 |
| 60 | + - os: macos-14 |
| 61 | + artifact-name: macOS |
| 62 | + architecture: aarch64 |
| 63 | + name: "Build - ${{ matrix.artifact-name }}" |
| 64 | + runs-on: ${{ matrix.os }} |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + with: |
| 68 | + submodules: true |
| 69 | + - name: Fetch all history and metadata |
| 70 | + run: git fetch --prune --unshallow |
| 71 | + - uses: actions/setup-java@v4 |
| 72 | + with: |
| 73 | + distribution: 'temurin' |
| 74 | + java-version: 17 |
| 75 | + architecture: ${{ matrix.architecture }} |
| 76 | + - name: Build with Gradle |
| 77 | + run: ./gradlew build -Pbuildalldesktop |
| 78 | + - uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: ${{ matrix.artifact-name }} |
| 81 | + path: build/allOutputs |
| 82 | + |
| 83 | + combine: |
| 84 | + name: Combine |
| 85 | + needs: [build-docker, build-host] |
| 86 | + runs-on: ubuntu-22.04 |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@v4 |
| 89 | + with: |
| 90 | + repository: wpilibsuite/build-tools |
| 91 | + - uses: actions/download-artifact@v4 |
| 92 | + with: |
| 93 | + path: combiner/products/build/allOutputs |
| 94 | + - name: Flatten Artifacts |
| 95 | + run: rsync -a --delete combiner/products/build/allOutputs/*/* combiner/products/build/allOutputs/ |
| 96 | + - uses: actions/setup-java@v4 |
| 97 | + with: |
| 98 | + distribution: 'temurin' |
| 99 | + java-version: 17 |
| 100 | + - name: Combine |
| 101 | + # if: | |
| 102 | + # !startsWith(github.ref, 'refs/tags/v') |
| 103 | + run: ./gradlew publish -Pthirdparty |
| 104 | + working-directory: combiner |
| 105 | + # - name: Combine (Release) |
| 106 | + # if: | |
| 107 | + # github.repository_owner == 'wpilibsuite' && |
| 108 | + # startsWith(github.ref, 'refs/tags/v') |
| 109 | + # run: | |
| 110 | + # ./gradlew publish -Pthirdparty |
| 111 | + # working-directory: combiner |
| 112 | + # env: |
| 113 | + # RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE' |
| 114 | + # ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} |
| 115 | + # ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 116 | + - uses: actions/upload-artifact@v4 |
| 117 | + with: |
| 118 | + name: Maven |
| 119 | + path: ~/releases |
0 commit comments