-
Notifications
You must be signed in to change notification settings - Fork 6
122 lines (117 loc) · 3.36 KB
/
ci.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
# SPDX-FileCopyrightText: 2019-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
on:
push:
branches:
- main
pull_request:
env:
SPACK_REPO: rscohn2/spack
SPACK_BRANCH: dev/oneapi-headers
jobs:
checks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install prerequisites
run: |
python -m pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
- name: Checks
run: |
pre-commit run --all
gcc:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
part: [gcc_1, gcc_2, virtual, ilp64]
name: ${{ matrix.part }}
steps:
- name: CPUtype
run: lscpu
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install prerequisites
run: |
python -m pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
- name: Install spack
uses: actions/checkout@v3
with:
repository: ${{ env.SPACK_REPO }}
path: spack
ref: ${{ env.SPACK_BRANCH }}
- name: Package tests
run: |
source spack/share/spack/setup-env.sh
spack repo add ./repo
pytest -s tests/test_packages.py::test_${{ matrix.part }}
- name: Load test
run: |
source spack/share/spack/setup-env.sh
pytest -s tests/test_packages.py::test_load
- uses: actions/upload-artifact@v3
if: failure()
with:
name: gcc-${{ matrix.part }}-${{ matrix.os }}-logs
path: |
/tmp/runner/spack-stage/
/tmp/runner/intel-oneapi-installer/
!/tmp/runner/**/*.sh
bootstrapper*
installer*
retention-days: 7
intel-compiler:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler: [icc, icx]
part: [1, 2, 3]
os: [ubuntu-20.04]
name: ${{ matrix.compiler }}_${{ matrix.part }}
steps:
- name: CPUtype
run: lscpu
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install prerequisites
run: |
python -m pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
- name: Install spack
uses: actions/checkout@v3
with:
repository: ${{ env.SPACK_REPO }}
path: spack
ref: ${{ env.SPACK_BRANCH }}
- name: Package tests
run: |
source spack/share/spack/setup-env.sh
spack repo add ./repo
spack install intel-oneapi-compilers
spack clean --downloads
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin
pytest -s tests/test_packages.py::test_${{ matrix.compiler }}_${{ matrix.part }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.compiler }}-${{ matrix.part }}-${{ matrix.os }}-logs
path: |
/tmp/runner/spack-stage/
/tmp/runner/intel-oneapi-installer/
!/tmp/runner/**/*.sh
bootstrapper*
installer*
retention-days: 7