Skip to content

Commit

Permalink
Merge pull request #224 from johannesvollmer/fix-ci-mips-compilation
Browse files Browse the repository at this point in the history
try fix big endian ci
  • Loading branch information
johannesvollmer authored Sep 20, 2023
2 parents 0d78600 + c331b78 commit 3a09cdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
ubuntu:
runs-on: ubuntu-latest
name: ubuntu
name: test on ubuntu
timeout-minutes: 30

steps:
Expand All @@ -24,7 +24,7 @@ jobs:

macos:
runs-on: macos-latest
name: mac os
name: test on mac os
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -57,14 +57,13 @@ jobs:
cargo-msrv verify
# github actions does not support big endian systems directly, but it does support QEMU.
# so we install qemu, cross-compile to sparc64, and then run the tests in an emulated sparc64.
# see https://github.com/wasm3/wasm3/blob/main/.github/workflows/tests.yml#L318
mips:
# so we use cross-rs, which uses QEMU internally.
big-endian:
runs-on: ubuntu-20.04
name: emulated big endian mips system
name: test on emulated big endian system
timeout-minutes: 90 # todo just make tests faster wtf

# we are using the cross project for cross compilation to mips:
# we are using the cross project for cross compilation:
# https://github.com/cross-rs/cross

steps:
Expand All @@ -81,16 +80,16 @@ jobs:
- name: Start Docker
run: sudo systemctl start docker

- name: Cross-Compile project to mips-unknown-linux-gnu
run: cross build --target=mips-unknown-linux-gnu --verbose
- name: Cross-Compile project to powerpc-unknown-linux-gnu
run: cross build --target powerpc-unknown-linux-gnu --verbose

# https://github.com/cross-rs/cross#supported-targets
- name: Cross-Run Tests in mips-unknown-linux-gnu using Qemu
run: cross test --target mips-unknown-linux-gnu --verbose
- name: Cross-Run Tests in powerpc-unknown-linux-gnu using Qemu
run: cross test --target powerpc-unknown-linux-gnu --verbose

wasm32:
runs-on: ubuntu-latest
name: wasm32
name: test on wasm32
timeout-minutes: 60

steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ use `cargo test --package exr --test fuzz fuzz -- --exact --ignored`.

To run all fast tests on an emulated system, use one of the following commands.
Each command requires a running `docker` instance,
and `cross-rs` to be installed on your machine (`cargo install cross-rs`).
and `cross-rs` to be installed on your machine (`cargo install cross`).
- Mips (Big Endian) `cross test --target mips-unknown-linux-gnu --verbose`

To benchmark the library, simply run `cargo bench`.

0 comments on commit 3a09cdd

Please sign in to comment.