Merge pull request #135 from CubbyFlow/lgtm #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-ubuntu: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
strategy: | |
matrix: | |
include: | |
# Ubuntu 18.04 + gcc-9 | |
- name: "Ubuntu 18.04 + gcc-9" | |
os: ubuntu-18.04 | |
compiler: gcc | |
version: "9" | |
# Ubuntu 20.04 + gcc-10 | |
- name: "Ubuntu 20.04 + gcc-10" | |
os: ubuntu-20.04 | |
compiler: gcc | |
version: "10" | |
# Ubuntu 18.04 + clang-9 | |
- name: "Ubuntu 18.04 + clang-9" | |
os: ubuntu-18.04 | |
compiler: clang | |
version: "9" | |
# Ubuntu 20.04 + clang-10 | |
- name: "Ubuntu 20.04 + clang-10" | |
os: ubuntu-20.04 | |
compiler: clang | |
version: "10" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Install packages | |
run: sudo apt-get install -yq python3-setuptools | |
- name: Configure Compiler | |
run: | | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
else | |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV | |
fi | |
- name: Configure Build | |
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. | |
- name: Build | |
run: cd build && make | |
- name: Run Unit Test | |
run: /home/runner/work/CubbyFlow/CubbyFlow/build/bin/UnitTests | |
- name: Run Python Test | |
run: | | |
pip3 install -r requirements.txt | |
pip3 install . | |
python3 -m pytest Tests/PythonTests/ |