Repository navigation
119 lines (106 loc) · 3.36 KB
/
Copy pathtest.yml
File metadata and controls
119 lines (106 loc) · 3.36 KB
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
name: rocm-cmake
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python 3.10
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install cget cmakelang[YAML]
- name: Run linter
run: |
cget build -T analyze -DSPHINX_EXECUTABLE=python3
# python isn't sphinx, but we won't be calling it anyway
test:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
platform:
- ubuntu-24.04
- windows-2022
cmake-version:
- 3.31.0
- 3.22.1
- 3.16.3
compiler:
- default
- clang
# There are problems with nmake and ninja with this version of cmake
# on windows
exclude:
- platform: windows-2022
cmake-version: 3.16.3
# clang++ is only tested on windows; linux is already covered by the
# default compiler
- platform: ubuntu-24.04
compiler: clang
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python 3.10
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@0d6a7d60b009d01c9e7523be22153ff8f19460d3 # v2.2.0
with:
cmake-version: ${{ matrix.cmake-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install cget ninja
python -m pip install -r docs/requirements.txt
- name: Install Doxygen
uses: ssciwr/doxygen-install@329d88f5a303066a5bd006db7516b1925b86350e # v2.0.1
with:
version: "1.10.0"
- name: Setup git
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
- name: Install LLVM/Clang
if: matrix.compiler == 'clang'
uses: KyleMayes/install-llvm-action@ebc0426251bc40c7cd31162802432c68818ab8f0 # v2
with:
version: "20"
directory: ${{ runner.temp }}/llvm
- name: Setup clang++
if: matrix.compiler == 'clang'
shell: bash
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Cmake version
run: cmake --version
- name: Run tests (default generator)
if: matrix.compiler != 'clang'
run: cget build --test
- name: Build docs (default generator)
if: matrix.compiler != 'clang'
run: cget build -T doc
- name: Clean build
run: |
cget build -Cy
cget clean -y
- name: Run tests (Ninja generator)
run: cget build --test -DROCM_CMAKE_GENERATOR=Ninja
- name: Build docs (Ninja generator)
run: cget build -T doc