Skip to content

Commit ec6b81d

Browse files
committed
Add Linux AArch64 build
1 parent 42a954f commit ec6b81d

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.cargo/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.aarch64-unknown-linux-gnu]
2+
linker = "aarch64-linux-gnu-gcc"

.github/workflows/build.yml

+27-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ jobs:
3939
name: linux-x86
4040
path: target/i686-unknown-linux-gnu/release/libxlite.so
4141

42+
build-linux-aarch64:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
- name: Install target
47+
run: sudo apt install -y gcc-aarch64-linux-gnu && rustup target install aarch64-unknown-linux-gnu
48+
- name: Build release
49+
run: cargo build --release --target=aarch64-unknown-linux-gnu
50+
- uses: actions/upload-artifact@v3
51+
with:
52+
name: linux-aarch64
53+
path: target/aarch64-unknown-linux-gnu/release/libxlite.so
54+
4255
build-windows-x64:
4356
runs-on: windows-latest
4457
steps:
@@ -101,6 +114,7 @@ jobs:
101114
needs:
102115
- build-linux-x64
103116
- build-linux-x86
117+
- build-linux-aarch64
104118
- build-windows-x64
105119
- build-windows-x86
106120
- build-macos-x64
@@ -117,6 +131,8 @@ jobs:
117131
run: mv linux-x64/libxlite.so ./libxlite.so && tar -zcvf libxlite-linux-x64.tar.gz libxlite.so && rm libxlite.so
118132
- name: Archive linux-x86
119133
run: mv linux-x86/libxlite.so ./libxlite.so && tar -zcvf libxlite-linux-x86.tar.gz libxlite.so && rm libxlite.so
134+
- name: Archive linux-aarch64
135+
run: mv linux-aarch64/libxlite.so ./libxlite.so && tar -zcvf libxlite-linux-aarch64.tar.gz libxlite.so && rm libxlite.so
120136
- name: Archive windows-x64
121137
run: mv windows-x64/xlite.dll ./xlite.dll && zip xlite-windows-x64.zip xlite.dll && rm xlite.dll
122138
- name: Archive windows-x86
@@ -133,7 +149,7 @@ jobs:
133149
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134150
with:
135151
tag_name: ${{ github.ref }}
136-
release_name: Release ${{ github.ref }}
152+
release_name: ${{ github.ref }}
137153
body: Release ${{ github.ref }} ${{ env.RELEASE_DATE }}
138154
draft: false
139155
prerelease: false
@@ -158,6 +174,16 @@ jobs:
158174
asset_name: libxlite-linux-x86.tar.gz
159175
asset_content_type: application/octet-stream
160176

177+
- name: Upload linux-aarch64 artifact
178+
uses: actions/upload-release-asset@v1
179+
env:
180+
GITHUB_TOKEN: ${{ github.token }}
181+
with:
182+
upload_url: ${{ steps.create_release.outputs.upload_url }}
183+
asset_path: ./libxlite-linux-aarch64.tar.gz
184+
asset_name: libxlite-linux-aarch64.tar.gz
185+
asset_content_type: application/octet-stream
186+
161187
- name: Upload windows-x64 artifact
162188
uses: actions/upload-release-asset@v1
163189
env:

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xlite"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
edition = "2021"
55

66
[lib]

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ The following prebuilt libraries are available for [download](https://github.com
1414
|--|--|--|--|
1515
| x86 | [libxlite.so.tar.gz](https://github.com/x2bool/xlite/releases/latest/download/libxlite-linux-x86.tar.gz)| [xlite.dll.zip](https://github.com/x2bool/xlite/releases/latest/download/xlite-windows-x86.zip)| N/A |
1616
| x86-64 | [libxlite.so.tar.gz](https://github.com/x2bool/xlite/releases/latest/download/libxlite-linux-x64.tar.gz)| [xlite.dll.zip](https://github.com/x2bool/xlite/releases/latest/download/xlite-windows-x64.zip)| [libxlite.dylib.zip](https://github.com/x2bool/xlite/releases/latest/download/libxlite-macos-x64.zip) |
17-
| AArch64 | | | [libxlite.dylib.zip](https://github.com/x2bool/xlite/releases/latest/download/libxlite-macos-aarch64.zip) |
18-
19-
Please contribute the missing build targets if you know how to implement them with GitHub Actions.
17+
| AArch64 (ARM64) | [libxlite.so.tar.gz](https://github.com/x2bool/xlite/releases/latest/download/libxlite-linux-aarch64.tar.gz)| | [libxlite.dylib.zip](https://github.com/x2bool/xlite/releases/latest/download/libxlite-macos-aarch64.zip) |
2018

2119
### How to build
2220

0 commit comments

Comments
 (0)