|
| 1 | +name: Sentinel Build (No Cache) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: "15 3 * * Sat" # 11:15PM EST every Friday |
| 7 | + |
| 8 | +concurrency: |
| 9 | + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | +jobs: |
| 13 | + build-docker: |
| 14 | + if: (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') || github.event_name != 'schedule' |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - container: wpilib/roborio-cross-ubuntu:2024-22.04 |
| 20 | + artifact-name: Athena |
| 21 | + build-options: "-Ponlylinuxathena" |
| 22 | + - container: wpilib/raspbian-cross-ubuntu:bullseye-22.04 |
| 23 | + artifact-name: Arm32 |
| 24 | + build-options: "-Ponlylinuxarm32" |
| 25 | + - container: wpilib/aarch64-cross-ubuntu:bullseye-22.04 |
| 26 | + artifact-name: Arm64 |
| 27 | + build-options: "-Ponlylinuxarm64" |
| 28 | + - container: wpilib/ubuntu-base:22.04 |
| 29 | + artifact-name: Linux |
| 30 | + build-options: "-Ponlylinuxx86-64" |
| 31 | + name: "Build - ${{ matrix.artifact-name }}" |
| 32 | + runs-on: ubuntu-22.04 |
| 33 | + steps: |
| 34 | + - name: Free Disk Space |
| 35 | + uses: jlumbroso/free-disk-space@main |
| 36 | + with: |
| 37 | + tool-cache: false |
| 38 | + android: true |
| 39 | + dotnet: true |
| 40 | + haskell: true |
| 41 | + large-packages: false |
| 42 | + docker-images: false |
| 43 | + swap-storage: false |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + with: |
| 46 | + fetch-depth: 0 |
| 47 | + - name: Build with Gradle |
| 48 | + uses: addnab/docker-run-action@v3 |
| 49 | + with: |
| 50 | + image: ${{ matrix.container }} |
| 51 | + options: -v ${{ github.workspace }}:/work -w /work -e GITHUB_REF -e CI |
| 52 | + run: df . && rm -f semicolon_delimited_script && echo $GITHUB_REF && ./gradlew build -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} |
| 53 | + - name: Check free disk space |
| 54 | + run: df . |
| 55 | + - uses: actions/upload-artifact@v4 |
| 56 | + with: |
| 57 | + name: ${{ matrix.artifact-name }} |
| 58 | + path: build/allOutputs |
| 59 | + |
| 60 | + build-host: |
| 61 | + if: (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') || github.event_name != 'schedule' |
| 62 | + env: |
| 63 | + MACOSX_DEPLOYMENT_TARGET: 13.3 |
| 64 | + strategy: |
| 65 | + fail-fast: false |
| 66 | + matrix: |
| 67 | + include: |
| 68 | + - os: windows-2022 |
| 69 | + artifact-name: Win64Debug |
| 70 | + architecture: x64 |
| 71 | + task: "build" |
| 72 | + build-options: "-PciDebugOnly" |
| 73 | + outputs: "build/allOutputs" |
| 74 | + - os: windows-2022 |
| 75 | + artifact-name: Win64Release |
| 76 | + architecture: x64 |
| 77 | + build-options: "-PciReleaseOnly" |
| 78 | + task: "copyAllOutputs" |
| 79 | + outputs: "build/allOutputs" |
| 80 | + - os: windows-2022 |
| 81 | + artifact-name: WinArm64Debug |
| 82 | + architecture: x64 |
| 83 | + task: "build" |
| 84 | + build-options: "-PciDebugOnly -Pbuildwinarm64 -Ponlywindowsarm64" |
| 85 | + outputs: "build/allOutputs" |
| 86 | + - os: windows-2022 |
| 87 | + artifact-name: WinArm64Release |
| 88 | + architecture: x64 |
| 89 | + build-options: "-PciReleaseOnly -Pbuildwinarm64 -Ponlywindowsarm64" |
| 90 | + task: "copyAllOutputs" |
| 91 | + outputs: "build/allOutputs" |
| 92 | + - os: macOS-14 |
| 93 | + artifact-name: macOS |
| 94 | + architecture: aarch64 |
| 95 | + task: "build" |
| 96 | + outputs: "build/allOutputs" |
| 97 | + - os: windows-2022 |
| 98 | + artifact-name: Win32 |
| 99 | + architecture: x86 |
| 100 | + task: ":ntcoreffi:build" |
| 101 | + outputs: "ntcoreffi/build/outputs" |
| 102 | + name: "Build - ${{ matrix.artifact-name }}" |
| 103 | + runs-on: ${{ matrix.os }} |
| 104 | + steps: |
| 105 | + - uses: actions/checkout@v4 |
| 106 | + with: |
| 107 | + fetch-depth: 0 |
| 108 | + - uses: actions/setup-java@v4 |
| 109 | + with: |
| 110 | + distribution: 'temurin' |
| 111 | + java-version: 17 |
| 112 | + architecture: ${{ matrix.architecture }} |
| 113 | + - name: Import Developer ID Certificate |
| 114 | + uses: wpilibsuite/import-signing-certificate@v2 |
| 115 | + with: |
| 116 | + certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} |
| 117 | + certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} |
| 118 | + keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} |
| 119 | + if: | |
| 120 | + matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') |
| 121 | + - name: Set Keychain Lock Timeout |
| 122 | + run: security set-keychain-settings -lut 3600 |
| 123 | + if: | |
| 124 | + matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') |
| 125 | + - name: Set Java Heap Size |
| 126 | + run: sed -i 's/-Xmx2g/-Xmx1g/g' gradle.properties |
| 127 | + if: matrix.artifact-name == 'Win32' |
| 128 | + - name: Check disk free space (Windows) |
| 129 | + run: wmic logicaldisk get caption, freespace |
| 130 | + if: matrix.os == 'windows-2022' |
| 131 | + - name: Check disk free space pre-cleanup (macOS) |
| 132 | + run: df -h . |
| 133 | + if: matrix.os == 'macOS-14' |
| 134 | + - name: Cleanup disk space |
| 135 | + # CodeQL: 5G |
| 136 | + # go: 748M |
| 137 | + # Android: 12G |
| 138 | + run: | |
| 139 | + rm -rf /Users/runner/hostedtoolcache/CodeQL |
| 140 | + rm -rf /Users/runner/hostedtoolcache/go |
| 141 | + rm -rf /Users/runner/Library/Android |
| 142 | + if: matrix.os == 'macOS-14' |
| 143 | + - name: Check disk free space post-cleanup (macOS) |
| 144 | + run: df -h . |
| 145 | + if: matrix.os == 'macOS-14' |
| 146 | + - name: Build with Gradle |
| 147 | + run: ./gradlew ${{ matrix.task }} -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} |
| 148 | + - name: Sign Libraries with Developer ID |
| 149 | + run: ./gradlew copyAllOutputs -PbuildServer -PskipJavaFormat -PdeveloperID=${{ secrets.APPLE_DEVELOPER_ID }} ${{ matrix.build-options }} |
| 150 | + if: | |
| 151 | + matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') |
| 152 | + - name: Check disk free space (Windows) |
| 153 | + run: wmic logicaldisk get caption, freespace |
| 154 | + if: matrix.os == 'windows-2022' |
| 155 | + - name: Check disk free space (macOS) |
| 156 | + run: df -h . |
| 157 | + if: matrix.os == 'macOS-14' |
| 158 | + - uses: actions/upload-artifact@v4 |
| 159 | + with: |
| 160 | + name: ${{ matrix.artifact-name }} |
| 161 | + path: ${{ matrix.outputs }} |
0 commit comments