Skip to content

Commit 1c7d389

Browse files
Fearyncessdonmor
andcommitted
ci: enable loongarch64-unknown-linux-gnu
Co-authored-by: donmor <[email protected]>
1 parent a0869f9 commit 1c7d389

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ permissions:
1414

1515
env:
1616
MSRV: 1.69.0
17+
# Rust's Loongarch support merged in 1.71.0
18+
MSRV_LOONGARCH: 1.71.0
1719
RUSTFLAGS: -Dwarnings
1820

1921
jobs:
@@ -92,6 +94,7 @@ jobs:
9294
mips64el-unknown-linux-gnuabi64,
9395
mipsel-unknown-linux-gnu,
9496
powerpc64le-unknown-linux-gnu,
97+
loongarch64-unknown-linux-gnu,
9598
]
9699

97100
steps:
@@ -101,7 +104,8 @@ jobs:
101104
- name: setup Rust
102105
uses: dtolnay/rust-toolchain@master
103106
with:
104-
toolchain: '${{ env.MSRV }}'
107+
# Use a newer version rustc if the target is Loongarch, remove this workaround after MSRV is newer than 1.71.0
108+
toolchain: "${{ matrix.target == 'loongarch64-unknown-linux-gnu' && env.MSRV_LOONGARCH || env.MSRV }}"
105109
components: clippy
106110

107111
# cross relies on docker or podman, GitHub Acton already has it installed.

Cross.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ passthrough = [
33
"RUSTFLAGS",
44
"RUST_TEST_THREADS"
55
]
6+
7+
[target.loongarch64-unknown-linux-gnu]
8+
image = "ghcr.io/cross-rs/loongarch64-unknown-linux-gnu:edge"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ The following targets are supported by `nix`:
8585
<li>arm-unknown-linux-musleabi</li>
8686
<li>armv7-linux-androideabi</li>
8787
<li>i686-linux-android</li>
88+
<li>loongarch64-unknown-linux-gnu</li>
8889
<li>s390x-unknown-linux-gnu</li>
8990
<li>x86_64-linux-android</li>
9091
<li>x86_64-unknown-illumos</li>

changelog/2509.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enable CI for Loongarch64

0 commit comments

Comments
 (0)