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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
name: Build TidesDB from source
on:
push:
branches:
pull_request:
branches:
workflow_dispatch:
jobs:
build-from-source:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux x64
- os: ubuntu-24.04-arm
name: Linux ARM64
- os: macos-latest
name: macOS x64
- os: windows-latest
name: Windows x64
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y libzstd-dev liblz4-dev libsnappy-dev build-essential cmake pkg-config
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install zstd lz4 snappy cmake
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
mingw-w64-x86_64-zstd
mingw-w64-x86_64-lz4
mingw-w64-x86_64-snappy
mingw-w64-x86_64-rust
- name: Create CMake config files for MSYS2 packages (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
MINGW_PREFIX_WIN=$(cygpath -m /mingw64)
mkdir -p /mingw64/lib/cmake/lz4
mkdir -p /mingw64/lib/cmake/zstd
mkdir -p /mingw64/lib/cmake/Snappy
mkdir -p /mingw64/lib/cmake/PThreads4W
cat > /mingw64/lib/cmake/lz4/lz4-config.cmake << EOF
if(NOT TARGET lz4::lz4)
add_library(lz4::lz4 SHARED IMPORTED)
set_target_properties(lz4::lz4 PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/liblz4.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/liblz4.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
cat > /mingw64/lib/cmake/zstd/zstd-config.cmake << EOF
if(NOT TARGET zstd::libzstd_shared)
add_library(zstd::libzstd_shared SHARED IMPORTED)
set_target_properties(zstd::libzstd_shared PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/libzstd.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/libzstd.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
cat > /mingw64/lib/cmake/Snappy/Snappy-config.cmake << EOF
if(NOT TARGET Snappy::snappy)
add_library(Snappy::snappy SHARED IMPORTED)
set_target_properties(Snappy::snappy PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/libsnappy.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/libsnappy.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
cat > /mingw64/lib/cmake/PThreads4W/PThreads4W-config.cmake << EOF
if(NOT TARGET PThreads4W::PThreads4W)
add_library(PThreads4W::PThreads4W SHARED IMPORTED)
set_target_properties(PThreads4W::PThreads4W PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/libwinpthread-1.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/libpthread.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
- name: Install Rust toolchain
if: runner.os != 'Windows'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
- name: Build from source (Linux)
if: runner.os == 'Linux'
run: cargo build --release
- name: Build from source (macOS)
if: runner.os == 'macOS'
run: cargo build --release
- name: Build from source (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export PATH="/mingw64/bin:$PATH"
cargo build --release
build-from-source-objectstore:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux x64 (objectstore)
- os: ubuntu-24.04-arm
name: Linux ARM64 (objectstore)
- os: macos-latest
name: macOS x64 (objectstore)
- os: windows-latest
name: Windows x64 (objectstore)
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y libzstd-dev liblz4-dev libsnappy-dev libcurl4-openssl-dev libssl-dev build-essential cmake pkg-config
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install zstd lz4 snappy cmake curl openssl
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
mingw-w64-x86_64-zstd
mingw-w64-x86_64-lz4
mingw-w64-x86_64-snappy
mingw-w64-x86_64-curl
mingw-w64-x86_64-openssl
mingw-w64-x86_64-rust
- name: Create CMake config files for MSYS2 packages (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
MINGW_PREFIX_WIN=$(cygpath -m /mingw64)
mkdir -p /mingw64/lib/cmake/lz4
mkdir -p /mingw64/lib/cmake/zstd
mkdir -p /mingw64/lib/cmake/Snappy
mkdir -p /mingw64/lib/cmake/PThreads4W
cat > /mingw64/lib/cmake/lz4/lz4-config.cmake << EOF
if(NOT TARGET lz4::lz4)
add_library(lz4::lz4 SHARED IMPORTED)
set_target_properties(lz4::lz4 PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/liblz4.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/liblz4.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
cat > /mingw64/lib/cmake/zstd/zstd-config.cmake << EOF
if(NOT TARGET zstd::libzstd_shared)
add_library(zstd::libzstd_shared SHARED IMPORTED)
set_target_properties(zstd::libzstd_shared PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/libzstd.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/libzstd.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
cat > /mingw64/lib/cmake/Snappy/Snappy-config.cmake << EOF
if(NOT TARGET Snappy::snappy)
add_library(Snappy::snappy SHARED IMPORTED)
set_target_properties(Snappy::snappy PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/libsnappy.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/libsnappy.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
cat > /mingw64/lib/cmake/PThreads4W/PThreads4W-config.cmake << EOF
if(NOT TARGET PThreads4W::PThreads4W)
add_library(PThreads4W::PThreads4W SHARED IMPORTED)
set_target_properties(PThreads4W::PThreads4W PROPERTIES
IMPORTED_LOCATION "${MINGW_PREFIX_WIN}/bin/libwinpthread-1.dll"
IMPORTED_IMPLIB "${MINGW_PREFIX_WIN}/lib/libpthread.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${MINGW_PREFIX_WIN}/include"
)
endif()
EOF
- name: Install Rust toolchain
if: runner.os != 'Windows'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
- name: Build from source with objectstore (Unix)
if: runner.os != 'Windows'
run: cargo build --release --features objectstore
- name: Build from source with objectstore (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export PATH="/mingw64/bin:$PATH"
cargo build --release --features objectstore