Skip to content

Commit 4b2396d

Browse files
NickeZemilio
authored andcommitted
Github action: Add aarch64 to deploy
cross compiler package (gcc-11-aarch64-linux-gnu) only available starting with 22.04
1 parent 2320ac4 commit 4b2396d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ jobs:
1414
# someone with permissions to create a tag.
1515
contents: write
1616

17-
runs-on: ubuntu-20.04
17+
runs-on: ubuntu-22.04
1818

1919
steps:
2020
- uses: actions/checkout@v3
2121

2222
- name: Install stable
2323
uses: dtolnay/rust-toolchain@stable
24+
with:
25+
targets: aarch64-unknown-linux-gnu
26+
27+
- name: Install cross libc
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y libc6-arm64-cross gcc-11-aarch64-linux-gnu
2431
2532
- name: semver
2633
run: |
@@ -30,10 +37,12 @@ jobs:
3037
- name: Build cbindgen
3138
run: |
3239
cargo +stable build --release
40+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc-11 cargo +stable build --target aarch64-unknown-linux-gnu --release
3341
3442
- name: Strip cbindgen
3543
run: |
3644
strip target/release/cbindgen
45+
aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/cbindgen
3746
3847
- name: Handle release data and files
3948
id: tagName
@@ -51,6 +60,8 @@ jobs:
5160
- name: Create a release
5261
run: |
5362
TAG=${{ steps.tagName.outputs.version }}
54-
gh release create ${TAG} --title "${TAG}" --notes-file "CHANGES.txt" --draft 'target/release/cbindgen#cbindgen-ubuntu20.04'
63+
cp target/release/cbindgen cbindgen-ubuntu22.04
64+
cp target/aarch64-unknown-linux-gnu/release/cbindgen cbindgen-ubuntu22.04-aarch64
65+
gh release create ${TAG} --title "${TAG}" --notes-file "CHANGES.txt" --draft cbindgen-ubuntu22.04 cbindgen-ubuntu22.04-aarch64
5566
env:
5667
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)