Skip to content

Commit 46dec6a

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into feat/logging
2 parents 03d778e + dc7e2d8 commit 46dec6a

File tree

91 files changed

+1704
-1566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1704
-1566
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
__pycache__
3+
cscs-checks
4+
external
5+
Jenkinsfile*
6+
*.md
7+
*.log

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ReFrame CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unittest:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [3.6, 3.7, 3.8, 3.9]
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
./bootstrap.sh
20+
- name: Generic Unittests
21+
if: matrix.python-version != '3.8'
22+
run: |
23+
./test_reframe.py
24+
- name: Generic Unittests and Coverage Report
25+
if: matrix.python-version == '3.8'
26+
run: |
27+
pip install codecov
28+
coverage run --source=reframe ./test_reframe.py
29+
coverage report -m
30+
- name: Upload Coverage to Codecov
31+
if: matrix.python-version == '3.8'
32+
uses: codecov/codecov-action@v1
33+
with:
34+
fail_ci_if_error: true
35+
36+
modulestest:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
modules-version: [Lmod, Tmod32, Tmod4]
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Build Image for ${{ matrix.modules-version }}
44+
run: |
45+
docker build -f ci-scripts/dockerfiles/${{ matrix.modules-version }}.dockerfile -t reframe:${{ matrix.modules-version }} .
46+
- name: Run Unittests
47+
run: |
48+
docker run reframe:${{ matrix.modules-version }}

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

Jenkinsfile

Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def uniqueID
1010

1111
stage('Initialization') {
1212
node('master') {
13-
try {
13+
catchError(stageResult: 'FAILURE') {
1414
uniqueID = "${env.ghprbActualCommit[0..6]}-${env.BUILD_ID}"
1515
echo 'Environment Variables:'
1616
echo sh(script: 'env|sort', returnStdout: true)
@@ -55,19 +55,7 @@ stage('Initialization') {
5555
currentBuild.result = 'ABORTED'
5656
return
5757
}
58-
5958
currentBuild.result = 'SUCCESS'
60-
} catch(err) {
61-
println err.toString()
62-
if (err.toString().contains('exit code 143')) {
63-
currentBuild.result = "ABORTED"
64-
}
65-
else if (err.toString().contains('Queue task was cancelled')) {
66-
currentBuild.result = "ABORTED"
67-
}
68-
else {
69-
currentBuild.result = "FAILURE"
70-
}
7159
}
7260
}
7361
}
@@ -101,22 +89,8 @@ stage('Unittest') {
10189
}
10290
}
10391

104-
try {
92+
catchError(stageResult: 'FAILURE') {
10593
parallel builds
106-
currentBuild.result = "SUCCESS"
107-
} catch(err) {
108-
if (err.toString().contains('exit code 143')) {
109-
currentBuild.result = "ABORTED"
110-
println "The Unittest was cancelled. Aborting....."
111-
}
112-
else if (err.toString().contains('Queue task was cancelled')) {
113-
currentBuild.result = "ABORTED"
114-
println "The Queue task was cancelled. Aborting....."
115-
}
116-
else {
117-
currentBuild.result = "FAILURE"
118-
println "The Unittest failed. Exiting....."
119-
}
12094
}
12195
}
12296

@@ -127,7 +101,7 @@ stage('Tutorial Check') {
127101
return
128102
}
129103
else {
130-
try {
104+
catchError(stageResult: 'FAILURE') {
131105
if (!('daint' in machinesToRun)) {
132106
return
133107
}
@@ -141,20 +115,6 @@ stage('Tutorial Check') {
141115
bash ${reframeDir}/${bashScript} -f ${reframeDir} -i '' -t""")
142116
}
143117
}
144-
currentBuild.result = "SUCCESS"
145-
} catch(err) {
146-
if (err.toString().contains('exit code 143')) {
147-
currentBuild.result = "ABORTED"
148-
println "The Tutorial Check was cancelled. Aborting....."
149-
}
150-
else if (err.toString().contains('Queue task was cancelled')) {
151-
currentBuild.result = "ABORTED"
152-
println "The Queue task was cancelled. Aborting....."
153-
}
154-
else {
155-
currentBuild.result = "FAILURE"
156-
println "The Tutorial Check failed. Exiting....."
157-
}
158118
}
159119
}
160120
}
@@ -181,22 +141,8 @@ stage('Cleanup') {
181141
}
182142
}
183143
}
184-
try {
144+
catchError(stageResult: 'FAILURE') {
185145
parallel builds
186-
currentBuild.result = "SUCCESS"
187-
} catch(err) {
188-
if (err.toString().contains('exit code 143')) {
189-
currentBuild.result = "ABORTED"
190-
println "The Cleanup was cancelled. Aborting....."
191-
}
192-
else if (err.toString().contains('Queue task was cancelled')) {
193-
currentBuild.result = "ABORTED"
194-
println "The Queue task was cancelled. Aborting....."
195-
}
196-
else {
197-
currentBuild.result = "FAILURE"
198-
println "The Cleanup failed. Exiting....."
199-
}
200146
}
201147
}
202148
}
@@ -218,21 +164,7 @@ stage('Cleanup Stale') {
218164
}
219165
}
220166

221-
try {
167+
catchError(stageResult: 'FAILURE') {
222168
parallel builds
223-
currentBuild.result = "SUCCESS"
224-
} catch(err) {
225-
if (err.toString().contains('exit code 143')) {
226-
currentBuild.result = "ABORTED"
227-
println "The Build step was cancelled. Aborting....."
228-
}
229-
else if (err.toString().contains('Queue task was cancelled')) {
230-
currentBuild.result = "ABORTED"
231-
println "The Queue task was cancelled. Aborting....."
232-
}
233-
else {
234-
currentBuild.result = "FAILURE"
235-
println "The Build step failed. Exiting....."
236-
}
237169
}
238170
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img src="docs/_static/img/reframe_logo-full.png" width=400>
33
</a>
44

5-
[![Build Status](https://travis-ci.org/eth-cscs/reframe.svg?branch=master)](https://travis-ci.org/eth-cscs/reframe)
5+
[![Build Status](https://github.com/eth-cscs/reframe/workflows/ReFrame%20CI/badge.svg)](https://github.com/eth-cscs/reframe/actions?query=workflow%3A%22ReFrame+CI%22)
66
[![Documentation Status](https://readthedocs.org/projects/reframe-hpc/badge/?version=latest)](https://reframe-hpc.readthedocs.io/en/latest/?badge=latest)
77
[![codecov.io](https://codecov.io/gh/eth-cscs/reframe/branch/master/graph/badge.svg)](https://codecov.io/github/eth-cscs/reframe)<br/>
88
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/eth-cscs/reframe?include_prereleases)

ci-scripts/dockerfiles/Lmod.dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ FROM ubuntu:20.04
77
ENV TZ=Europe/Zurich
88
ENV DEBIAN_FRONTEND=noninteractive
99
ENV _LMOD_VER=8.4.12
10-
WORKDIR /root
10+
11+
# ReFrame user
12+
RUN useradd -ms /bin/bash rfmuser
1113

1214
# ReFrame requirements
1315
RUN \
1416
apt-get -y update && \
17+
apt-get -y install ca-certificates && \
18+
update-ca-certificates && \
1519
apt-get -y install gcc && \
1620
apt-get -y install make && \
1721
apt-get -y install git && \
@@ -28,12 +32,15 @@ RUN \
2832
cd Lmod-${_LMOD_VER} && \
2933
./configure && make install
3034

31-
3235
ENV BASH_ENV=/usr/local/lmod/lmod/init/profile
3336

37+
USER rfmuser
38+
3439
# Install ReFrame from the current directory
35-
COPY . /root/reframe/
36-
RUN cd reframe && ./bootstrap.sh
40+
COPY --chown=rfmuser . /home/rfmuser/reframe/
41+
42+
WORKDIR /home/rfmuser/reframe
43+
44+
RUN ./bootstrap.sh
3745

38-
WORKDIR /root/reframe
3946
CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/lmod.py -v"]

ci-scripts/dockerfiles/Tmod32.dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
FROM centos:7
66

7-
WORKDIR /root
7+
# ReFrame user
8+
RUN useradd -ms /bin/bash rfmuser
89

910
# ReFrame requirements
1011
RUN \
@@ -19,9 +20,13 @@ RUN \
1920
# Install Tmod 3.2
2021
RUN yum -y install environment-modules
2122

23+
USER rfmuser
24+
2225
# Install ReFrame from the current directory
23-
COPY . /root/reframe/
24-
RUN cd reframe && ./bootstrap.sh
26+
COPY --chown=rfmuser . /home/rfmuser/reframe/
27+
28+
WORKDIR /home/rfmuser/reframe
29+
30+
RUN ./bootstrap.sh
2531

26-
WORKDIR /root/reframe
2732
CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod32.py -v"]

ci-scripts/dockerfiles/Tmod4.dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ FROM ubuntu:20.04
77
ENV TZ=Europe/Zurich
88
ENV DEBIAN_FRONTEND=noninteractive
99
ENV _TMOD_VER=4.6.0
10-
WORKDIR /root
10+
11+
# ReFrame user
12+
RUN useradd -ms /bin/bash rfmuser
1113

1214
# ReFrame requirements
1315
RUN \
1416
apt-get -y update && \
17+
apt-get -y install ca-certificates && \
18+
update-ca-certificates && \
1519
apt-get -y install gcc && \
1620
apt-get -y install make && \
1721
apt-get -y install git && \
@@ -31,9 +35,13 @@ RUN \
3135

3236
ENV BASH_ENV=/usr/local/Modules/init/profile.sh
3337

38+
USER rfmuser
39+
3440
# Install ReFrame from the current directory
35-
COPY . /root/reframe/
36-
RUN cd reframe && ./bootstrap.sh
41+
COPY --chown=rfmuser . /home/rfmuser/reframe/
42+
43+
WORKDIR /home/rfmuser/reframe
44+
45+
RUN ./bootstrap.sh
3746

38-
WORKDIR /root/reframe
3947
CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod4.py -v"]

config/cscs-ci.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -119,37 +119,6 @@
119119
}
120120
]
121121
},
122-
{
123-
'name': 'kesch',
124-
'descr': 'Kesch MCH',
125-
'hostnames': [
126-
r'keschln-\d+'
127-
],
128-
'modules_system': 'tmod',
129-
'resourcesdir': '/apps/common/UES/reframe/resources',
130-
'partitions': [
131-
{
132-
'name': 'cn',
133-
'scheduler': 'slurm',
134-
'access': [
135-
'--partition=cn-regression'
136-
],
137-
'environs': [
138-
'builtin'
139-
],
140-
'descr': 'Kesch compute nodes',
141-
'resources': [
142-
{
143-
'name': '_rfm_gpu',
144-
'options': [
145-
'--gres=gpu:{num_gpus_per_node}'
146-
]
147-
}
148-
],
149-
'launcher': 'srun'
150-
}
151-
]
152-
},
153122
{
154123
'name': 'tsa',
155124
'descr': 'Tsa MCH',

0 commit comments

Comments
 (0)