Skip to content

Commit a9ce39a

Browse files
committed
add some workflows for ci builds
1 parent 6deac2b commit a9ce39a

2 files changed

Lines changed: 82 additions & 7 deletions

File tree

.github/workflows/ci-tests.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- modernization
8+
pull_request:
9+
branches:
10+
- develop
11+
- modernization
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ci-tests-${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-and-test:
20+
name: ${{ matrix.name }}
21+
runs-on: ubuntu-24.04
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- name: GCC 13
27+
c_compiler: gcc-13
28+
cxx_compiler: g++-13
29+
extra_packages: ""
30+
- name: Clang 18
31+
c_compiler: clang-18
32+
cxx_compiler: clang++-18
33+
extra_packages: "libomp-18-dev"
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
40+
- name: Install build dependencies
41+
shell: bash
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y \
45+
cmake \
46+
ninja-build \
47+
libsuitesparse-dev \
48+
libboost-filesystem-dev \
49+
libboost-system-dev \
50+
libboost-date-time-dev \
51+
libboost-timer-dev \
52+
libboost-chrono-dev \
53+
${{ matrix.c_compiler }} \
54+
${{ matrix.cxx_compiler }} \
55+
${{ matrix.extra_packages }}
56+
57+
- name: Configure
58+
shell: bash
59+
run: >
60+
cmake -S . -B build -G Ninja
61+
-DCMAKE_BUILD_TYPE=Release
62+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
63+
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }}
64+
-DBUILD_TESTING=ON
65+
-DGRIDDYN_BUILD_TESTS=ON
66+
-DGRIDDYN_ENABLE_FMI=OFF
67+
-DGRIDDYN_ENABLE_HELICS_EXECUTABLE=OFF
68+
69+
- name: Build
70+
run: cmake --build build --parallel
71+
72+
- name: Run continuous tests
73+
run: ctest --test-dir build --output-on-failure -L Continuous

.github/workflows/formatting.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@ on:
33
push:
44
branches:
55
- develop
6+
- modernization
67
pull_request:
78
branches:
89
- develop
10+
- modernization
911

1012
jobs:
1113
pre-commit:
1214
name: Formatting-check
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v1
17-
- name: set PY
18-
run: echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' -f1)"
19-
- uses: actions/cache@v1
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
19+
id: setup-python
20+
with:
21+
python-version: "3.x"
22+
- uses: actions/cache@v4
2023
with:
2124
path: ~/.cache/pre-commit
22-
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
25+
key: pre-commit|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
2326
- uses: pre-commit/action@v1.0.0
2427
- name: Stage changed doc/script files
2528
if: failure() && github.event.pull_request.draft != true && github.event.pull_request.head.repo.full_name == github.repository
@@ -45,4 +48,3 @@ jobs:
4548
BRANCH_PREFIX: "pre-commit/"
4649
NO_HASH: "true"
4750
REPLACE_BRANCH: "true"
48-

0 commit comments

Comments
 (0)