name: Sentinel Build (No Cache) on: workflow_dispatch: schedule: - cron: "15 3 * * Sat" # 11:15PM EST every Friday concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: validation: name: "Validation" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: gradle/actions/wrapper-validation@v4 build-docker: if: (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') || github.event_name != 'schedule' strategy: fail-fast: false matrix: include: - container: wpilib/systemcore-cross-ubuntu:2027-24.04 artifact-name: Systemcore build-options: "-Ponlylinuxsystemcore" - container: wpilib/aarch64-cross-ubuntu:2027-bookworm-24.04 artifact-name: Arm64 build-options: "-Ponlylinuxarm64" - container: wpilib/systemcore-cross-ubuntu:2027-24.04 artifact-name: Linux build-options: "-Ponlylinuxx86-64" name: "Build - ${{ matrix.artifact-name }}" runs-on: ubuntu-24.04 needs: [validation] steps: - name: Free Disk Space uses: jlumbroso/free-disk-space@main with: tool-cache: false android: true dotnet: true haskell: true large-packages: false docker-images: false swap-storage: false - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build with Gradle # main on 2021-05-30, to include addnab/docker-run-action/pull/17 uses: addnab/docker-run-action@3e77f186b7a929ef010f183a9e24c0f9955ea609 with: image: ${{ matrix.container }} options: -v ${{ github.workspace }}:/work -w /work -e GITHUB_REF -e CI run: ./gradlew build -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} - name: Check free disk space run: df . - uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact-name }} path: build/allOutputs build-host: if: (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') || github.event_name != 'schedule' env: MACOSX_DEPLOYMENT_TARGET: 13.3 strategy: fail-fast: false matrix: include: - os: windows-2022 artifact-name: Win64Debug architecture: x64 task: "build" build-options: "-PciDebugOnly" outputs: "build/allOutputs" - os: windows-2022 artifact-name: Win64Release architecture: x64 build-options: "-PciReleaseOnly" task: "copyAllOutputs" outputs: "build/allOutputs" - os: windows-2022 artifact-name: WinArm64Debug architecture: x64 task: "build" build-options: "-PciDebugOnly -Pbuildwinarm64 -Ponlywindowsarm64" outputs: "build/allOutputs" - os: windows-2022 artifact-name: WinArm64Release architecture: x64 build-options: "-PciReleaseOnly -Pbuildwinarm64 -Ponlywindowsarm64" task: "copyAllOutputs" outputs: "build/allOutputs" - os: macOS-15 artifact-name: macOS architecture: aarch64 task: "build" outputs: "build/allOutputs" - os: windows-2022 artifact-name: Win64FFI architecture: x64 task: ":ntcoreffi:build" build-options: "-Pntcoreffibuild -Pbuildwinarm64" outputs: "ntcoreffi/build/outputs" name: "Build - ${{ matrix.artifact-name }}" runs-on: ${{ matrix.os }} needs: [validation] steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 21 architecture: ${{ matrix.architecture }} - name: Import Developer ID Certificate uses: wpilibsuite/import-signing-certificate@v2 with: certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} if: | matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') - name: Set Keychain Lock Timeout run: security set-keychain-settings -lut 21600 if: | matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') - name: Check disk free space (Windows) run: wmic logicaldisk get caption, freespace if: matrix.os == 'windows-2022' - name: Check disk free space pre-cleanup (macOS) run: df -h . if: matrix.os == 'macOS-15' - name: Cleanup disk space # CodeQL: 5G # go: 748M # Android: 12G run: | rm -rf /Users/runner/hostedtoolcache/CodeQL rm -rf /Users/runner/hostedtoolcache/go rm -rf /Users/runner/Library/Android if: matrix.os == 'macOS-15' - name: Check disk free space post-cleanup (macOS) run: df -h . if: matrix.os == 'macOS-15' - name: Build with Gradle run: ./gradlew ${{ matrix.task }} -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} - name: Sign Libraries with Developer ID run: ./gradlew copyAllOutputs -PbuildServer -PskipJavaFormat -PdeveloperID=${{ secrets.APPLE_DEVELOPER_ID }} ${{ matrix.build-options }} if: | matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') - name: Check disk free space (Windows) run: wmic logicaldisk get caption, freespace if: matrix.os == 'windows-2022' - name: Check disk free space (macOS) run: df -h . if: matrix.os == 'macOS-15' - uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact-name }} path: ${{ matrix.outputs }}