Skip to content

Commit d06fe93

Browse files
committed
fix pipeline breaks
1 parent 6a24ca5 commit d06fe93

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

.cargo/config.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deduplicator Build & Release CI Pipeline
1+
name: Deduplicator Release Build CI Pipeline
22

33
on:
44
push:
@@ -8,6 +8,8 @@ on:
88
jobs:
99
lint_test:
1010
runs-on: ubuntu-latest
11+
env:
12+
RUSTFLAGS: "-C target-feature=+aes,+sse2"
1113
steps:
1214
- name: Checkout repository
1315
uses: actions/checkout@v4
@@ -35,15 +37,19 @@ jobs:
3537
- target: aarch64-unknown-linux-gnu
3638
os: ubuntu-latest
3739
artifact_name: linux-aarch64
40+
rustflags: "-C target-feature=+aes,+neon"
3841
- target: x86_64-unknown-linux-gnu
3942
os: ubuntu-latest
4043
artifact_name: linux-amd64
44+
rustflags: "-C target-feature=+aes,+sse2"
4145
- target: x86_64-apple-darwin
4246
os: macos-14
4347
artifact_name: macos-amd64
48+
rustflags: "-C target-feature=+aes,+sse2"
4449
- target: aarch64-apple-darwin
4550
os: macos-14
4651
artifact_name: macos-arm64
52+
rustflags: "-C target-feature=+aes,+neon"
4753

4854
steps:
4955
- name: Checkout repository
@@ -55,12 +61,31 @@ jobs:
5561
- name: Add target
5662
run: rustup target add ${{ matrix.target }}
5763

64+
- name: Install cross-compilation toolchain (Linux ARM only)
65+
if: matrix.target == 'aarch64-unknown-linux-gnu'
66+
run: |
67+
sudo apt-get update
68+
sudo apt-get install -y gcc-aarch64-linux-gnu
69+
5870
- name: Build release binary
59-
run: cargo build --release --target ${{ matrix.target }}
71+
env:
72+
RUSTFLAGS: ${{ matrix.rustflags }}
73+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && 'aarch64-linux-gnu-gcc' || '' }}
74+
run: |
75+
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
76+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
77+
fi
78+
cargo build --release --target ${{ matrix.target }}
6079
6180
- name: Package binary
6281
run: |
63-
BINARY_NAME=$(basename $(find target/${{ matrix.target }}/release -maxdepth 1 -type f -executable | head -1))
82+
if [[ "${{ matrix.os }}" == macos* ]]; then
83+
BINARY_NAME=$(find target/${{ matrix.target }}/release -maxdepth 1 -type f -perm +111 -print0 | xargs -0 basename | head -1)
84+
else
85+
BINARY_NAME=$(find target/${{ matrix.target }}/release -maxdepth 1 -type f -executable -print0 | xargs -0 basename | head -1)
86+
fi
87+
88+
echo "Packaging binary: $BINARY_NAME"
6489
mkdir -p release
6590
cp target/${{ matrix.target }}/release/$BINARY_NAME release/$BINARY_NAME
6691
tar -C release -czf ${{ matrix.artifact_name }}.tar.gz $BINARY_NAME

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,23 @@ Currently, you can only install deduplicator using cargo package manager.
6161
> GxHash relies on aes hardware acceleration, so please set `RUSTFLAGS` to `"-C target-feature=+aes"` or `"-C target-cpu=native"` before
6262
> installing.
6363
64-
#### install from crates.io
64+
#### install from crates.io (stable)
65+
6566
```bash
6667
$ RUSTFLAGS="-C target-cpu=native" cargo install deduplicator
68+
69+
# or
70+
71+
$ RUSTFLAGS="-C target-feature=+aes,+sse2" cargo install deduplicator
6772
```
6873
69-
#### install from git
74+
#### install from git (nightly)
7075
```bash
7176
$ RUSTFLAGS="-C target-cpu=native" cargo install deduplicator --git https://github.com/sreedevk/deduplicator
77+
78+
# or
79+
80+
$ RUSTFLAGS="-C target-feature=+aes,+sse2" cargo install --git https://github.com/sreedevk/deduplicator
7281
```
7382
7483
## Performance

0 commit comments

Comments
 (0)