Skip to content

Commit 0218cdf

Browse files
authored
Merge pull request #14 from alithethird/fix/cross-compile
Fix: Use cross for cross compilation
2 parents ab35d35 + adc942e commit 0218cdf

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ jobs:
4444
profile: minimal
4545
target: ${{ matrix.target }}
4646

47-
- name: Build release binary
47+
- name: Build release binary (ARM Linux native)
48+
if: matrix.target == 'aarch64-unknown-linux-gnu'
49+
run: |
50+
cargo install cross --git https://github.com/cross-rs/cross
51+
cross build --release --target ${{ matrix.target }}
52+
53+
- name: Build release binary (cross-compile)
54+
if: matrix.target != 'aarch64-unknown-linux-gnu'
4855
run: cargo build --release --target ${{ matrix.target }}
4956

5057
- name: Rename binary
@@ -65,7 +72,17 @@ jobs:
6572
- name: Checkout code
6673
uses: actions/checkout@v4
6774
- name: Package source code
68-
run: tar czvf vipyrdocs-source.tar.gz .
75+
uses: a7ul/tar-action@v1.2.0
76+
with:
77+
command: c
78+
cwd: ./
79+
files: |
80+
src/
81+
Cargo.toml
82+
Cargo.lock
83+
README.md
84+
outPath: vipyrdocs-source.tar.gz
85+
6986
- name: Upload source tarball
7087
uses: actions/upload-artifact@v4
7188
with:

0 commit comments

Comments
 (0)