-
-
Notifications
You must be signed in to change notification settings - Fork 414
71 lines (59 loc) · 2.06 KB
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# This file is a part of Simple-XX/SimpleKernel
# (https://github.com/Simple-XX/SimpleKernel).
#
# workflow.yml for Simple-XX/SimpleKernel.
name: build
on:
- push
- pull_request
- release
env:
CMAKE_BUILD_TYPE: Release
jobs:
build_ubuntu:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update --fix-missing -y
sudo apt upgrade --fix-missing -y
sudo apt install --fix-missing -y gcc g++ gcc-riscv64-linux-gnu g++-riscv64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt install --fix-missing -y cmake qemu-system gdb-multiarch
sudo apt install --fix-missing -y doxygen graphviz
sudo apt install --fix-missing -y clang-format clang-tidy cppcheck libgtest-dev lcov
git submodule update --init --recursive
- name: x86_64
run: |
cmake --preset=build_x86_64
cmake --build build_x86_64 --target boot
cmake --build build_x86_64 --target kernel
cmake --build build_x86_64 --target unit-test
cmake --build build_x86_64 --target coverage
- name: riscv64
run: |
cmake --preset=build_riscv64
cmake --build build_riscv64 --target kernel
- name: aarch64
run: |
cmake --preset=build_aarch64
cmake --build build_aarch64 --target boot
cmake --build build_aarch64 --target kernel
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: build_x86_64/coverage/coverage.info
verbose: true
- name: Build Doc
if: github.ref == 'refs/heads/main'
run: |
cmake --preset=build_x86_64
cmake --build build_x86_64 --target doc
- name: Publish
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: ${{github.workspace}}/doc/html