-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (95 loc) · 3.07 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
name: CI
on:
push:
branches: [ test-build ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-13, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Setup Webots
id: setupWebots
uses: DeepBlueRobotics/[email protected]
with:
webotsVersion: R2024a
webotsRepository: DeepBlueRobotics/webots
webotsTag: R2024a_DeepBlueSim_testMacSwigDep
webotsBaseUrl: 'https://github.com/DeepBlueRobotics/webots/releases/download/untagged-0d3bbfe0095f1a39e50f'
- name: Do the system test
uses: ./.github/actions/run-system-test
- name: Archive the example folder
uses: actions/upload-artifact@v4
if: always()
with:
name: Resulting example project for ${{ runner.os }}
path: example/
- name: Archive Webots log
uses: actions/upload-artifact@v4
if: always()
with:
name: Webots log for ${{ runner.os }}
path: webots-${{ runner.os }}.log
- name: Archive java logs
uses: actions/upload-artifact@v4
if: always()
with:
name: Java logs for ${{ runner.os }}
path: |
~/DeepBlueSim*.log
~/example*.log
publish:
# Only release from the master branch
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
steps:
- name: Cancel any existing workflow runs
uses: fkirc/skip-duplicate-actions@v5
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Webots
id: setupWebots
uses: DeepBlueRobotics/[email protected]
with:
webotsVersion: R2024a
webotsRepository: DeepBlueRobotics/webots
webotsTag: R2024a_DeepBlueSim_2024_07_28
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 0
- name: Compute next semantic version
id: version
uses: paulhatch/[email protected]
with:
branch: "master"
- name: Test with explicit version
run: ./gradlew :plugin:build -Pversion=${{ steps.version.outputs.version }} --info --stacktrace
- name: Tag
run: git tag ${{ steps.version.outputs.version_tag }}
- name: Push
run: git push origin ${{ steps.version.outputs.version_tag }}
- name: Publish to Gradle Plugin Portal
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: ./gradlew :plugin:publishPlugins -Pversion=${{ steps.version.outputs.version }} -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET --info --stacktrace