Skip to content

Commit 2b15912

Browse files
chore: Update googletest dependency, create test workflow
The googletest dependency was using an older version from the WPILib Artifactory, this was causing issues with builds on macOS where `osxuniversal` platform type was not available, and split between `osxarm64` and `osxx86-64`. Added a testing workflow as the normal build workflow was skipping tests.
1 parent e5b0f8b commit 2b15912

File tree

2 files changed

+100
-1
lines changed

2 files changed

+100
-1
lines changed

.github/workflows/test.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
test-docker:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
22+
name: LinuxARM64
23+
build-options: "-Ponlylinuxarm64"
24+
platform-type: linuxarm64
25+
arch: arm64
26+
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
27+
name: LinuxARM32
28+
build-options: "-Ponlylinuxarm32"
29+
platform-type: linuxarm32
30+
arch: arm32
31+
runs-on: ubuntu-latest
32+
name: "Test - ${{ matrix.name }}"
33+
container: ${{ matrix.container }}
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
ref: ${{ github.sha }}
39+
40+
- name: Setup Java
41+
uses: actions/setup-java@v4
42+
with:
43+
distribution: 'zulu'
44+
java-version: 11
45+
46+
- name: Build and run tests
47+
run: |
48+
./gradlew build ${{ matrix.build-options }} -PreleaseMode
49+
50+
test-native:
51+
timeout-minutes: 15
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
include:
56+
- os: windows-latest
57+
container: ''
58+
name: Win64
59+
build-options: ""
60+
platform-type: windowsx86-64
61+
- os: ubuntu-latest
62+
container: ''
63+
name: Linux64
64+
platform-type: linuxx86-64
65+
build-options: ""
66+
- os: macos-latest
67+
container: ''
68+
name: macOS
69+
platform-type: osxuniversal
70+
build-options: ""
71+
name: "Test - ${{ matrix.name }}"
72+
runs-on: ${{ matrix.os }}
73+
container: ${{ matrix.container }}
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
with:
78+
ref: ${{ github.sha }}
79+
80+
- name: Setup Java
81+
uses: actions/setup-java@v4
82+
with:
83+
distribution: 'zulu'
84+
java-version: 11
85+
86+
- name: Cache
87+
uses: actions/cache@v4
88+
with:
89+
path: |
90+
.gradle
91+
bin
92+
build
93+
key: ${{ matrix.name }}-tesst-${{ github.sha }}
94+
restore-keys: |
95+
${{ matrix.name }}-test-
96+
97+
- name: Build and run tests
98+
run: |
99+
./gradlew build ${{ matrix.build-options }} -PreleaseMode

config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nativeUtils {
88
// When updating WPILib, be sure to also update wpiHalVersion.txt
99
wpiVersion = "2023.+"
1010
niLibVersion = "2023.3.0"
11-
googleTestVersion = "1.11.0-3"
11+
googleTestVersion = "1.11.0-4"
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)