-
Notifications
You must be signed in to change notification settings - Fork 0
200 lines (188 loc) · 6.61 KB
/
build.yaml
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
---
name: build
on:
push:
# release:
# types: [created]
jobs:
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Install dependencies
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
choco install cmake
refreshenv
Write-Output "$env:PATH" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: boost
run: |
Invoke-WebRequest https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz -OutFile boost.tar.gz
tar -xzf .\boost.tar.gz
Rename-Item -path boost_1_84_0 -NewName boost_libs
- name: MsgPack
run: |
Invoke-WebRequest https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.0/msgpack-cxx-6.1.0.tar.gz -OutFile msgpack.tar.gz
tar -xzf .\msgpack.tar.gz
cd msgpack-cxx-6.1.0
cmake -DMSGPACK_CXX14=ON -D Boost_INCLUDE_DIR=..\boost_libs .
msbuild ALL_BUILD.vcxproj -t:rebuild -property:Configuration=Release
msbuild INSTALL.vcxproj -t:rebuild -property:Configuration=Release
- name: LibSodium
run: |
Invoke-WebRequest https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip -OutFile libsodium.zip
Expand-Archive libsodium.zip .
- name: LibSaltpack
run: |
Invoke-WebRequest https://github.com/gherynos/libsaltpack/archive/v0.3.3.tar.gz -OutFile libsaltpack.tar.gz
tar -xvzf .\libsaltpack.tar.gz
cd libsaltpack-0.3.3
git clone https://github.com/983/Num.git ext/Num
cmake -D Boost_INCLUDE_DIR=..\boost_libs -D MSGPACK_INCLUDE_DIR="C:/Program Files (x86)/msgpack-cxx/include/" -D LIBSODIUM_INCLUDE_DIRS=..\libsodium\include -D LIBSODIUM_LIBRARIES=..\libsodium\x64\Release\v143\static\libsodium.lib .
msbuild saltpack.vcxproj -t:rebuild -property:Configuration=Release
- name: Build
run: |
# mvn compile
cmake -D Boost_INCLUDE_DIR=.\boost_libs -D MSGPACK_INCLUDE_DIR="C:/Program Files (x86)/msgpack-cxx/include/" -D sodium_USE_STATIC_LIBS=1 -D sodium_DIR=.\libsodium -D LIBSALTPACK_INCLUDE_DIRS=.\libsaltpack-0.3.3\include -D LIBSALTPACK_LIBRARIES=.\libsaltpack-0.3.3\Release\saltpack.lib .
msbuild saltpack-jni.vcxproj -t:rebuild -property:Configuration=Release
# cp ./Release/* .
# mvn exec:java -D exec.mainClass="com.gherynos.libsaltpack.Loader"
cd Release
dir
# unix:
# strategy:
# matrix:
# os: [ubuntu-22.04, macos-13, macos-14]
# include:
# - os: ubuntu-22.04
# java_home: /usr/lib/jvm/java-17-openjdk-amd64
# library: libsaltpack-jni.so
# - os: macos-13
# java_home: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
# library: libsaltpack-jni.dylib
# - os: macos-14
# java_home: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
# library: libsaltpack-jni.dylib
# runs-on: ${{ matrix.os }}
#
# steps:
# - uses: actions/checkout@v4
#
# - if: runner.os == 'Linux'
# name: Linux dependencies
# run: |
# sudo apt-get install -y build-essential wget cmake openjdk-17-jdk maven xz-utils m4
#
# - if: runner.os == 'macOS'
# name: macOS dependencies
# env:
# HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
# HOMEBREW_NO_AUTO_UPDATE: 1
# run: |
# brew tap homebrew/cask-versions
# brew install --cask temurin17
#
# - name: boost
# run: |
# wget https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz
# tar -xzf boost_1_84_0.tar.gz
# mv boost_1_84_0 boost_libs
#
# - name: MsgPack
# run: |
# wget https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.0/msgpack-cxx-6.1.0.tar.gz
# tar -xvzf msgpack-cxx-6.1.0.tar.gz
# pushd msgpack-cxx-6.1.0
# cmake -DMSGPACK_CXX14=ON -DBoost_INCLUDE_DIR=../boost_libs .
# sudo cmake --build . --target install
# popd
#
# - name: LibSodium
# run: |
# wget https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz
# tar -xvzf libsodium-1.0.19.tar.gz
# pushd libsodium-stable
# ./configure --with-pic
# make
# sudo make install
# popd
#
# - name: LibSaltpack
# run: |
# wget https://github.com/gherynos/libsaltpack/archive/v0.3.3.tar.gz
# tar -xvzf v0.3.3.tar.gz
# pushd libsaltpack-0.3.3
# git clone https://github.com/983/Num.git ext/Num
# cmake -DBoost_INCLUDE_DIR=../boost_libs .
# make
# sudo make install
# popd
#
# - name: Build
# run: |
# mvn compile
# cmake -DBoost_INCLUDE_DIR=./boost_libs .
# make
# mvn exec:java -Dexec.mainClass="com.gherynos.libsaltpack.Loader"
# rm ${{ matrix.library }}
# mvn test
#
# env:
# JAVA_HOME: ${{ matrix.java_home }}
#
# - if: runner.os == 'Linux' && github.event_name == 'push'
# name: Coveralls report
# run: mvn jacoco:report coveralls:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}
#
# - uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.os }}.zip
# path: src/main/resources/lib/
# assemble:
# needs: unix
# runs-on: ubuntu-22.04
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Libraries path
# run: |
# mkdir -p src/main/resources/lib
#
# - uses: actions/download-artifact@v4
# with:
# name: ubuntu-22.04.zip
# path: src/main/resources/lib
#
# - uses: actions/download-artifact@v4
# with:
# name: macos-13.zip
# path: src/main/resources/lib
#
# - uses: actions/download-artifact@v4
# with:
# name: macos-14.zip
# path: src/main/resources/lib
#
# - uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
#
# - name: Package
# run: |
# mvn package
#
# - if: github.event_name == 'release'
# name: Publish
# run: |
# mvn --batch-mode deploy
#
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}