Skip to content

Commit 70c5006

Browse files
committed
Merge upstream changes and resolve fuzzing conflicts
2 parents eb1b1f3 + 30e84d7 commit 70c5006

25 files changed

+533
-159
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ jobs:
9292
arch: x86_64
9393
ext: tar.gz
9494

95+
- target: i686-unknown-linux-gnu
96+
os: ubuntu-22.04
97+
platform: linux
98+
arch: x86
99+
ext: tar.gz
100+
95101
- target: aarch64-unknown-linux-gnu
96102
os: ubuntu-22.04-arm
97103
platform: linux
@@ -110,6 +116,12 @@ jobs:
110116
arch: x86_64
111117
ext: zip
112118

119+
- target: i686-pc-windows-msvc
120+
os: windows-2022
121+
platform: windows
122+
arch: x86
123+
ext: zip
124+
113125
- target: aarch64-pc-windows-msvc
114126
os: windows-11-arm
115127
platform: windows
@@ -124,21 +136,30 @@ jobs:
124136
with:
125137
toolchain: stable
126138

127-
- name: Build release binaries
128-
run: cargo build --all-features --release
139+
- name: Install cross
140+
if: matrix.target == 'i686-unknown-linux-gnu'
141+
run: cargo install cross --git https://github.com/cross-rs/cross
142+
143+
- name: Build release binaries (native)
144+
if: matrix.target != 'i686-unknown-linux-gnu'
145+
run: cargo build --all-features --release --target ${{ matrix.target }}
146+
147+
- name: Build release binaries (cross)
148+
if: matrix.target == 'i686-unknown-linux-gnu'
149+
run: cross build --all-features --release --target ${{ matrix.target }}
129150

130151
- name: Verify library files (Unix)
131152
if: runner.os != 'Windows'
132153
shell: bash
133154
run: |
134155
echo "Verifying library files..."
135156
if [ "${{ matrix.platform }}" = "linux" ]; then
136-
test -f target/release/libcrc_fast.so || { echo "Missing libcrc_fast.so"; exit 1; }
137-
test -f target/release/libcrc_fast.a || { echo "Missing libcrc_fast.a"; exit 1; }
157+
test -f target/${{ matrix.target }}/release/libcrc_fast.so || { echo "Missing libcrc_fast.so"; exit 1; }
158+
test -f target/${{ matrix.target }}/release/libcrc_fast.a || { echo "Missing libcrc_fast.a"; exit 1; }
138159
echo "✓ Found libcrc_fast.so and libcrc_fast.a"
139160
elif [ "${{ matrix.platform }}" = "macos" ]; then
140-
test -f target/release/libcrc_fast.dylib || { echo "Missing libcrc_fast.dylib"; exit 1; }
141-
test -f target/release/libcrc_fast.a || { echo "Missing libcrc_fast.a"; exit 1; }
161+
test -f target/${{ matrix.target }}/release/libcrc_fast.dylib || { echo "Missing libcrc_fast.dylib"; exit 1; }
162+
test -f target/${{ matrix.target }}/release/libcrc_fast.a || { echo "Missing libcrc_fast.a"; exit 1; }
142163
echo "✓ Found libcrc_fast.dylib and libcrc_fast.a"
143164
fi
144165
@@ -147,15 +168,15 @@ jobs:
147168
shell: pwsh
148169
run: |
149170
Write-Host "Verifying library files..."
150-
if (-not (Test-Path "target/release/crc_fast.dll")) {
171+
if (-not (Test-Path "target/${{ matrix.target }}/release/crc_fast.dll")) {
151172
Write-Error "Missing crc_fast.dll"
152173
exit 1
153174
}
154-
if (-not (Test-Path "target/release/crc_fast.dll.lib")) {
175+
if (-not (Test-Path "target/${{ matrix.target }}/release/crc_fast.dll.lib")) {
155176
Write-Error "Missing crc_fast.dll.lib"
156177
exit 1
157178
}
158-
if (-not (Test-Path "target/release/crc_fast.lib")) {
179+
if (-not (Test-Path "target/${{ matrix.target }}/release/crc_fast.lib")) {
159180
Write-Error "Missing crc_fast.lib"
160181
exit 1
161182
}
@@ -166,25 +187,25 @@ jobs:
166187
shell: bash
167188
run: |
168189
echo "Verifying CLI binaries..."
169-
test -f target/release/checksum || { echo "Missing checksum"; exit 1; }
170-
test -f target/release/arch-check || { echo "Missing arch-check"; exit 1; }
171-
test -f target/release/get-custom-params || { echo "Missing get-custom-params"; exit 1; }
190+
test -f target/${{ matrix.target }}/release/checksum || { echo "Missing checksum"; exit 1; }
191+
test -f target/${{ matrix.target }}/release/arch-check || { echo "Missing arch-check"; exit 1; }
192+
test -f target/${{ matrix.target }}/release/get-custom-params || { echo "Missing get-custom-params"; exit 1; }
172193
echo "✓ Found checksum, arch-check, and get-custom-params"
173194
174195
- name: Verify CLI binaries (Windows)
175196
if: runner.os == 'Windows'
176197
shell: pwsh
177198
run: |
178199
Write-Host "Verifying CLI binaries..."
179-
if (-not (Test-Path "target/release/checksum.exe")) {
200+
if (-not (Test-Path "target/${{ matrix.target }}/release/checksum.exe")) {
180201
Write-Error "Missing checksum.exe"
181202
exit 1
182203
}
183-
if (-not (Test-Path "target/release/arch-check.exe")) {
204+
if (-not (Test-Path "target/${{ matrix.target }}/release/arch-check.exe")) {
184205
Write-Error "Missing arch-check.exe"
185206
exit 1
186207
}
187-
if (-not (Test-Path "target/release/get-custom-params.exe")) {
208+
if (-not (Test-Path "target/${{ matrix.target }}/release/get-custom-params.exe")) {
188209
Write-Error "Missing get-custom-params.exe"
189210
exit 1
190211
}
@@ -202,16 +223,16 @@ jobs:
202223
mkdir -p "$PKG_NAME/bin"
203224
204225
echo "Copying library files..."
205-
cp target/release/libcrc_fast.so "$PKG_NAME/lib/"
206-
cp target/release/libcrc_fast.a "$PKG_NAME/lib/"
226+
cp target/${{ matrix.target }}/release/libcrc_fast.so "$PKG_NAME/lib/"
227+
cp target/${{ matrix.target }}/release/libcrc_fast.a "$PKG_NAME/lib/"
207228
208229
echo "Copying header file..."
209230
cp libcrc_fast.h "$PKG_NAME/include/"
210231
211232
echo "Copying CLI binaries..."
212-
cp target/release/checksum "$PKG_NAME/bin/"
213-
cp target/release/arch-check "$PKG_NAME/bin/"
214-
cp target/release/get-custom-params "$PKG_NAME/bin/"
233+
cp target/${{ matrix.target }}/release/checksum "$PKG_NAME/bin/"
234+
cp target/${{ matrix.target }}/release/arch-check "$PKG_NAME/bin/"
235+
cp target/${{ matrix.target }}/release/get-custom-params "$PKG_NAME/bin/"
215236
216237
echo "Setting executable permissions on binaries..."
217238
chmod +x "$PKG_NAME/bin/checksum"
@@ -328,16 +349,16 @@ jobs:
328349
mkdir -p "$PKG_NAME/bin"
329350
330351
echo "Copying library files..."
331-
cp target/release/libcrc_fast.dylib "$PKG_NAME/lib/"
332-
cp target/release/libcrc_fast.a "$PKG_NAME/lib/"
352+
cp target/${{ matrix.target }}/release/libcrc_fast.dylib "$PKG_NAME/lib/"
353+
cp target/${{ matrix.target }}/release/libcrc_fast.a "$PKG_NAME/lib/"
333354
334355
echo "Copying header file..."
335356
cp libcrc_fast.h "$PKG_NAME/include/"
336357
337358
echo "Copying CLI binaries..."
338-
cp target/release/checksum "$PKG_NAME/bin/"
339-
cp target/release/arch-check "$PKG_NAME/bin/"
340-
cp target/release/get-custom-params "$PKG_NAME/bin/"
359+
cp target/${{ matrix.target }}/release/checksum "$PKG_NAME/bin/"
360+
cp target/${{ matrix.target }}/release/arch-check "$PKG_NAME/bin/"
361+
cp target/${{ matrix.target }}/release/get-custom-params "$PKG_NAME/bin/"
341362
342363
echo "Setting executable permissions on binaries..."
343364
chmod +x "$PKG_NAME/bin/checksum"
@@ -453,17 +474,17 @@ jobs:
453474
New-Item -ItemType Directory -Path "$PKG_NAME/include" -Force | Out-Null
454475
455476
Write-Host "Copying library files..."
456-
Copy-Item "target/release/crc_fast.dll" "$PKG_NAME/bin/"
457-
Copy-Item "target/release/crc_fast.dll.lib" "$PKG_NAME/lib/"
458-
Copy-Item "target/release/crc_fast.lib" "$PKG_NAME/lib/"
477+
Copy-Item "target/${{ matrix.target }}/release/crc_fast.dll" "$PKG_NAME/bin/"
478+
Copy-Item "target/${{ matrix.target }}/release/crc_fast.dll.lib" "$PKG_NAME/lib/"
479+
Copy-Item "target/${{ matrix.target }}/release/crc_fast.lib" "$PKG_NAME/lib/"
459480
460481
Write-Host "Copying header file..."
461482
Copy-Item "libcrc_fast.h" "$PKG_NAME/include/"
462483
463484
Write-Host "Copying CLI binaries..."
464-
Copy-Item "target/release/checksum.exe" "$PKG_NAME/bin/"
465-
Copy-Item "target/release/arch-check.exe" "$PKG_NAME/bin/"
466-
Copy-Item "target/release/get-custom-params.exe" "$PKG_NAME/bin/"
485+
Copy-Item "target/${{ matrix.target }}/release/checksum.exe" "$PKG_NAME/bin/"
486+
Copy-Item "target/${{ matrix.target }}/release/arch-check.exe" "$PKG_NAME/bin/"
487+
Copy-Item "target/${{ matrix.target }}/release/get-custom-params.exe" "$PKG_NAME/bin/"
467488
468489
Write-Host "Creating VERSION file..."
469490
"$env:TAG_NAME" | Out-File -FilePath "$PKG_NAME/VERSION" -Encoding utf8 -NoNewline
@@ -641,12 +662,16 @@ jobs:
641662
EXPECTED_FILES=(
642663
"crc-fast-$TAG_NAME-linux-x86_64.tar.gz"
643664
"crc-fast-$TAG_NAME-linux-x86_64.tar.gz.sha256"
665+
"crc-fast-$TAG_NAME-linux-x86.tar.gz"
666+
"crc-fast-$TAG_NAME-linux-x86.tar.gz.sha256"
644667
"crc-fast-$TAG_NAME-linux-aarch64.tar.gz"
645668
"crc-fast-$TAG_NAME-linux-aarch64.tar.gz.sha256"
646669
"crc-fast-$TAG_NAME-macos-aarch64.tar.gz"
647670
"crc-fast-$TAG_NAME-macos-aarch64.tar.gz.sha256"
648671
"crc-fast-$TAG_NAME-windows-x86_64.zip"
649672
"crc-fast-$TAG_NAME-windows-x86_64.zip.sha256"
673+
"crc-fast-$TAG_NAME-windows-x86.zip"
674+
"crc-fast-$TAG_NAME-windows-x86.zip.sha256"
650675
"crc-fast-$TAG_NAME-windows-aarch64.zip"
651676
"crc-fast-$TAG_NAME-windows-aarch64.zip.sha256"
652677
)

0 commit comments

Comments
 (0)