|
35 | 35 | prerelease: false
|
36 | 36 | bodyFile: BODY.md
|
37 | 37 | publish-release:
|
38 |
| - name: Publishing for ${{ matrix.os }} |
| 38 | + name: Publishing for ${{ matrix.target }} |
39 | 39 | runs-on: ${{ matrix.os }}
|
40 | 40 | strategy:
|
41 | 41 | fail-fast: false
|
@@ -227,7 +227,29 @@ jobs:
|
227 | 227 | cp man/tv.1 "$DEPLOY_DIR/"
|
228 | 228 | - name: Build release binary
|
229 | 229 | shell: bash
|
230 |
| - run: "# Add cargo bin to PATH for this step\nexport PATH=\"$HOME/.cargo/bin:$PATH\"\n\nversion=\"${{ github.ref_name }}\"\nDEB_NAME=\"tv-$version-${{ matrix.target }}.deb\"\nDEB_DIR=\"target/${{ matrix.target }}/debian\"\n\n# Build the actual binary\n# if aarch64, we need to install the cross compiler since we're running x86_64\nif [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then\n sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu\n \n cargo deb --profile deb --target ${{ matrix.target }} -o \"$DEB_DIR/$DEB_NAME\" \\\n --cargo-build cross \\\n -- --no-default-features --features zero-copy,simd,fancy\nelse\n cargo deb --profile deb --target ${{ matrix.target }} -o \"$DEB_DIR/$DEB_NAME\"\nfi\n\necho \"DEB_DIR=$DEB_DIR\" >> $GITHUB_ENV\necho \"DEB_NAME=$DEB_NAME\" >> $GITHUB_ENV\n" |
| 230 | + run: | |
| 231 | + # Add cargo bin to PATH for this step |
| 232 | + export PATH="$HOME/.cargo/bin:$PATH" |
| 233 | +
|
| 234 | + version="${{ github.ref_name }}" |
| 235 | + DEB_NAME="tv-$version-${{ matrix.target }}.deb" |
| 236 | + DEB_DIR="target/${{ matrix.target }}/debian" |
| 237 | +
|
| 238 | + # Build the actual binary |
| 239 | + # if aarch64, we need to install the cross compiler since we're running x86_64 |
| 240 | + if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then |
| 241 | + sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross |
| 242 | +
|
| 243 | + # Set up cross-compilation environment |
| 244 | + export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc |
| 245 | + export AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar |
| 246 | + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc |
| 247 | + fi |
| 248 | +
|
| 249 | + cargo deb --profile deb --target ${{ matrix.target }} -o "$DEB_DIR/$DEB_NAME" |
| 250 | +
|
| 251 | + echo "DEB_DIR=$DEB_DIR" >> $GITHUB_ENV |
| 252 | + echo "DEB_NAME=$DEB_NAME" >> $GITHUB_ENV |
231 | 253 | - name: Create sha256 sum of deb file
|
232 | 254 | shell: bash
|
233 | 255 | run: |
|
|
0 commit comments