u #59
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: CMake | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
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-22.04 | |
steps: | |
- uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: '11.7.0' | |
- name: Install boost | |
uses: MarkusJx/[email protected] | |
id: install-boost | |
with: | |
# REQUIRED: Specify the required boost version | |
# A list of supported versions can be found here: | |
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json | |
boost_version: 1.74.0 | |
boost_install_dir: /home/runner/boost | |
- uses: actions/checkout@v3 | |
- name: echo settings | |
run: nvcc -V | |
- run: mkdir ${{github.workspace}}/build | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBoost_LIBRARY_DIRS=${{ steps.install-boost.outputs.BOOST_ROOT }}/lib -DBoost_INCLUDE_DIR=${{ steps.install-boost.outputs.BOOST_ROOT }}/include -DBOOST_ROOT=${{ steps.install-boost.outputs.BOOST_ROOT }} | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |