1- name : Deduplicator Build & Release CI Pipeline
1+ name : Deduplicator Release Build CI Pipeline
22
33on :
44 push :
@@ -35,15 +35,19 @@ jobs:
3535 - target : aarch64-unknown-linux-gnu
3636 os : ubuntu-latest
3737 artifact_name : linux-aarch64
38+ rustflags : " "
3839 - target : x86_64-unknown-linux-gnu
3940 os : ubuntu-latest
4041 artifact_name : linux-amd64
42+ rustflags : " -C target-feature=+aes,+sse2"
4143 - target : x86_64-apple-darwin
4244 os : macos-14
4345 artifact_name : macos-amd64
46+ rustflags : " -C target-feature=+aes,+sse2"
4447 - target : aarch64-apple-darwin
4548 os : macos-14
4649 artifact_name : macos-arm64
50+ rustflags : " "
4751
4852 steps :
4953 - name : Checkout repository
@@ -56,11 +60,20 @@ jobs:
5660 run : rustup target add ${{ matrix.target }}
5761
5862 - name : Build release binary
63+ env :
64+ RUSTFLAGS : ${{ matrix.rustflags }}
5965 run : cargo build --release --target ${{ matrix.target }}
6066
6167 - name : Package binary
6268 run : |
63- BINARY_NAME=$(basename $(find target/${{ matrix.target }}/release -maxdepth 1 -type f -executable | head -1))
69+ if [[ "${{ matrix.os }}" == macos* ]]; then
70+ BINARY_NAME=$(find target/${{ matrix.target }}/release -maxdepth 1 -type f -perm +111 -print0 | xargs -0 basename | head -1)
71+ else
72+ # Linux uses GNU find which supports -executable
73+ BINARY_NAME=$(find target/${{ matrix.target }}/release -maxdepth 1 -type f -executable -print0 | xargs -0 basename | head -1)
74+ fi
75+
76+ echo "Packaging binary: $BINARY_NAME"
6477 mkdir -p release
6578 cp target/${{ matrix.target }}/release/$BINARY_NAME release/$BINARY_NAME
6679 tar -C release -czf ${{ matrix.artifact_name }}.tar.gz $BINARY_NAME
0 commit comments