-
-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (42 loc) · 1.39 KB
/
main.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
name: lint, build, test, release
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: sudo apt-get update && sudo apt-get install -y build-essential ctags ccache clang-tidy-11 clang-format-11
- name: Generate linting instructions
run: sh run sync
- name: Lint
run: sh run lint
build-test-release:
needs: [lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: sudo apt-get update && sudo apt-get install -y build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo ccache curl nasm grub-common qemu qemu-kvm mtools ctags inkscape
- name: Get cross compiler
id: cache-cross
uses: actions/cache@v1
with:
path: cross
key: cross-compiler
- name: Build cross compiler
if: steps.cache-cross.outputs.cache-hit != 'true'
run: sh run cross -y
- name: Build
run: MELVIX_CONFIG=release sh run build -y
- name: Upload as artifact
uses: actions/upload-artifact@v2
with:
name: disk-img
path: build/disk.img
- name: Test with release mode
run: MELVIX_CONFIG=release sh run test -y
- name: Test with debug mode
run: MELVIX_CONFIG=debug sh run test -y