2019-09-17 19:49:53 +02:00
|
|
|
name: CI
|
|
|
|
|
2020-04-14 15:43:27 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: "*"
|
|
|
|
pull_request:
|
|
|
|
branches: "*"
|
2019-09-17 19:49:53 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Build mode ${{ matrix.build_mode }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build_mode: ["", -Drelease-fast=true, -Drelease-safe=true, -Drelease-small=true]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Download zig
|
|
|
|
run: |
|
|
|
|
export PYTHONIOENCODING=utf8
|
2020-01-01 20:12:36 +01:00
|
|
|
wget $(curl -s 'https://ziglang.org/download/index.json' | python3 -c "import sys, json; print(json.load(sys.stdin)['master']['x86_64-linux']['tarball'])")
|
2019-09-17 19:49:53 +02:00
|
|
|
sudo apt-get install mtools
|
|
|
|
tar -xvf zig*
|
|
|
|
- name: Install qemu
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install qemu qemu-system --fix-missing
|
2020-01-09 14:08:00 +01:00
|
|
|
- name: Build kernel
|
|
|
|
run: zig*/zig build ${{ matrix.build_mode }}
|
|
|
|
- name: Run unit tests
|
|
|
|
run: zig*/zig build test ${{ matrix.build_mode }}
|
2019-09-17 19:49:53 +02:00
|
|
|
- name: Run runtime tests
|
|
|
|
run: zig*/zig build test -Drt-test=true ${{ matrix.build_mode }}
|
2019-10-06 20:03:02 +02:00
|
|
|
- name: Check formatting
|
|
|
|
run: zig*/zig fmt --check src
|