Skip to content

Commit 5ae1cee

Browse files
committed
Merge branch 'master' into 'master'
Move CI jobs from Jenkins to gitlab runner See merge request swift/swiftsim!2255
2 parents 39fdffa + 049b6ed commit 5ae1cee

16 files changed

Lines changed: 978 additions & 1 deletion

.gitlab-ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Gitlab pipeline for SWIFT, defines the various jobs that could be ran by a
2+
# suitably registered gitlab-runner instance.
3+
#
4+
# Should only run on non-draft merge requests or pushes to the master branch,
5+
# either directly or from a merge request. Some of this logic is repeated in
6+
# the jobs.
7+
#
8+
# Peter W. Draper 20-JAN-2026.
9+
10+
# Keep to the smaller job on MR branches and activate for all pushes to the
11+
# master branch. Don't do anything on draft MRs.
12+
workflow:
13+
rules:
14+
- if: >
15+
$CI_PIPELINE_SOURCE == "merge_request_event" &&
16+
$CI_MERGE_REQUEST_DRAFT == "true"
17+
when: never
18+
19+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
20+
- if: '$CI_PIPELINE_SOURCE == "push"'
21+
- when: never
22+
23+
# We just build, that is a job is lots of compilations and tests. Those
24+
# could be separated but tests would need to keep artefacts to preserve
25+
# context with the compilations, and we have a lot of builds based on
26+
# configure options, so each would need to be handled. That would be
27+
# inefficient as the artefacts are uploaded to the gitlab and then
28+
# retrieved.
29+
30+
stages:
31+
- build
32+
- runtime
33+
34+
variables:
35+
GIT_STRATEGY: clone
36+
GIT_SUBMODULE_STRATEGY: none
37+
38+
# JOBS.
39+
# -----
40+
41+
# Full GCC toolchain on COSMA:
42+
gnu-build-cosma:
43+
stage: build
44+
tags:
45+
- cosma
46+
# When MR to master happens, or commit is to master.
47+
rules:
48+
- if: >
49+
$CI_PIPELINE_SOURCE == "push" &&
50+
$CI_COMMIT_BRANCH == "master"
51+
timeout: 6h
52+
script:
53+
- echo "GNU toolchain compilation and unit tests (full)"
54+
- ci/COSMA/swift-gnu-check.sh
55+
- echo "complete."
56+
57+
# Full Intel toolchain on COSMA:
58+
intel-build-cosma:
59+
stage: build
60+
tags:
61+
- cosma
62+
# When MR to master happens, or commit is to master.
63+
rules:
64+
- if: >
65+
$CI_PIPELINE_SOURCE == "push" &&
66+
$CI_COMMIT_BRANCH == "master"
67+
timeout: 6h
68+
script:
69+
- echo "Intel OneAPI toolchain compilation and unit tests (full)"
70+
- ci/COSMA/swift-intel-check.sh
71+
- echo "complete."
72+
73+
# Small runtime checks.
74+
runtime-check-cosma:
75+
stage: runtime
76+
tags:
77+
- cosma
78+
# When MR to master happens, or commit is to master.
79+
rules:
80+
- if: >
81+
$CI_PIPELINE_SOURCE == "push" &&
82+
$CI_COMMIT_BRANCH == "master"
83+
timeout: 6h
84+
script:
85+
- echo "Runtime checks"
86+
- ci/COSMA/swift-runtime-check.sh
87+
- echo "complete."
88+
89+
# Small test for MRs only. Some like to push a lot...
90+
swift-intel-build-mr:
91+
stage: build
92+
tags:
93+
- cosma
94+
# When this commit is part of an active MR.
95+
rules:
96+
- if: >
97+
$CI_PIPELINE_SOURCE == "merge_request_event" &&
98+
$CI_MERGE_REQUEST_DRAFT == "false"
99+
timeout: 6h
100+
script:
101+
- echo "Merge request check using Intel toolchain"
102+
- ci/COSMA/swift-intel-check-mr.sh
103+
- echo "complete."
104+
105+
# Whatever toolchain is provided in the runner environment.
106+
# Note this is not enabled by on the main repository, those
107+
# jobs will only run on COSMA. Comment those out or change things
108+
# to match your fork environment as needed.
109+
#gnu-build:
110+
# stage: build
111+
# tags:
112+
# - genericlinux
113+
# # When MR to master happens, or commit is to master.
114+
# rules:
115+
# - if: >
116+
# $CI_PIPELINE_SOURCE == "push" &&
117+
# $CI_COMMIT_BRANCH == "master"
118+
# timeout: 6h
119+
# script:
120+
# - echo "Full compilation and unit tests"
121+
# - ci/swift-gnu-check.sh
122+
# - echo "complete."

README-mpi-hints.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Various hints on settings needed to get various MPIs running with SWIFT.
22

3+
Getting bit old. Needs a review.
4+
35
Last update 5th May 2020.
46

57

@@ -57,4 +59,4 @@ OMPI_MCA_btl ^openib
5759
OMPI_MCA_btl_openib_flags 1
5860
OMPI_MCA_plm_rsh_num_concurrent 768
5961
OMPI_MCA_mpool_rdma_rcache_size_limit 209715200
60-
```
62+
```

ci/COSMA/gnu-modules-parallel.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# This file is part of SWIFT.
4+
# Copyright (C) 2026 p.w.draper@durham.ac.uk.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
#+
20+
# GNU/GCC toolchain modules with parallel HDF5.
21+
# Source this file.
22+
#
23+
# Peter W. Draper 20-JAN-2026.
24+
#-
25+
echo "Loading the parallel GNU/GCC toolchain for SWIFT."
26+
27+
module purge
28+
module load gnu_comp/14.1.0
29+
module load openmpi/5.0.3
30+
module load gsl/2.8
31+
module load parallel_hdf5/1.14.4
32+
module load parmetis/4.0.3
33+
module load fftw/3.3.10
34+
module load utils
35+
module load llvm/20.1.0
36+
export CLANG_FORMAT_CMD="clang-format"

ci/COSMA/gnu-modules.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# This file is part of SWIFT.
4+
# Copyright (C) 2026 p.w.draper@durham.ac.uk.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
#+
20+
# GNU/GCC toolchain modules with serial HDF5.
21+
# Source this file.
22+
#
23+
# Peter W. Draper 20-JAN-2026.
24+
#-
25+
echo "Loading the GNU/GCC toolchain for SWIFT."
26+
27+
module purge
28+
module load gnu_comp/14.1.0
29+
module load openmpi/5.0.3
30+
module load gsl/2.8
31+
module load hdf5/1.14.4
32+
module load parmetis/4.0.3
33+
module load fftw/3.3.10
34+
module load utils
35+
module load llvm/20.1.0
36+
export CLANG_FORMAT_CMD="clang-format"

ci/COSMA/intel-modules-parallel.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# This file is part of SWIFT.
4+
# Copyright (C) 2026 p.w.draper@durham.ac.uk.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
#+
20+
# Intel toolchain modules with parallel HDF5.
21+
# Source this file.
22+
#
23+
# Peter W. Draper 20-JAN-2026.
24+
#-
25+
echo "Loading the parallel Intel OneAPI toolchain for SWIFT."
26+
27+
module purge
28+
module load intel_comp/2024.2.0 compiler-rt tbb compiler mpi
29+
module load parallel_hdf5/1.14.4
30+
module load fftw/3.3.10
31+
module load gsl/2.8
32+
module load parmetis/4.0.3
33+
module load python/3.12.4
34+
module load llvm/20.1.0
35+
export CLANG_FORMAT_CMD="clang-format"

ci/COSMA/intel-modules.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# This file is part of SWIFT.
4+
# Copyright (C) 2026 p.w.draper@durham.ac.uk.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
#+
20+
# Intel toolchain modules with serial HDF5.
21+
# Source this file.
22+
#
23+
# Peter W. Draper 20-JAN-2026.
24+
#-
25+
echo "Loading the Intel OneAPI toolchain for SWIFT."
26+
27+
module purge
28+
module load intel_comp/2024.2.0 compiler-rt tbb compiler mpi
29+
module load hdf5/1.14.4
30+
module load fftw/3.3.10
31+
module load gsl/2.8
32+
module load parmetis/4.0.3
33+
module load python/3.12.4
34+
module load llvm/20.1.0
35+
export CLANG_FORMAT_CMD="clang-format"

ci/COSMA/swift-gnu-check.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash -l
2+
3+
# This file is part of SWIFT.
4+
# Copyright (C) 2026 p.w.draper@durham.ac.uk.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
#+
20+
# GCC toolchain compilation and testing.
21+
#
22+
# Peter W. Draper 20-JAN-2026.
23+
#-
24+
source ci/COSMA/gnu-modules.sh
25+
source ci/setup.sh
26+
27+
# Start from clean sources.
28+
git clean -fdx
29+
30+
# And off we go.
31+
./autogen.sh
32+
33+
# Checks without parallel HDF5.
34+
source ci/swift-checks.sh
35+
36+
# Checks with parallel HDF5.
37+
source ci/COSMA/gnu-modules-parallel.sh
38+
source ci/swift-checks-parallel.sh
39+
40+
# Checks that distribution still works.
41+
source ci/swift-checks-distribution.sh
42+
43+
exit

ci/COSMA/swift-intel-check-mr.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash -l
2+
3+
# This file is part of SWIFT.
4+
# Copyright (C) 2026 p.w.draper@durham.ac.uk.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
#+
20+
# Tests to be ran when changes are committed to a merge request.
21+
#
22+
# Peter W. Draper 20-JAN-2026.
23+
#-
24+
# Build toolchain.
25+
source ci/COSMA/intel-modules.sh
26+
source ci/setup.sh
27+
28+
# Clean sources.
29+
git clean -fdx
30+
31+
# And off we go.
32+
./autogen.sh
33+
34+
echo
35+
echo "-------------"
36+
echo "non-MPI build"
37+
echo "-------------"
38+
do_configure --disable-optimization
39+
do_make
40+
do_make clean
41+
42+
echo
43+
echo "---------"
44+
echo "MPI build"
45+
echo "---------"
46+
do_configure --with-parmetis --disable-optimization
47+
do_make
48+
do_make clean
49+
50+
# Keep simple, may have a number of these happening.
51+
exit

0 commit comments

Comments
 (0)