Skip to content

Commit 63a5b63

Browse files
committed
ci: add MIPS target
1 parent 2acfa27 commit 63a5b63

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/target.toml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,22 @@ target = "loongarch64-unknown-linux-gnu"
173173
release-name = "loongarch64-linux"
174174
tool = "cross"
175175
skip-test = true
176-
extra-args = "--no-default-features --features ring"
176+
extra-args = "--no-default-features --features ring"
177+
178+
# ==================== MIPS Targets ====================
179+
180+
# MIPS (big-endian) Linux (MUSL - statically linked)
181+
[[target]]
182+
target = "mips-unknown-linux-musl"
183+
tool = "cross"
184+
extra-args = "--no-default-features --features ring"
185+
build-std = true
186+
skip-test = true
187+
188+
# MIPSEL (little-endian) Linux (MUSL - statically linked)
189+
[[target]]
190+
target = "mipsel-unknown-linux-musl"
191+
tool = "cross"
192+
extra-args = "--no-default-features --features ring"
193+
build-std = true
194+
skip-test = true

.github/workflows/rust-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
uses: dtolnay/rust-toolchain@master
9494
with:
9595
toolchain: ${{ matrix.toolchain || inputs.rust-toolchain }}
96-
target: ${{ matrix.target }}
97-
components: ${{ matrix.components || 'rustfmt, clippy' }}
96+
targets: ${{ matrix.build-std && 'x86_64-unknown-linux-gnu' || matrix.target }}
97+
components: ${{ matrix.components || matrix.build-std && 'rustfmt,clippy,rust-src' || 'rustfmt, clippy' }}
9898

9999
- name: Cache Docker images for cross
100100
if: matrix.tool == 'cross'
@@ -158,7 +158,7 @@ jobs:
158158
with:
159159
tool: ${{ matrix.tool }}
160160
command: build
161-
args: --workspace --release --target ${{ matrix.target }} ${{ matrix.extra-args }}
161+
args: --workspace --release --target ${{ matrix.target }} ${{ matrix.build-std && '-Z build-std=std,panic_abort' || '' }} ${{ matrix.extra-args }}
162162
env:
163163
RUSTFLAGS: ${{ matrix.rustflags }} ${{ inputs.rustflags }}
164164
CROSS_BUILD_ZIG: ${{ matrix.zig }}

0 commit comments

Comments
 (0)