diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5a7d66996..89fbcddcb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,8 @@ permissions: env: MSRV: 1.69.0 + # Rust's Loongarch support merged in 1.71.0 + MSRV_LOONGARCH: 1.71.0 RUSTFLAGS: -Dwarnings jobs: @@ -92,6 +94,7 @@ jobs: mips64el-unknown-linux-gnuabi64, mipsel-unknown-linux-gnu, powerpc64le-unknown-linux-gnu, + loongarch64-unknown-linux-gnu, ] steps: @@ -101,7 +104,8 @@ jobs: - name: setup Rust uses: dtolnay/rust-toolchain@master with: - toolchain: '${{ env.MSRV }}' + # Use a newer version rustc if the target is Loongarch, remove this workaround after MSRV is newer than 1.71.0 + toolchain: "${{ matrix.target == 'loongarch64-unknown-linux-gnu' && env.MSRV_LOONGARCH || env.MSRV }}" components: clippy # cross relies on docker or podman, GitHub Acton already has it installed. diff --git a/Cross.toml b/Cross.toml index acd94f3088..0fc503c6de 100644 --- a/Cross.toml +++ b/Cross.toml @@ -3,3 +3,6 @@ passthrough = [ "RUSTFLAGS", "RUST_TEST_THREADS" ] + +[target.loongarch64-unknown-linux-gnu] +image = "ghcr.io/cross-rs/loongarch64-unknown-linux-gnu:edge" diff --git a/README.md b/README.md index 983a73fe74..f763a47277 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ The following targets are supported by `nix`: