forked from code-disaster/steamworks4j
-
Notifications
You must be signed in to change notification settings - Fork 0
208 lines (208 loc) · 7.67 KB
/
main.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
on:
push:
paths:
- .github/workflows/main.yml
- java-wrapper/src/main/java/**
- java-wrapper/src/main/native/**
- server/src/main/java/**
- server/src/main/native/**
env:
SDK: 3ed0ffc6f533cb006e5f8d0cd16cf6327fc0b198
jobs:
jnigen:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Checkout Steamworks SDK 1.59
uses: actions/checkout@v4
with:
repository: rlabrecque/SteamworksSDK
ref: ${{ env.SDK }}
path: ${{ github.workspace }}/sdk
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Install java-wrapper
run: mvn -B install --file java-wrapper/pom.xml
- name: Install server
run: mvn -B install --file server/pom.xml
- name: Package jnigen
run: mvn -B package --file jnigen/pom.xml
- name: Run jnigen
run: java -cp ${{ github.workspace }}/jnigen/target/jnigen.jar com.codedisaster.steamworks.jnigen.JNICodeGenerator
- name: Upload the result of jnigen for java-wrapper
uses: actions/upload-artifact@v3
with:
name: java-wrapper-cpp
path: ${{ github.workspace }}/java-wrapper/src/main/native/
- name: Upload the result of jnigen for server
uses: actions/upload-artifact@v3
with:
name: server-cpp
path: ${{ github.workspace }}/server/src/main/native/
linux:
needs: jnigen
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Checkout Steamworks SDK 1.59
uses: actions/checkout@v4
with:
repository: rlabrecque/SteamworksSDK
ref: ${{ env.SDK }}
path: ${{ github.workspace }}/sdk
- name: Download the result of java-wrapper jnigen
uses: actions/download-artifact@v3
with:
name: java-wrapper-cpp
path: ${{ github.workspace }}/java-wrapper/src/main/native/
- name: Download the result of server jnigen
uses: actions/download-artifact@v3
with:
name: server-cpp
path: ${{ github.workspace }}/server/src/main/native/
- name: Set up premake for linux compile
uses: abel0b/[email protected]
with:
version: "5.0.0-beta2"
- name: Compile linux project
run: ./build-linux.sh
working-directory: ${{ github.workspace }}/build-natives/
- name: Upload built java-wrapper libraries
uses: actions/upload-artifact@v3
with:
name: linux-java-wrapper-libraries
path: ${{ github.workspace }}/java-wrapper/src/main/resources/*.so
- name: Upload built server libraries
uses: actions/upload-artifact@v3
with:
name: linux-server-libraries
path: ${{ github.workspace }}/server/src/main/resources/*.so
windows:
needs: jnigen
runs-on: windows-2022
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Checkout Steamworks SDK 1.59
uses: actions/checkout@v4
with:
repository: rlabrecque/SteamworksSDK
ref: ${{ env.SDK }}
path: ${{ github.workspace }}\sdk
- name: Download the result of java-wrapper jnigen
uses: actions/download-artifact@v3
with:
name: java-wrapper-cpp
path: ${{ github.workspace }}\java-wrapper\src\main\native\
- name: Download the result of server jnigen
uses: actions/download-artifact@v3
with:
name: server-cpp
path: ${{ github.workspace }}\server\src\main\native\
- name: Set up premake for windows compile
uses: abel0b/[email protected]
with:
version: "5.0.0-beta2"
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Compile windows project
run: .\build-win.bat vs2022
working-directory: ${{ github.workspace }}\build-natives\
- name: Upload built java-wrapper libraries
uses: actions/upload-artifact@v3
with:
name: windows-java-wrapper-libraries
path: ${{ github.workspace }}\java-wrapper\src\main\resources\*.dll
- name: Upload built server libraries
uses: actions/upload-artifact@v3
with:
name: windows-server-libraries
path: ${{ github.workspace }}\server\src\main\resources\*.dll
osx:
needs: jnigen
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Checkout Steamworks SDK 1.59
uses: actions/checkout@v4
with:
repository: rlabrecque/SteamworksSDK
ref: ${{ env.SDK }}
path: ${{ github.workspace }}/sdk
- name: Download the result of java-wrapper jnigen
uses: actions/download-artifact@v3
with:
name: java-wrapper-cpp
path: ${{ github.workspace }}/java-wrapper/src/main/native/
- name: Download the result of server jnigen
uses: actions/download-artifact@v3
with:
name: server-cpp
path: ${{ github.workspace }}/server/src/main/native/
- name: Set up premake for mac compile
uses: abel0b/[email protected]
with:
version: "5.0.0-beta2"
path: build-natives
- name: Compile mac project
run: ./build-osx.sh
working-directory: ${{ github.workspace }}/build-natives/
- name: Upload built java-wrapper libraries
uses: actions/upload-artifact@v3
with:
name: osx-java-wrapper-libraries
path: ${{ github.workspace }}/java-wrapper/src/main/resources/*.dylib
- name: Upload built server libraries
uses: actions/upload-artifact@v3
with:
name: osx-server-libraries
path: ${{ github.workspace }}/server/src/main/resources/*.dylib
pull:
needs: [ linux, windows, osx ]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Download the linux java-wrapper libraries
uses: actions/download-artifact@v3
with:
name: linux-java-wrapper-libraries
path: ${{ github.workspace }}/java-wrapper/src/main/resources/
- name: Download the linux server libraries
uses: actions/download-artifact@v3
with:
name: linux-server-libraries
path: ${{ github.workspace }}/server/src/main/resources/
- name: Download the windows java-wrapper libraries
uses: actions/download-artifact@v3
with:
name: windows-java-wrapper-libraries
path: ${{ github.workspace }}/java-wrapper/src/main/resources/
- name: Download the windows server libraries
uses: actions/download-artifact@v3
with:
name: windows-server-libraries
path: ${{ github.workspace }}/server/src/main/resources/
- name: Download the mac java-wrapper libraries
uses: actions/download-artifact@v3
with:
name: osx-java-wrapper-libraries
path: ${{ github.workspace }}/java-wrapper/src/main/resources/
- name: Download the mac server libraries
uses: actions/download-artifact@v3
with:
name: osx-server-libraries
path: ${{ github.workspace }}/server/src/main/resources/
- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update prebuilt libraries
title: Updated Prebuilt Binaries
body: Fresh build of binaries as a result of a "${{ github.event_name }}" event.