Add PowerPC64 LE and MIPS LE support, bump to 0.5.1 #12
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| alias: x64 | |
| qemu: "" | |
| features: "" | |
| - target: i686-unknown-linux-gnu | |
| alias: x86 | |
| qemu: qemu-i386-static | |
| features: "" | |
| # ARM and RISC-V include 'dt' feature - devicetrees are standard on these platforms | |
| - target: aarch64-unknown-linux-gnu | |
| alias: arm64 | |
| linker: gcc-aarch64-linux-gnu | |
| qemu: qemu-aarch64-static | |
| features: dt | |
| - target: arm-unknown-linux-gnueabihf | |
| alias: arm | |
| linker: gcc-arm-linux-gnueabihf | |
| qemu: qemu-arm-static | |
| features: dt | |
| - target: riscv64gc-unknown-linux-gnu | |
| alias: riscv64 | |
| linker: gcc-riscv64-linux-gnu | |
| qemu: qemu-riscv64-static | |
| features: dt | |
| - target: powerpc64le-unknown-linux-gnu | |
| alias: ppc64le | |
| linker: gcc-powerpc64le-linux-gnu | |
| qemu: qemu-ppc64le-static | |
| features: dt | |
| - target: mipsel-unknown-linux-gnu | |
| alias: mipsel | |
| linker: gcc-mipsel-linux-gnu | |
| qemu: qemu-mipsel-static | |
| features: dt | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src | |
| - name: Install cross-linker | |
| if: matrix.linker | |
| run: sudo apt-get update && sudo apt-get install -y ${{ matrix.linker }} | |
| - name: Install QEMU | |
| if: matrix.qemu | |
| run: sudo apt-get update && sudo apt-get install -y qemu-user-static | |
| - name: Build release binary | |
| run: cargo build --release --target ${{ matrix.target }} ${{ matrix.features && format('--features {0}', matrix.features) || '' }} | |
| - name: Check binary | |
| run: | | |
| file target/${{ matrix.target }}/release/kv | |
| ls -lh target/${{ matrix.target }}/release/kv | |
| - name: Run smoke test (native) | |
| if: matrix.qemu == '' | |
| run: | | |
| target/${{ matrix.target }}/release/kv --version | |
| target/${{ matrix.target }}/release/kv cpu | |
| target/${{ matrix.target }}/release/kv mem -j | |
| - name: Run smoke test (QEMU) | |
| if: matrix.qemu | |
| # All QEMU lines use || true because QEMU user-mode has known bugs | |
| # (e.g. PPC64 argv corruption in QEMU 10.x). Build+link is the real test. | |
| run: | | |
| ${{ matrix.qemu }} target/${{ matrix.target }}/release/kv --version || true | |
| ${{ matrix.qemu }} target/${{ matrix.target }}/release/kv cpu || true | |
| ${{ matrix.qemu }} target/${{ matrix.target }}/release/kv mem -j || true | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kv-${{ matrix.alias }} | |
| path: target/${{ matrix.target }}/release/kv |