-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (59 loc) · 1.68 KB
/
elasticity.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
name: 'Module elasticity'
on:
push:
branches: [ main ]
paths:
- elasticity/**
pull_request:
branches: [ main ]
paths:
- elasticity/**
workflow_dispatch:
env:
MODULE_DIR: 'elasticity'
# CTest
CT_OPTS: "--timeout 300 --output-on-failure"
# MPI
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_rmaps_base_oversubscribe: 1
jobs:
tests:
name: 'Build and Test'
runs-on: ubuntu-latest
container:
image: ghcr.io/arcaneframework/arcane_ubuntu-2404:gcc-14_full_check_latest
steps:
- name: Define environment paths
shell: bash
run: |
echo "SOURCE_DIR=${GITHUB_WORKSPACE}/src" >> $GITHUB_ENV
echo "BUILD_DIR=${GITHUB_WORKSPACE}/build" >> $GITHUB_ENV
echo "CT_RESULT_DIR=${GITHUB_WORKSPACE}/test" >> $GITHUB_ENV
- name: Checkout repo
uses: actions/checkout@v4
with:
path: ${{ env.SOURCE_DIR }}
- name: Configure
shell: bash
run: |
cmake \
-S ${{ env.SOURCE_DIR }} \
-B ${{ env.BUILD_DIR }} \
-GNinja
- name: Build
shell: bash
run: |
cmake --build ${{ env.BUILD_DIR }}
- name: Test
shell: bash
run: |
mkdir -p ${{ env.CT_RESULT_DIR }}
ctest --test-dir ${{ env.BUILD_DIR }} --output-junit ${{ env.CT_RESULT_DIR }}/results.xml ${{ env.CT_OPTS }} -R '\[${{ env.MODULE_DIR }}\]'
- name: Upload test artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: tests-${{ env.MODULE_DIR }}-artifact
path: ${{ env.CT_RESULT_DIR }}
retention-days: 7