2020-11-30 19:51:35 -06:00
|
|
|
name: linux_build
|
|
|
|
|
|
|
|
# Run CI on
|
|
|
|
# - each push
|
|
|
|
# - each pull request
|
|
|
|
# - scheduled weekly
|
|
|
|
on:
|
|
|
|
push:
|
2020-12-04 00:48:45 -06:00
|
|
|
branches-ignore:
|
|
|
|
- ganesh_dev
|
2020-11-30 19:51:35 -06:00
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 0 ' # weekly
|
|
|
|
|
|
|
|
# Environment variables
|
|
|
|
env:
|
|
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
MAKEFLAGS: "-j8"
|
|
|
|
|
|
|
|
# Multiple job to tests
|
|
|
|
jobs:
|
|
|
|
# Test the compilation compatibility
|
|
|
|
linux_build:
|
|
|
|
name: ${{ matrix.config.name }}
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
# Branch on different OS and settings
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {
|
|
|
|
name: "Quick Test: GCC-8 (Ubuntu 18.04)",
|
|
|
|
artifact: "OpenFPGA-basic-tests-ubuntu-18.04-gcc8-build.7z",
|
|
|
|
os: ubuntu-18.04,
|
|
|
|
cc: "gcc-8", cxx: "g++-8",
|
|
|
|
reg_script: "quick_test.sh"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Define the steps to run the build job
|
|
|
|
steps:
|
|
|
|
- name: Checkout Skywater-OpenFPGA repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Checkout OpenFPGA repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2020-12-01 12:58:19 -06:00
|
|
|
repository: lnis-uofu/OpenFPGA
|
2020-11-30 21:27:41 -06:00
|
|
|
path: OpenFPGA
|
2020-12-15 14:48:49 -06:00
|
|
|
submodules: true
|
2020-11-30 19:51:35 -06:00
|
|
|
|
|
|
|
- name: Install dependency
|
2020-12-15 14:48:49 -06:00
|
|
|
run: source ./.github/workflows/install_dependency.sh
|
2020-11-30 19:51:35 -06:00
|
|
|
|
|
|
|
- name: Checkout CMake version
|
2020-12-15 14:48:49 -06:00
|
|
|
run: cmake --version
|
2020-11-30 19:51:35 -06:00
|
|
|
|
|
|
|
- name: Checkout iVerilog version
|
|
|
|
run: |
|
2020-12-15 14:48:49 -06:00
|
|
|
iverilog -V
|
|
|
|
vvp -V
|
2020-11-30 19:51:35 -06:00
|
|
|
|
2020-11-30 21:35:56 -06:00
|
|
|
- name: Create CMake build environment
|
|
|
|
# Some projects don't allow in-source building, so create a separate build directory
|
|
|
|
# We'll use this as our working directory for all subsequent commands
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/OpenFPGA/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
2020-11-30 19:51:35 -06:00
|
|
|
# Use a bash shell so we can use the same syntax for environment variable
|
|
|
|
# access regardless of the host operating system
|
|
|
|
shell: bash
|
2020-11-30 21:35:56 -06:00
|
|
|
working-directory: ${{runner.workspace}}/OpenFPGA/build
|
2020-12-15 14:48:49 -06:00
|
|
|
# Note the current convention is to use the -S and -B options here to specify source
|
|
|
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
2020-11-30 19:51:35 -06:00
|
|
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
|
|
|
run: |
|
|
|
|
export CC=${{ matrix.config.cc }}
|
|
|
|
export CXX=${{ matrix.config.cxx }}
|
2020-11-30 21:35:56 -06:00
|
|
|
cmake $GITHUB_WORKSPACE/OpenFPGA -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/OpenFPGA/build
|
|
|
|
shell: bash
|
|
|
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
|
|
|
run: |
|
2020-12-15 14:48:49 -06:00
|
|
|
cmake --build . --config $BUILD_TYPE
|
2020-11-30 19:51:35 -06:00
|
|
|
|
|
|
|
- name: ${{matrix.config.name}}
|
|
|
|
if: contains(matrix.config.name, 'Quick Test')
|
|
|
|
shell: bash
|
2020-12-15 14:48:49 -06:00
|
|
|
# Execute the test.
|
2020-11-30 19:51:35 -06:00
|
|
|
run: source ./.github/workflows/${{matrix.config.reg_script}}
|