Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,43 @@ jobs:
- name: Run clippy
run: cargo clippy --all-targets --features ilp-highs -- -D warnings

# Cross-compile the portable Rust surface to RISC-V Linux, then execute the
# CLI under QEMU user-mode emulation to verify runtime behavior (not just
# that the binary links).
riscv:
name: RISC-V build & run
runs-on: ubuntu-latest
env:
FEATURES: "ilp-lp-solvers"
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: riscv64gc-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- name: Install RISC-V cross tools and QEMU
run: |
sudo apt-get update
sudo apt-get install -y gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu qemu-user
- name: Build workspace for RISC-V
env:
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER: riscv64-linux-gnu-gcc
run: cargo build --workspace --no-default-features --features "$FEATURES" --target riscv64gc-unknown-linux-gnu
- name: Verify RISC-V executable
run: |
riscv64-linux-gnu-readelf -h target/riscv64gc-unknown-linux-gnu/debug/pred \
| grep 'Machine:.*RISC-V'
- name: Run CLI smoke test under QEMU
env:
PRED: qemu-riscv64 -L /usr/riscv64-linux-gnu target/riscv64gc-unknown-linux-gnu/debug/pred
run: |
# Registry loads and the catalog renders on RISC-V.
$PRED list | head -5
# End-to-end create + brute-force solve: MIS of a 5-cycle is 2.
$PRED create MaximumIndependentSet --graph 0-1,1-2,2-3,3-4,4-0 -o mis.json
$PRED solve mis.json --solver brute-force | tee solve.out
grep -q '"evaluation": "Max(2)"' solve.out

# Build, test (nextest), doc tests, and paper.
test:
name: Test
Expand Down
Loading