Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GitHub Actions / CI #139

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/cmake_build_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CMake-Build-Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac.
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
env:
COMPILER: ${{ matrix.config.compiler }}
COMP: ${{ matrix.config.comp }}
CXXFLAGS: "-Werror"
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug

strategy:
matrix:
config:
- name: "Ubuntu-Latest-GCC"
os: ubuntu-latest
compiler: g++
comp: gcc
- name: "Ubuntu-Latest-Clang"
os: ubuntu-latest
compiler: clang++
comp: clang

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt update
# install blaze dependencies
sudo apt-get install libblas-dev liblapack-dev
# install blaze
wget https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.6.tar.gz
tar -xvzf blaze-3.6.tar.gz
cd blaze-3.6
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/
sudo make install

- 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}}/engine/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_PROFILING=0 -DUSE_RL=0 -DBACKEND_TENSORRT=0 -DBACKEND_MXNET=0 -DBACKEND_TORCH=0 -DUSE_960=0 -DBUILD_TESTS=1 -DMODE_CRAZYHOUSE=1 -DMODE_CHESS=0 -DMODE_LICHESS=0 ..

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

- name: Test
working-directory: ${{github.workspace}}/engine/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ./CrazyAra