Skip to content

Commit a297b29

Browse files
committed
ci: Add support for RISC-V 64bits
1 parent 75c5156 commit a297b29

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/CICD.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ jobs:
174174
- { target: aarch64-pc-windows-msvc , os: windows-11-arm, }
175175
- { target: x86_64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: amd64, use-cross: true }
176176
- { target: x86_64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-amd64, use-cross: true }
177+
- { target: riscv64gc-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: riscv64, use-cross: true }
178+
- { target: riscv64gc-unknown-linux-musl, os: ubuntu-latest , dpkg_arch: musl-linux-riscv64, use-cross: true }
177179
env:
178180
BUILD_CMD: cargo
179181
steps:
@@ -186,6 +188,7 @@ jobs:
186188
case ${{ matrix.job.target }} in
187189
arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
188190
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
191+
riscv64gc-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-riscv64-linux-gnu ;;
189192
esac
190193
191194
- name: Install Rust toolchain
@@ -238,9 +241,9 @@ jobs:
238241
id: test-options
239242
shell: bash
240243
run: |
241-
# test only library unit tests and binary for arm-type targets
244+
# test only library unit tests and binary for cross-compiled targets
242245
unset CARGO_TEST_OPTIONS
243-
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${{ needs.crate_metadata.outputs.name }}" ;; esac;
246+
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-* | riscv64*) CARGO_TEST_OPTIONS="--lib --bin ${{ needs.crate_metadata.outputs.name }}" ;; esac;
244247
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT
245248
246249
- name: Run tests

0 commit comments

Comments
 (0)