-
Notifications
You must be signed in to change notification settings - Fork 13
133 lines (121 loc) · 4.1 KB
/
builds.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# VecMem project, part of the ACTS project (R&D line)
#
# (c) 2021-2023 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0
# Name for this "action".
name: Build Tests
# Perform the builds on every push and pull request.
on: [ push, pull_request ]
# All the different build/test jobs.
jobs:
# Native build jobs.
native:
# The different build modes to test.
strategy:
matrix:
BUILD:
- TYPE: "Release"
MSG_LVL: 0
- TYPE: "Debug"
MSG_LVL: 5
PLATFORM:
- OS: "ubuntu-latest"
GENERATOR: -G "Unix Makefiles"
- OS: "macos-latest"
GENERATOR: -G "Xcode"
- OS: "windows-latest"
GENERATOR:
# The system to run on.
runs-on: ${{ matrix.PLATFORM.OS }}
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v2
# Run the CMake configuration.
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.BUILD.TYPE }}
-DVECMEM_DEBUG_MSG_LVL=${{ matrix.BUILD.MSG_LVL }}
-DVECMEM_BUILD_BENCHMARKING=TRUE
-DVECMEM_FAIL_ON_WARNINGS=TRUE
-S ${{ github.workspace }} -B build
${{ matrix.PLATFORM.GENERATOR }}
# Perform the build.
- name: Build
run: cmake --build build --config ${{ matrix.BUILD.TYPE }}
# Run the unit test(s).
- name: Test
run: |
cd build
ctest --output-on-failure -C ${{ matrix.BUILD.TYPE }}
# Containerised build jobs.
container:
# The different build modes to test.
strategy:
matrix:
BUILD:
- TYPE: "Release"
MSG_LVL: 0
- TYPE: "Debug"
MSG_LVL: 5
PLATFORM:
- NAME: "CUDA"
CONTAINER: "ghcr.io/acts-project/ubuntu1804_cuda:v11"
OPTIONS:
- NAME: "CUDA"
CONTAINER: "ghcr.io/acts-project/ubuntu2004_cuda:v32"
OPTIONS:
- NAME: "HIP"
CONTAINER: "ghcr.io/acts-project/ubuntu1804_rocm:v11"
OPTIONS:
- NAME: "SYCL"
CONTAINER: "ghcr.io/acts-project/ubuntu2004_oneapi:v20"
OPTIONS:
include:
- BUILD:
TYPE: "Release"
MSG_LVL: 0
PLATFORM:
NAME: "SYCL"
CONTAINER: "ghcr.io/acts-project/ubuntu1804_cuda_oneapi:v32"
OPTIONS: -DVECMEM_BUILD_CUDA_LIBRARY=FALSE
- BUILD:
TYPE: "Release"
MSG_LVL: 0
PLATFORM:
NAME: "SYCL"
CONTAINER: "ghcr.io/acts-project/ubuntu1804_rocm_oneapi:v32"
OPTIONS: -DVECMEM_BUILD_HIP_LIBRARY=FALSE
# The system to run on.
runs-on: ubuntu-latest
container: ${{ matrix.PLATFORM.CONTAINER }}
# Use BASH as the shell from the image.
defaults:
run:
shell: bash
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v2
# Run the CMake configuration.
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake -DCMAKE_BUILD_TYPE=${{ matrix.BUILD.TYPE }} -DVECMEM_DEBUG_MSG_LVL=${{ matrix.BUILD.MSG_LVL }} -DVECMEM_BUILD_${{ matrix.PLATFORM.NAME }}_LIBRARY=TRUE -DVECMEM_BUILD_BENCHMARKING=TRUE -DVECMEM_FAIL_ON_WARNINGS=TRUE ${{ matrix.PLATFORM.OPTIONS }} -S ${GITHUB_WORKSPACE} -B build
# Print the configuration log for debugging
- name: Print CMake Configure Output
run: cat build/CMakeFiles/CMakeOutput.log
- name: Print CMake Configure Errors
run: cat build/CMakeFiles/CMakeError.log
# Perform the build.
- name: Build
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake --build build
# Run the unit test(s).
- name: Test
if: "matrix.PLATFORM.NAME == 'SYCL'"
run: |
cd build
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
ctest --output-on-failure