forked from oneapi-src/distributed-ranges
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (98 loc) · 2.51 KB
/
pr.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
# SPDX-FileCopyrightText: Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
name: "PR Tests"
on:
push:
branches:
- main
pull_request:
env:
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
checks:
runs-on: dds-base
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install python dependencies
run: pip install -r requirements.txt
- name: Run checkers
run: |
pre-commit run --all
unit_tests:
runs-on: dds-base
strategy:
# test everything, even if one fails
fail-fast: false
matrix:
include:
- cxx: icpx
- cxx: g++-10
- cxx: g++-11
- cxx: g++-12
name: ${{ matrix.cxx }}
env:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- name: Generate
run: |
source /opt/intel/oneapi/setvars.sh
cmake -B build
- name: Build
run: |
source /opt/intel/oneapi/setvars.sh
make -C build -j
- name: MHP unit tests
run: |
source /opt/intel/oneapi/setvars.sh
ctest --test-dir build -L MHP
- name: SHP unit tests
# Does not work on CPU
if: false
run: |
source /opt/intel/oneapi/setvars.sh
ctest --test-dir build -L SHP
- uses: actions/upload-artifact@v3
if: always()
with:
name: log-gcc-${{ env.CXX }}
path: build/Testing
publish:
needs: [checks, unit_tests]
runs-on: dds-base
env:
SPHINXOPTS: -q -W
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Build doc
run: |
make -C doc/spec html
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Publish to github pages
run: |
rm -rf gh-pages/spec gh-pages/doxygen
touch gh-pages/.nojekyll
cp -r doc/spec/build/html gh-pages/spec
cp -r doc/spec/build/doxygen-html gh-pages/doxygen
cd gh-pages
git config user.name github-actions
git config user.email [email protected]
git add .
# Ignore errors because no updates returns an error status.
git commit --reset-author --amend -m "Update from github actions"
git push --force origin gh-pages