-
Notifications
You must be signed in to change notification settings - Fork 3
177 lines (152 loc) · 4.24 KB
/
javaserial.yml
File metadata and controls
177 lines (152 loc) · 4.24 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
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
name: JavaSerial
on: [push, pull_request]
jobs:
linux:
name: JavaSerial-native-linux
runs-on: ubuntu-latest
timeout-minutes: 38
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get install -y default-jdk gcc-multilib
#sudo apt-get install -y default-jdk gcc-multilib gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
- name: 'Run CMake - amd64'
run: |
cd main
mkdir build-amd64
cd build-amd64
JAVA_HOME=/usr/lib/jvm/default-java cmake -DCMAKE_BUILD_TYPE=Release ../NativeCode
make
- name: 'Run CMake - x86'
run: |
cd main
mkdir build-x86
cd build-x86
JAVA_HOME=/usr/lib/jvm/default-java cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-m32 ../NativeCode
make
- uses: actions/upload-artifact@v3
if: success()
with:
name: linux-amd64
path: main/build-amd64/libjavaserial.so
- uses: actions/upload-artifact@v3
if: success()
with:
name: linux-x86
path: main/build-x86/libjavaserial.so
linux-armhf:
name: JavaSerial-native-linux-armhf
runs-on: ubuntu-latest
timeout-minutes: 38
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get install -y default-jdk gcc-arm-linux-gnueabihf
- name: 'Run CMake - armhf'
run: |
cd main
mkdir build-armhf
cd build-armhf
JAVA_HOME=/usr/lib/jvm/default-java cmake -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_BUILD_TYPE=Release ../NativeCode
make
- uses: actions/upload-artifact@v3
if: success()
with:
name: linux-armhf
path: main/build-armhf/libjavaserial.so
linux-arm64:
name: JavaSerial-native-linux-arm64
runs-on: ubuntu-latest
timeout-minutes: 38
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get install -y default-jdk gcc-aarch64-linux-gnu
- name: 'Run CMake - arm64'
run: |
cd main
mkdir build-arm64
cd build-arm64
JAVA_HOME=/usr/lib/jvm/default-java cmake -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_BUILD_TYPE=Release ../NativeCode
make
- uses: actions/upload-artifact@v3
if: success()
with:
name: linux-arm64
path: main/build-arm64/libjavaserial.so
win:
name: JavaSerial-native-Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Run CMake - amd64'
run: |
$THISDIR=Get-Location
cd main
mkdir build-64
cd build-64
cmake -A x64 ../NativeCode
cmake --build . --config Release
- name: 'Run CMake - x86'
run: |
$THISDIR=Get-Location
cd main
mkdir build-86
cd build-86
cmake -A Win32 ../NativeCode
cmake --build . --config Release
- uses: actions/upload-artifact@v3
if: success()
with:
name: win-amd64
path: main/build-64/Release/javaserial.dll
- uses: actions/upload-artifact@v3
if: success()
with:
name: win-x86
path: main/build-86/Release/javaserial.dll
osx:
name: JavaSerial-native-OSX
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Run CMake - amd64'
run: |
cd main
mkdir build-amd64
cd build-amd64
cmake -DCMAKE_BUILD_TYPE=Release ../NativeCode
make
- name: 'Run CMake - arm64'
run: |
cd main
mkdir build-arm64
cd build-arm64
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 ../NativeCode
make
- uses: actions/upload-artifact@v3
if: success()
with:
name: osx-amd64
path: main/build-amd64/libjavaserial.dylib
- uses: actions/upload-artifact@v3
if: success()
with:
name: osx-arm64
path: main/build-arm64/libjavaserial.dylib