12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- name: Build Check
- on:
- push:
- branches: [ "master", "patch-add-riscv64-github-workflow" ]
- pull_request:
- branches: [ "master" ]
- jobs:
- # ensure the toolchain is cached
- ensure-toolchain:
- uses: ./.github/workflows/cache-toolchain.yml
-
- format-check:
- name: Format check ${{ matrix.arch }}
- runs-on: ubuntu-latest
- needs: [ensure-toolchain]
- continue-on-error: true
- strategy:
- matrix:
- arch: [x86_64, riscv64]
- steps:
- - uses: actions/checkout@v3
- - uses: ./.github/actions/import-toolchain
- - name: Format check
- env:
- ARCH: ${{ matrix.arch }}
- run: |
- printf "\n" >> kernel/src/include/bindings/bindings.rs
- printf "\n" >> user/libs/libc/src/include/internal/bindings/bindings.rs
- FMT_CHECK=1 make fmt
-
- kernel-static-test:
- name: Kernel static test ${{ matrix.arch }}
- runs-on: ubuntu-latest
- needs: [ensure-toolchain]
- continue-on-error: true
- strategy:
- matrix:
- arch: [x86_64, riscv64]
- steps:
- - uses: actions/checkout@v3
- - uses: ./.github/actions/import-toolchain
- - name: Run kernel static test
- env:
- ARCH: ${{ matrix.arch }}
- run: bash -c "source ~/.cargo/env && cd kernel && make test"
-
- build-x86_64:
- runs-on: ubuntu-latest
- needs: [ensure-toolchain]
- steps:
- - uses: actions/checkout@v3
- - uses: ./.github/actions/import-toolchain
-
- - name: build the DragonOS
- env:
- ARCH: x86_64
- run: bash -c "source ~/.cargo/env && export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin && make -j $(nproc) "
-
- build-riscv64:
- runs-on: ubuntu-latest
- needs: [ensure-toolchain]
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: 'recursive'
- - uses: ./.github/actions/import-toolchain
- - name: build the DragonOS
- env:
- ARCH: riscv64
- run: bash -c "source ~/.cargo/env && make kernel -j $(nproc)"
|