-
Notifications
You must be signed in to change notification settings - Fork 22
109 lines (87 loc) · 2.6 KB
/
cmake.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
name: CMake
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
build-mdspan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- compiler_driver: g++
compiler_prefix: /usr/bin
steps:
- name: Create Build Environment
run: cmake -E make_directory mdspan-build
- name: Check Out
uses: actions/checkout@v4
with:
repository: kokkos/mdspan
path: mdspan-src
- name: Configure CMake
working-directory: mdspan-build
run: cmake $GITHUB_WORKSPACE/mdspan-src -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install
- name: Build
working-directory: mdspan-build
run: make
- name: Install
working-directory: mdspan-build
run: make install
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mdspan
path: mdspan-install
build-stdblas:
runs-on: ubuntu-latest
needs: build-mdspan
steps:
- name: Download mdspan
uses: actions/download-artifact@v4
with:
name: mdspan
path: mdspan-install
- name: Create Build Environment
run: cmake -E make_directory stdblas-build
- name: Check Out
uses: actions/checkout@v4
with:
path: stdblas-src
- name: Configure CMake
shell: bash
working-directory: stdblas-build
run: cmake $GITHUB_WORKSPACE/stdblas-src -Dmdspan_DIR=$GITHUB_WORKSPACE/mdspan-install/lib/cmake/mdspan -DLINALG_ENABLE_TESTS=On -DLINALG_ENABLE_EXAMPLES=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/stdblas-install
- name: Build
working-directory: stdblas-build
shell: bash
run: make
- name: Tar files
shell: bash
run: tar -cvf stdblas.tar *
- name: Upload workspace
uses: actions/upload-artifact@v4
with:
name: stdblas
path: stdblas.tar
test-stdBLAS:
runs-on: ubuntu-latest
needs: build-stdblas
steps:
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: stdblas
path: .
- name: Untar files
shell: bash
run: tar -xvf stdblas.tar
- name: Test
working-directory: stdblas-build
shell: bash
run: ctest --output-on-failure
- name: Install
working-directory: stdblas-build
shell: bash
run: make install