Skip to content
Snippets Groups Projects
Commit 85a2d213 authored by Lukas Werner's avatar Lukas Werner
Browse files

Added some same .yml files to documentation

parent 7b1ddf3a
Branches
No related merge requests found
...@@ -73,3 +73,185 @@ It contains the build and execution directories and files for your CI jobs. ...@@ -73,3 +73,185 @@ It contains the build and execution directories and files for your CI jobs.
It may happen that your CI job fails if the node is occupied with other jobs for more than 24 hours. It may happen that your CI job fails if the node is occupied with other jobs for more than 24 hours.
In that case, simply restart the CI job. In that case, simply restart the CI job.
## Sample `.gitlab-ci.yml` files
### Build on default node (phinally) with default time limit (120 mins.)
```yaml
stages:
- build
- test
build:
stage: build
script:
- export NUM_CORES=$(nproc --all)
- mkdir $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
- make -j $NUM_CORES
tags:
- testcluster
artifacts:
paths:
- build
test:
stage: test
variables:
SLURM_TIMELIMIT: 30
script:
- cd $CI_PROJECT_DIR/build
- ./test
tags:
- testcluster
```
### Build on default node with default time limit, enable LIKWID (hwperf) and run one job on frontend
```yaml
variables:
SLURM_CONSTRAINT: "hwperf"
stages:
- prepare
- build
- test
prepare:
stage: prepare
script:
- echo "Preparing on frontend node..."
variables:
NO_SLURM_SUBMIT: 1
tags:
- testcluster
build:
stage: build
script:
- export NUM_CORES=$(nproc --all)
- mkdir $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
- make -j $NUM_CORES
tags:
- testcluster
artifacts:
paths:
- build
test:
stage: test
variables:
SLURM_TIMELIMIT: 30
script:
- cd $CI_PROJECT_DIR/build
- ./test
tags:
- testcluster
```
### Build and test stage on a specific node and use a custom default time limit
```yaml
variables:
SLURM_NODELIST: broadep2
SLURM_TIMELIMIT: 10
stages:
- build
- test
build:
stage: build
script:
- export NUM_CORES=$(nproc --all)
- mkdir $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
- make -j $NUM_CORES
tags:
- testcluster
artifacts:
paths:
- build
test:
stage: test
variables:
SLURM_TIMELIMIT: 30
script:
- cd $CI_PROJECT_DIR/build
- ./test
tags:
- testcluster
```
### Build and benchmark on multiple nodes
```yaml
stages:
- build
- benchmark
.build:
stage: build
script:
- export NUM_CORES=$(nproc --all)
- mkdir $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
- make -j $NUM_CORES
tags:
- testcluster
variables:
SLURM_TIMELIMIT: 10
artifacts:
paths:
- build
.benchmark:
stage: benchmark
variables:
SLURM_TIMELIMIT: 20
script:
- cd $CI_PROJECT_DIR/build
- ./benchmark
tags:
- testcluster
# broadep2
build-broadep2:
extends: .build
variables:
SLURM_NODELIST: broadep2
benchmark-broadep2:
extends: .benchmark
dependencies:
- build-broadep2
variables:
SLURM_NODELIST: broadep2
# naples1
build-naples1:
extends: .build
variables:
SLURM_NODELIST: naples1
benchmark-naples1:
extends: .benchmark
dependencies:
- build-naples1
variables:
SLURM_NODELIST: naples1
```
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment