-
Notifications
You must be signed in to change notification settings - Fork 11
70 lines (65 loc) · 2.79 KB
/
Copy pathcontinuous-integration.yaml
File metadata and controls
70 lines (65 loc) · 2.79 KB
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
name: Continuous Integration
on:
push:
paths-ignore:
- "test-devices/**"
- "reference/**"
pull_request:
paths-ignore:
- "test-devices/**"
- "reference/**"
env:
MVN_DEFAULT_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always
jobs:
test_os:
name: OS ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v7
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '25'
- name: Configure unit test GPG key
run: |
echo -n "$UNIT_TEST_SIGNING_KEY" | base64 --decode | gpg --import
env:
UNIT_TEST_SIGNING_KEY: ${{ vars.UNIT_TEST_SIGNING_KEY }}
- name: Build java-does-usb
run: ./mvnw $MVN_DEFAULT_ARGS -DskipTests clean install javadoc:javadoc
working-directory: ./java-does-usb
- name: Determine java-does-usb version
id: libver
run: echo "version=$(./mvnw -q -ntp help:evaluate -Dexpression=project.version -DforceStdout)" >> "$GITHUB_OUTPUT"
working-directory: ./java-does-usb
# Examples pin the latest released version so they double as user-facing documentation;
# override that pin here to compile them against the HEAD version just installed above.
- name: Example "bulk_transfer"
run: ./mvnw $MVN_DEFAULT_ARGS -Djava-does-usb.version=${{ steps.libver.outputs.version }} clean compile
working-directory: ./examples/bulk_transfer
- name: Example "enumerate"
run: ./mvnw $MVN_DEFAULT_ARGS -Djava-does-usb.version=${{ steps.libver.outputs.version }} clean compile
working-directory: ./examples/enumerate
- name: Example "enumerate" (Kotlin)
run: ./gradlew -PjavaDoesUsbVersion=${{ steps.libver.outputs.version }} clean build
working-directory: ./examples/enumerate_kotlin
- name: Example "monitor"
run: ./mvnw $MVN_DEFAULT_ARGS -Djava-does-usb.version=${{ steps.libver.outputs.version }} clean compile
working-directory: ./examples/monitor
- name: Example "monitor" (Kotlin)
run: ./mvnw $MVN_DEFAULT_ARGS -Djava-does-usb.version=${{ steps.libver.outputs.version }} clean package
working-directory: ./examples/monitor_kotlin
- name: Example "stm_dfu"
run: ./mvnw $MVN_DEFAULT_ARGS -Djava-does-usb.version=${{ steps.libver.outputs.version }} clean compile
working-directory: ./examples/stm_dfu
- name: Example "epaper_display"
run: ./mvnw $MVN_DEFAULT_ARGS -Djava-does-usb.version=${{ steps.libver.outputs.version }} clean compile
working-directory: ./examples/epaper_display