1313
1414env :
1515 CMAKE_BUILD_TYPE : Release
16+ DOCKER_IMAGE : ptrnull233/simple_kernel:latest
1617
1718jobs :
18- build_ubuntu :
19+ build :
1920 runs-on : ubuntu-latest
2021 permissions :
2122 contents : write
@@ -26,46 +27,46 @@ jobs:
2627 with :
2728 fetch-depth : 0
2829
29- - name : Install dependencies
30+ - name : Pull Docker image
3031 run : |
31- sudo apt update --fix-missing -y
32- sudo apt upgrade --fix-missing -y
33- sudo apt install --fix-missing -y gcc g++ gcc-riscv64-linux-gnu g++-riscv64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
34- sudo apt install --fix-missing -y cmake qemu-system gdb-multiarch
35- sudo apt install --fix-missing -y doxygen graphviz
36- sudo apt install --fix-missing -y clang-format clang-tidy cppcheck libgtest-dev lcov
37- git submodule update --init --recursive
32+ docker pull ${{ env.DOCKER_IMAGE }}
3833
3934 - name : x86_64
4035 run : |
41- cmake --preset=build_x86_64
42- cmake --build build_x86_64 --target boot
43- cmake --build build_x86_64 --target kernel
44- cmake --build build_x86_64 --target unit-test
45- cmake --build build_x86_64 --target coverage
36+ docker run -v ${{ github.workspace }}:/workspace ${{ env.DOCKER_IMAGE }} \
37+ /bin/sh -c "cd /workspace && CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} cmake --preset=build_x86_64 && cmake --build build_x86_64 --target kernel && cmake --build build_x86_64 --target unit-test && cmake --build build_x86_64 --target coverage && cmake --build build_x86_64 --target doc"
38+ # cmake --preset=build_x86_64
39+ # cmake --build build_x86_64 --target boot
40+ # cmake --build build_x86_64 --target kernel
41+ # cmake --build build_x86_64 --target unit-test
42+ # cmake --build build_x86_64 --target coverage
4643
4744 - name : riscv64
4845 run : |
49- cmake --preset=build_riscv64
50- cmake --build build_riscv64 --target kernel
46+ docker run -v ${{ github.workspace }}:/workspace ${{ env.DOCKER_IMAGE }} \
47+ /bin/sh -c "cd /workspace && CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} cmake --preset=build_riscv64 && cmake --build build_riscv64 --target kernel"
48+ # cmake --preset=build_riscv64
49+ # cmake --build build_riscv64 --target kernel
5150
5251 - name : aarch64
5352 run : |
54- cmake --preset=build_aarch64
55- cmake --build build_aarch64 --target boot
56- cmake --build build_aarch64 --target kernel
53+ docker run -v ${{ github.workspace }}:/workspace ${{ env.DOCKER_IMAGE }} \
54+ /bin/sh -c "cd /workspace && CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} cmake --preset=build_aarch64 && cmake --build build_aarch64 --target kernel"
55+ # cmake --preset=build_aarch64
56+ # cmake --build build_aarch64 --target boot
57+ # cmake --build build_aarch64 --target kernel
5758
5859 - name : Upload coverage reports to Codecov
5960 uses : codecov/codecov-action@v3
6061 with :
61- files : build_x86_64/coverage/coverage.info
62+ files : ${{github.workspace}}/ build_x86_64/coverage/coverage.info
6263 verbose : true
6364
64- - name : Build Doc
65- if : github.ref == 'refs/heads/main'
66- run : |
67- cmake --preset=build_x86_64
68- cmake --build build_x86_64 --target doc
65+ # - name: Build Doc
66+ # if: github.ref == 'refs/heads/main'
67+ # run: |
68+ # cmake --preset=build_x86_64
69+ # cmake --build build_x86_64 --target doc
6970
7071 - name : Publish
7172 if : github.ref == 'refs/heads/main'
0 commit comments