[Test] Start porting to Github Actions with build test

This commit is contained in:
tangxifan 2020-11-23 20:19:44 -07:00
parent 6ba02f35ca
commit f2b6655550
2 changed files with 78 additions and 0 deletions

31
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: OpenFPGA CI
# Run CI on
# - each push
# - each pull request
# - scheduled weekly
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0 ' # weekly
# Multiple job to tests
jobs:
# Test the compilation
build_gcc8:
runs-on: ubuntu-18.04
# Define the steps to run the build job
steps:
- name: Checkout OpenFPGA repo
uses: actions/checkout@v2
- name: Install dependency
run: source install_dependency.sh
- name: Compile OpenFPGA
uses: nicledomaS/cmake_build_action@v1
with:
submodule_update: OFF
cmake_args: -DCMAKE_BUILD_TYPE=release;-DCMAKE_C_COMPILER=gcc-8;-DCMAKE_CXX_COMPILER=g++-8;

47
.github/workflows/install_dependency.sh vendored Normal file
View File

@ -0,0 +1,47 @@
# Install all the dependency for OpenFPGA in Ubuntu-18.04
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install bash
sudo apt-get install bison
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install ctags
sudo apt-get install curl
sudo apt-get install doxygen
sudo apt-get install flex
sudo apt-get install fontconfig
sudo apt-get install gdb
sudo apt-get install git
sudo apt-get install gperf
sudo apt-get install iverilog
sudo apt-get install libcairo2-dev
sudo apt-get install libevent-dev
sudo apt-get install libfontconfig1-dev
sudo apt-get install liblist-moreutils-perl
sudo apt-get install libncurses5-dev
sudo apt-get install libx11-dev
sudo apt-get install libxft-dev
sudo apt-get install libxml++2.6-dev
sudo apt-get install perl
sudo apt-get install python
sudo apt-get install python-lxml
sudo apt-get install texinfo
sudo apt-get install time
sudo apt-get install valgrind
sudo apt-get install zip
sudo apt-get install qt5-default
sudo apt-get install clang-format-7
# Add all the supported compilers
sudo apt-get install g++-5
sudo apt-get install gcc-5
sudo apt-get install g++-6
sudo apt-get install gcc-6
sudo apt-get install g++-7
sudo apt-get install gcc-7
sudo apt-get install g++-8
sudo apt-get install gcc-8
sudo apt-get install g++-9
sudo apt-get install gcc-9
sudo apt-get install clang-6.0
sudo apt-get install clang-8