test-run #33
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: test-run | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
commit: | |
description: 'The commit will be tested of polyhal' | |
required: true | |
default: 'main' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux:base | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64, riscv64, aarch64, loongarch64] | |
include: | |
- arch: aarch64 | |
packages: qemu-system-aarch64 | |
- arch: riscv64 | |
packages: qemu-system-riscv | |
- arch: x86_64 | |
packages: qemu-system-x86 | |
- arch: loongarch64 | |
packages: qemu-system-loongarch64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install generaic tools | |
run: yes | pacman -Syy make cmake rustup gcc git openssh | |
- name: setup rust toolchain | |
run: rustup default nightly && cargo install cargo-binutils && cargo install kbuild | |
- name: setup environment | |
# run: echo "~/.cargo/bin" >> $GITHUB_PATH | |
run: export PATH=$PATH:"~/.cargo/bin" | |
- name: patch polyhal | |
run: cd os && ~/.cargo/bin/kbuild patch add polyhal --https && cd crates/polyhal && git checkout ${{ inputs.commit}} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
- name: Test ${{ matrix.arch }} | |
run: cd os && PATH=$PATH:~/.cargo/bin make ARCH=${{ matrix.arch }} build | |
# - name: Install Qemu | |
# run: yes | pacman -Syy ${{ matrix.packages }} | |
# - name: Test run | |
# run: cd example && PATH=$PATH:~/.cargo/bin make ARCH=${{ matrix.arch }} run | |
# timeout-minutes: 1 |