Skip to content

Commit 515b6cc

Browse files
committed
riscv64
1 parent 5a9201c commit 515b6cc

File tree

3 files changed

+19
-25
lines changed

3 files changed

+19
-25
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ linker = "arm-linux-gnueabihf-gcc"
44
[target.aarch64-unknown-linux-gnu]
55
ar = "aarch64-linux-gnu-gcc"
66
linker = "aarch64-linux-gnu-gcc"
7+
[target.riscv64gc-unknown-linux-gnu]
8+
ar = "riscv64-linux-gnu-gcc"
9+
linker = "riscv64-linux-gnu-gcc"
710

811
[target.'cfg(target_os = "macos")']
912
rustflags = [

.github/workflows/python.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,30 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
archit: [x86_64, arm, aarch64]
14+
archit: [x86_64, arm, aarch64, riscv64]
1515
include:
1616
- archit: x86_64
1717
target: x86_64-unknown-linux-gnu
18+
image: 14.04
1819
- archit: arm
1920
target: armv7-unknown-linux-gnueabihf
21+
image: 14.04
2022
- archit: aarch64
2123
target: aarch64-unknown-linux-gnu
24+
image: 14.04
25+
- archit: riscv64
26+
target: riscv64gc-unknown-linux-gnu
27+
image: 18.04
2228
runs-on: ubuntu-22.04
2329
steps:
2430
- name: Checkout
2531
uses: actions/checkout@v3
2632
with:
2733
submodules: true
28-
- name: Install Protoc
29-
uses: arduino/setup-protoc@v1
30-
with:
31-
repo-token: ${{ secrets.GITHUB_TOKEN }}
32-
- name: Install Rust
33-
uses: actions-rs/toolchain@v1
34-
with:
35-
toolchain: stable
36-
target: ${{ matrix.target }}
37-
- uses: Swatinem/rust-cache@v2
38-
continue-on-error: true
39-
- name: Install Cross Compiler
40-
if: ${{ matrix.archit == 'arm'}}
41-
run: |
42-
sudo apt-get update
43-
sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
44-
- name: Install Cross Compiler
45-
if: ${{ matrix.archit == 'aarch64'}}
46-
run: |
47-
sudo apt-get update
48-
sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross
4934
- name: Build
5035
uses: PyO3/[email protected]
5136
with:
52-
container: registry.cn-shanghai.aliyuncs.com/lebai/util:14.04
37+
container: registry.cn-shanghai.aliyuncs.com/lebai/util:${{matrix.image}}
5338
manylinux: 2_17
5439
command: build
5540
args: --release --features ffi_py,module,mdns --target ${{matrix.target}} --skip-auditwheel

.github/workflows/python_asyncio.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
archit: [x86_64, arm, aarch64]
14+
archit: [x86_64, arm, aarch64, riscv64]
1515
include:
1616
- archit: x86_64
1717
target: x86_64-unknown-linux-gnu
18+
image: 14.04
1819
- archit: arm
1920
target: armv7-unknown-linux-gnueabihf
21+
image: 14.04
2022
- archit: aarch64
2123
target: aarch64-unknown-linux-gnu
24+
image: 14.04
25+
- archit: riscv64
26+
target: riscv64gc-unknown-linux-gnu
27+
image: 18.04
2228
runs-on: ubuntu-22.04
2329
steps:
2430
- name: Checkout
@@ -34,7 +40,7 @@ jobs:
3440
- name: Build
3541
uses: PyO3/[email protected]
3642
with:
37-
container: registry.cn-shanghai.aliyuncs.com/lebai/util:14.04
43+
container: registry.cn-shanghai.aliyuncs.com/lebai/util:${{matrix.image}}
3844
manylinux: 2_17
3945
command: build
4046
args: --release --features ffi_py_asyncio,module,mdns --target ${{matrix.target}} --skip-auditwheel

0 commit comments

Comments
 (0)