Package everything in the include directory #10
Workflow file for this run
This file contains 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: CI | |
on: [pull_request, push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-docker: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- container: wpilib/ubuntu-base:22.04 | |
artifact-name: Linux | |
build-options: -Pplatform=x64-linux | |
name: "Build - ${{ matrix.artifact-name }}" | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
steps: | |
- run: sudo apt-get update && sudo apt-get install -y gfortran | |
name: install gfortran | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- uses: lukka/[email protected] | |
with: | |
vcpkgGitCommitId: '29b2ea2d4b6197e66ef346e62ccbba35b55b7de5' | |
- run: vcpkg install | |
name: install packages | |
- run: ./gradlew publish ${{ matrix.build-options }} | |
name: Build with Gradle | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact-name }} | |
path: gradleDir/outputs/ | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- artifact-name: WinArm64 | |
tool-arch: amd64_arm64 | |
build-options: -Pplatform=arm64-windows | |
- artifact-name: Win64 | |
tool-arch: amd64 | |
build-options: -Pplatform=x64-windows | |
name: "Build - ${{ matrix.artifact-name }}" | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- uses: lukka/[email protected] | |
with: | |
vcpkgGitCommitId: '29b2ea2d4b6197e66ef346e62ccbba35b55b7de5' | |
- uses: ilammy/[email protected] | |
with: | |
arch: ${{ matrix.tool-arch }} | |
- run: vcpkg install --triplet=arm64-windows | |
name: install packages | |
if: matrix.artifact-name == 'WinArm64' | |
- run: vcpkg install --triplet=x64-windows | |
name: install packages | |
if: matrix.artifact-name == 'Win64' | |
- run: ./gradlew publish ${{ matrix.build-options }} | |
name: Build with Gradle | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact-name }} | |
path: gradleDir/outputs/ | |
build-mac: | |
name: "Build - macOS" | |
runs-on: macOS-14 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- run: brew install cmake ninja | |
name: install ninja | |
- uses: lukka/[email protected] | |
with: | |
vcpkgGitCommitId: '29b2ea2d4b6197e66ef346e62ccbba35b55b7de5' | |
- run: vcpkg install --triplet=x64-osx | |
name: install packages | |
- run: ./gradlew publish -Pplatform=x64-osx | |
name: Build with Gradle | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macOS | |
path: gradleDir/outputs/ | |
build-mac-arm: | |
name: "Build - macOS (Arm)" | |
runs-on: macOS-14 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- run: brew install cmake ninja | |
name: install ninja | |
- uses: lukka/[email protected] | |
with: | |
vcpkgGitCommitId: '29b2ea2d4b6197e66ef346e62ccbba35b55b7de5' | |
- run: vcpkg install --triplet=arm64-osx | |
name: install packages | |
- run: ./gradlew publish -Pplatform=arm64-osx | |
name: Build with Gradle | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macOSArm | |
path: gradleDir/outputs/ | |
make_universal: | |
name: Make Universal | |
needs: [build-mac, build-mac-arm] | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: macOS | |
path: build/downloads | |
- uses: actions/download-artifact@v4 | |
with: | |
name: macOSArm | |
path: build/downloads | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- run: ./gradlew copyToUpload -Prunmerge | |
name: Build with Gradle | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macOSUniversal | |
path: build/toUpload/ | |
combine: | |
name: Combine | |
needs: [build-docker, build-windows, make_universal] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: wpilibsuite/build-tools | |
- uses: actions/download-artifact@v4 | |
with: | |
path: combiner/products/build/allOutputs | |
- name: Flatten Artifacts | |
run: rsync -a --delete combiner/products/build/allOutputs/*/* combiner/products/build/allOutputs/ | |
- name: Combine | |
if: | | |
!startsWith(github.ref, 'refs/tags/v') | |
run: ./gradlew publish -Pthirdparty | |
working-directory: combiner | |
- name: Combine (Release) | |
if: | | |
github.repository_owner == 'wpilibsuite' && | |
startsWith(github.ref, 'refs/tags/v') | |
run: | | |
./gradlew publish -Pthirdparty | |
working-directory: combiner | |
env: | |
RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE' | |
ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Maven | |
path: ~/releases |