-
Notifications
You must be signed in to change notification settings - Fork 5
139 lines (139 loc) · 5.14 KB
/
build.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
on:
push:
pull_request:
jobs:
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: install dependencies
shell: bash
run: |
set -e -x
mkdir -p jdks/x86
mkdir -p jdks/aarch64
curl -Lo jdks/x86/jdk.zip 'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/OpenJDK11U-jdk_x86-32_windows_hotspot_11.0.15_10.zip'
echo "c8aa33913b27bb09cc66342e567b3a1fe0f4b136569e57e713bd56ef540d4105 jdks/x86/jdk.zip" | sha256sum -c
unzip jdks/x86/jdk.zip -d jdks/x86
mv jdks/x86/jdk-*/* jdks/x86/
curl -Lo jdks/aarch64/jdk.zip 'https://aka.ms/download-jdk/microsoft-jdk-11.0.19-windows-aarch64.zip'
echo "2f321bfe2cd2a4759b061f37c82d57d8944e0983bda84d6f9a4d790dd21ccb94 jdks/aarch64/jdk.zip" | sha256sum -c
unzip jdks/aarch64/jdk.zip -d jdks/aarch64
mv jdks/aarch64/jdk-*/* jdks/aarch64/
- name: build windows-x86
shell: bash
run: |
set -e -x
mkdir -p build/windows-x86
cd build/windows-x86
# cmake isn't smart enough to find jawt of the correct arch
cmake ../../ -A Win32 -DJAVA_JVM_LIBRARY=../../jdks/x86/lib/jvm.lib -DJAVA_AWT_LIBRARY=../../jdks/x86/lib/jawt.lib
cmake --build . --config Release
- uses: actions/upload-artifact@v3
with:
name: windows-x86
path: build/windows-x86/Release/rlawt.dll
retention-days: 1
if-no-files-found: error
- name: build windows-amd64
shell: bash
run: |
set -e -x
mkdir -p build/windows-amd64
cd build/windows-amd64
cmake ../../
cmake --build . --config Release
- uses: actions/upload-artifact@v3
with:
name: windows-amd64
path: build/windows-amd64/Release/rlawt.dll
retention-days: 1
if-no-files-found: error
- name: build windows-aarch64
shell: bash
run: |
set -e -x
mkdir -p build/windows-aarch64
cd build/windows-aarch64
cmake ../../ -A ARM64 -DJAVA_JVM_LIBRARY=../../jdks/aarch64/lib/jvm.lib -DJAVA_AWT_LIBRARY=../../jdks/aarch64/lib/jawt.lib
cmake --build . --config Release
- uses: actions/upload-artifact@v3
with:
name: windows-aarch64
path: build/windows-aarch64/Release/rlawt.dll
retention-days: 1
if-no-files-found: error
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
set -e -x
curl -Lo jdk-11.0.15+10.zip 'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.15_10.tar.gz'
echo "e84143a6c633a26aeefcb1fd5ad8dfb9e952cfec2a1af5c9d9b69f2390990dac jdk-11.0.15+10.zip" | shasum -a 256 -c
tar -xf jdk-11.0.15+10.zip
- name: build macos-x86_64
run: |
set -e -x
mkdir -p build/macos-x86_64
cd build/macos-x86_64
cmake ../../ -DCMAKE_OSX_ARCHITECTURES=x86_64
cmake --build . --config Release
- uses: actions/upload-artifact@v3
with:
name: macos-x86_64
path: build/macos-x86_64/librlawt.dylib
retention-days: 1
if-no-files-found: error
- name: build macos-aarch64
run: |
set -e -x
mkdir -p build/macos-aarch64
cd build/macos-aarch64
cmake ../../ -DCMAKE_OSX_ARCHITECTURES=arm64 -DJAVA_JVM_LIBRARY=../../jdk-11.0.15+10/Contents/Home/lib/server/libjvm.dylib -DJAVA_AWT_LIBRARY=../../jdk-11.0.15+10/Contents/Home/lib/libjawt.dylib
cmake --build . --config Release
- uses: actions/upload-artifact@v3
with:
name: macos-aarch64
path: build/macos-aarch64/librlawt.dylib
retention-days: 1
if-no-files-found: error
linux-amd64:
needs: [windows, macos]
runs-on: ubuntu-20.04
container:
image: amd64/centos:7.9.2009
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
set -e -x
curl -Lo cmake-3.23.2-linux-x86_64.tar.gz 'https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-linux-x86_64.tar.gz'
echo "aaced6f745b86ce853661a595bdac6c5314a60f8181b6912a0a4920acfa32708 cmake-3.23.2-linux-x86_64.tar.gz" | sha256sum -c
tar -xf cmake-3.23.2-linux-x86_64.tar.gz
mv cmake-3.23.2-linux-x86_64 cmake
yum -y install libX11-devel mesa-libGL-devel java-11-openjdk-devel "@Development Tools"
- uses: actions/download-artifact@v3
with:
path: jar/net/runelite/rlawt/
- name: build linux-amd64
run: |
set -e -x
mkdir -p build/linux-amd64
cd build/linux-amd64
../../cmake/bin/cmake ../../
../../cmake/bin/cmake --build . --config Release
cd ../../
mkdir jar/net/runelite/rlawt/linux-amd64
cp build/linux-amd64/librlawt.so jar/net/runelite/rlawt/linux-amd64/
cp -r build/linux-amd64/CMakeFiles/jar.dir/net jar/
- name: jar
run: |
set -e -x
jar cvf rlawt.jar -C jar/ .
- uses: actions/upload-artifact@v3
with:
name: jar
path: rlawt.jar
if-no-files-found: error