Skip to content

Commit

Permalink
ci: add github actions for build check
Browse files Browse the repository at this point in the history
  • Loading branch information
HidenoriMatsubayashi committed May 5, 2023
1 parent f3a6001 commit 5c35aa4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install libraries
run: |
sudo apt update
sudo apt install clang-format g++-aarch64-linux-gnu
- name: Verify formatting
run: |
find src/* -iname *.h -o -iname *.c | xargs clang-format --dry-run --Werror
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64-elf-gcc.cmake -DBOARD=qemu -DTEST_GUEST=nuttx

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# eVisor
![build](https://github.com/HidenoriMatsubayashi/evisor/workflows/build/badge.svg)

`eVisor` is a light-weight Bare Metal Hypervisor (Type 1) written in C++. This is intended for embedded use (ARM64 devices) and educational purposes.

Expand Down

0 comments on commit 5c35aa4

Please sign in to comment.