Update TensorrtAPI to TensorRT 10 #174
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: variants | |
on: [ pull_request, workflow_dispatch ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
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@v2 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
working-directory: ${{github.workspace}}/engine/3rdparty/blaze | |
run: | | |
# install blaze | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ | |
sudo make install | |
- name: Install open_spiel | |
working-directory: ${{github.workspace}}/engine/3rdparty/open_spiel | |
run: | | |
# install open_spiel | |
pwd | |
chmod +x install.sh | |
sudo ./install.sh | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/engine | |
# 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: | | |
mkdir build | |
cmake -B ./build/chess -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=0 -DMODE_CHESS=1 -DMODE_LICHESS=0 -DMODE_XIANGQI=0 -DMODE_STRATEGO=0 -DMODE_OPEN_SPIEL=0 . | |
cmake -B ./build/lichess -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=0 -DMODE_CHESS=0 -DMODE_LICHESS=1 -DMODE_XIANGQI=0 -DMODE_STRATEGO=0 -DMODE_OPEN_SPIEL=0 . | |
cmake -B ./build/xiangqi -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=0 -DMODE_CHESS=0 -DMODE_LICHESS=0 -DMODE_XIANGQI=1 -DMODE_STRATEGO=0 -DMODE_OPEN_SPIEL=0 . | |
cmake -B ./build/stratego -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=0 -DMODE_CRAZYHOUSE=0 -DMODE_CHESS=0 -DMODE_LICHESS=0 -DMODE_XIANGQI=0 -DMODE_STRATEGO=1 -DMODE_OPEN_SPIEL=0 . | |
cmake -B ./build/hex -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=0 -DMODE_CRAZYHOUSE=0 -DMODE_CHESS=0 -DMODE_LICHESS=0 -DMODE_XIANGQI=0 -DMODE_STRATEGO=0 -DMODE_OPEN_SPIEL=1 . | |
cmake -B ./build/boardgames -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=0 -DMODE_CHESS=0 -DMODE_LICHESS=0 -DMODE_XIANGQI=0 -DMODE_STRATEGO=0 -DMODE_OPEN_SPIEL=0 -DMODE_BOARDGAMES=1 . | |
- name: Build | |
# Build your program with the given configuration | |
run: | | |
cmake --build ${{github.workspace}}/engine/build/chess --config ${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/engine/build/lichess --config ${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/engine/build/xiangqi --config ${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/engine/build/stratego --config ${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/engine/build/hex --config ${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/engine/build/boardgames --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/engine | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: | | |
./build/chess/ClassicAra | |
./build/lichess/MultiAra | |
./build/xiangqi/XiangqiAra | |
./build/stratego/StrategoAra | |
./build/hex/OpenSpielAra | |
./build/boardgames/BoardAra |