-
Notifications
You must be signed in to change notification settings - Fork 2
150 lines (141 loc) · 4.88 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: CI
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
SCCACHE_WEBDAV_ENDPOINT: "https://frcmaven.wpi.edu/artifactory/wpilib-generic-cache-cmake"
jobs:
build-docker:
strategy:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2025-22.04
artifact-name: Athena
build-options: -Pplatform=linux-athena -Psccache
- container: wpilib/raspbian-cross-ubuntu:bookworm-22.04
artifact-name: Arm32
build-options: -Pplatform=linux-arm32 -Psccache
- container: wpilib/aarch64-cross-ubuntu:bookworm-22.04
artifact-name: Arm64
build-options: -Pplatform=linux-arm64 -Psccache
- container: wpilib/ubuntu-base:22.04
artifact-name: Linux
build-options: -Pplatform=linux-x86_64 -Psccache
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Install Ninja
run: |
sudo apt-get update -q
sudo apt-get install -y ninja-build build-essential
- name: Install sccache
uses: mozilla-actions/[email protected]
- name: Build with Gradle
run: ./gradlew publish ${{ matrix.build-options }}
env:
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- 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=windows-arm64 -Psccache
- artifact-name: Win64
tool-arch: amd64
build-options: -Pplatform=windows-x86_64 -Psccache
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: ilammy/[email protected]
with:
arch: ${{ matrix.tool-arch }}
- name: Install sccache
uses: mozilla-actions/[email protected]
- name: Build with Gradle
run: ./gradlew publish ${{ matrix.build-options }}
env:
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- 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
- name: Install sccache
uses: mozilla-actions/[email protected]
- name: Build with Gradle
run: ./gradlew publish -Pplatform=osx-universal -Psccache
env:
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- uses: actions/upload-artifact@v4
with:
name: macOS
path: gradleDir/outputs/
combine:
name: Combine
needs: [build-docker, build-windows, build-mac]
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: |
github.repository_owner == 'wpilibsuite' &&
!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
env:
RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE'
ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
working-directory: combiner
- uses: actions/upload-artifact@v4
with:
name: Maven
path: ~/releases