Add big-endian test with GitHub Actions #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Big-Endian Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
big-endian-test: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Step 2: Install Rust and target | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: mips-unknown-linux-gnu | |
# Step 3: Install dependencies for QEMU | |
- name: Install QEMU | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-user | |
# Step 4: Build for Big-Endian target | |
- name: Build for Big-Endian | |
run: cargo build --target=mips-unknown-linux-gnu | |
# Step 5: Run tests with QEMU | |
- name: Run Tests on QEMU | |
run: | | |
qemu-mips target/mips-unknown-linux-gnu/debug/your_binary |