-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (124 loc) · 4.06 KB
/
ci.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
name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-docker:
strategy:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2025-22.04
artifact-name: Codex-Athena
build-options: "-Ponlylinuxathena"
- container: wpilib/raspbian-cross-ubuntu:bookworm-22.04
artifact-name: Codex-Arm32
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:bookworm-22.04
artifact-name: Codex-Arm64
build-options: "-Ponlylinuxarm64"
- container: wpilib/ubuntu-base:22.04
artifact-name: Codex-Linux
build-options: "-Ponlylinuxx86-64"
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Fetch all history and metadata
run: |
git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
- name: Build with Gradle
run: ./gradlew build ${{ matrix.build-options }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: build/allOutputs
build-host:
env:
MACOSX_DEPLOYMENT_TARGET: 13.3
strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
artifact-name: Codex-Win64
architecture: x64
- os: macos-14
artifact-name: Codex-macOS
architecture: aarch64
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Fetch all history and metadata
run: git fetch --prune --unshallow
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
architecture: ${{ matrix.architecture }}
- name: Build with Gradle
run: ./gradlew build -Pbuildalldesktop
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: build/allOutputs
combine:
name: Combine
needs: [build-docker, build-host]
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
repository: wpilibsuite/build-tools
- name: Download artifacts
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/
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- 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 }}
- name: Debug publish
run: echo "Publish Dir contents $(find ~/work/Codex/Codex/publish -type f)"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Maven
path: ~/releases