-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (41 loc) · 1.91 KB
/
ubuntu-22.04.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: ubuntu-22.04
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
BUILD_TYPE: Release
ARCHITECTURES: 75
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
if: "!contains(github.event.commits[0].message, '[skip build]')"
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Fetch CUDA toolkit using Jimver/cuda-toolkit@v0.2.7
- name: Fetch CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.7
id: cuda-toolkit
with:
cuda: '11.7.0'
linux-local-args: '["--toolkit"]'
# Runs a single command using the runners shell
- name: Check nvcc version
run: nvcc -V
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# 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
- name: Configure cmake
run: cmake -B ${{github.workspace}}/build -D LOOPS_BUILD_TESTS=ON -D CMAKE_CUDA_ARCHITECTURES=${{env.ARCHITECTURES}} -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
# Build your program with the given configuration
- name: Build all applications
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}