123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- name: CI
- on:
- push:
- branches: [master]
- pull_request:
- jobs:
- check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- components: rustfmt, clippy
- - name: Check code format
- uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: --all -- --check
- - name: Clippy
- uses: actions-rs/clippy-check@v1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- - name: Build with no features
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --no-default-features
- - name: Build with all features
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --all-features
- - name: Docs
- uses: actions-rs/cargo@v1
- with:
- command: doc
- - name: Test with no features
- uses: actions-rs/cargo@v1
- with:
- command: test
- args: --no-default-features
- - name: Test with all features
- uses: actions-rs/cargo@v1
- with:
- command: test
- args: --all-features
- examples:
- runs-on: ubuntu-22.04
- strategy:
- fail-fast: false
- matrix:
- example:
- - aarch64
- - riscv
- - x86_64
- include:
- - example: aarch64
- toolchain: stable
- target: aarch64-unknown-none
- packages: qemu-system-arm gcc-aarch64-linux-gnu
- - example: riscv
- toolchain: nightly-2022-11-03
- target: riscv64imac-unknown-none-elf
- packages: qemu-system-misc
- - example: x86_64
- toolchain: nightly
- target: x86_64-unknown-none
- packages: qemu-system-x86
- steps:
- - uses: actions/checkout@v2
- - name: Install QEMU
- run: sudo apt update && sudo apt install ${{ matrix.packages }} && sudo chmod 666 /dev/vhost-vsock
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: ${{ matrix.toolchain }}
- target: ${{ matrix.target }}
- components: llvm-tools-preview, rustfmt
- - name: Check code format
- working-directory: examples/${{ matrix.example }}
- run: cargo fmt --all -- --check
- - name: Build
- working-directory: examples/${{ matrix.example }}
- run: make kernel
- - name: Run
- working-directory: examples/${{ matrix.example }}
- run: QEMU_ARGS="-display none" make qemu accel="off"
|