-
Notifications
You must be signed in to change notification settings - Fork 5
125 lines (123 loc) · 3.7 KB
/
allInOne.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
name: Build and Publish for all Platforms
on: [push]
jobs:
validate-gradle-wrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
build-linux-windows-amd64:
runs-on: ubuntu-latest
needs: validate-gradle-wrapper
steps:
- name: Install SWIG
run: sudo apt-get install swig mingw-w64
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew buildNatives
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-windows-amd64-artifacts
path: |
build/natives/*/*.so
build/natives/*/*.dll
build/natives/*/*.dylib
build-macos-amd64:
runs-on: macos-12
needs: validate-gradle-wrapper
steps:
- name: Install SWIG and CMake
run: |
brew install swig
brew install cmake
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew native_macosx_amd64_clang
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macosx-amd64-artifacts
path: |
build/natives/*/*.so
build/natives/*/*.dll
build/natives/*/*.dylib
build-macos-aarch64:
runs-on: macos-14
needs: validate-gradle-wrapper
steps:
- name: Install SWIG and CMake
run: |
brew install swig
brew install cmake
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew native_macosx_aarch64_clang
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macosx-aarch64-artifacts
path: |
build/natives/*/*.so
build/natives/*/*.dll
build/natives/*/*.dylib
publish:
runs-on: ubuntu-latest
needs: [validate-gradle-wrapper,build-linux-windows-amd64, build-macos-amd64, build-macos-aarch64]
if: github.ref == 'refs/heads/master'
steps:
- name: Install SWIG
run: sudo apt-get install swig mingw-w64
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: build/natives
merge-multiple: true
- name: Build and Zip Natives
run: ./gradlew build zipNatives
- run: |
ls -R build/natives/
ls -R build/libs/
- name: Publish
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish -PmavenUser=${artifactoryUser} -PmavenPass=${artifactoryPass}
env:
artifactoryUser: ${{ secrets.ARTIFACTORY_USER }}
artifactoryPass: ${{ secrets.ARTIFACTORY_PASS }}