From 833ca22989662caffc3cc88272a9294510794af6 Mon Sep 17 00:00:00 2001 From: Sam Tebbs Date: Tue, 17 Sep 2019 18:49:53 +0100 Subject: [PATCH] Migrate to github actions for CI --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++ README.md | 2 +- azure-pipelines.yml | 40 -------------------------------------- 3 files changed, 32 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..56e092f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: CI + +on: [push] + +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 + wget $(curl -s 'https://ziglang.org/download/index.json' | python3 -c "import sys, json; print(json.load(sys.stdin)['master']['x86_64-linux']['tarball'])") + sudo apt-get install mtools + tar -xvf zig* + - name: Build kernel + run: zig*/zig build ${{ matrix.build_mode }} + - name: Run unit tests + run: zig*/zig build test ${{ matrix.build_mode }} + - name: Install qemu + run: | + sudo apt-get update + sudo apt-get install qemu qemu-system --fix-missing + - name: Run runtime tests + run: zig*/zig build test -Drt-test=true ${{ matrix.build_mode }} diff --git a/README.md b/README.md index 795bc17..916cad9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pluto -[![Build Status](https://dev.azure.com/samueltebbs/pluto/_apis/build/status/SamTebbs33.pluto?branchName=develop)](https://dev.azure.com/samueltebbs/samueltebbs/_build/latest?definitionId=1&branchName=develop) +[![Build Status](https://github.com/SamTebbs33/pluto/workflows/CI/badge.svg)](https://github.com/SamTebbs33/pluto/actions) Pluto is a kernel written almost entirely in [Zig](https://github.com/ziglang/zig) and supports x86, with aarch64 and x64 backends being planned. diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index e98b03e..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - -trigger: -- develop -- feature/* - -pr: -- develop -- feature/* - -pool: - vmImage: 'ubuntu-latest' - -variables: - zig_version: master - -steps: -- script: | - export PYTHONIOENCODING=utf8 - wget $(curl -s 'https://ziglang.org/download/index.json' | python3 -c "import sys, json; print(json.load(sys.stdin)['$(zig_version)']['x86_64-linux']['tarball'])") - tar -xvf zig* - displayName: 'Download zig' - -- script: zig*/zig build - displayName: 'Build kernel' - -- script: zig*/zig build test - displayName: 'Unit tests' - -- script: | - sudo apt-get update - sudo apt-get install qemu qemu-system --fix-missing - displayName: 'Download qemu' - -- script: | - zig*/zig build test -Drt-test=true - displayName: 'Runtime tests'