Skip to content

Double initialize

Double initialize #727

name: Compiler Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: circleci-migrated-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- name: GCC 14
container: helics/buildenv:gcc14-builder
cmake_flags: -DGRIDDYN_BUILD_TESTS=ON -DGRIDDYN_BUILD_C_SHARED_LIBRARY=ON -DGRIDDYN_ENABLE_FMI_EXPORT=ON
- name: GCC 15
container: helics/buildenv:gcc15-builder
cmake_flags: -DGRIDDYN_BUILD_TESTS=ON -DGRIDDYN_ENABLE_OPTIMIZATION_LIBRARY=ON
- name: Clang 20
container: helics/buildenv:clang20-builder
cmake_flags: -DGRIDDYN_BUILD_TESTS=ON -DGRIDDYN_BUILD_C_SHARED_LIBRARY=ON -DGRIDDYN_ENABLE_FMI_EXPORT=ON -DGRIDDYN_ENABLE_ZMQ=ON -DGRIDDYN_ENABLE_NETWORKING_LIBRARY=ON -DGRIDDYN_ENABLE_TCP=ON
- name: Clang 22
container: helics/buildenv:clang22-builder
cmake_flags: -DCMAKE_CXX_STANDARD=26 -DGRIDDYN_BUILD_TESTS=ON -DGRIDDYN_BUILD_C_SHARED_LIBRARY=ON -DGRIDDYN_ENABLE_FMI_EXPORT=ON
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure
shell: bash
run: |
mkdir -p build
cd build
eval cmake .. ${CMAKE_FLAGS}
env:
CMAKE_FLAGS: ${{ matrix.cmake_flags }}
- name: Build
shell: bash
run: cmake --build build --parallel 4
- name: Run migrated CircleCI tests
shell: bash
run: ./scripts/run-circleci-tests.sh
build-and-test-arm64:
name: Ubuntu 24.04 ARM64
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
ninja-build \
libsuitesparse-dev \
libboost-dev \
gcc-14 \
g++-14
- name: Configure
shell: bash
run: >
cmake -S . -B build -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=gcc-14
-DCMAKE_CXX_COMPILER=g++-14
-DBUILD_TESTING=ON
-DGRIDDYN_BUILD_TESTS=ON
-DGRIDDYN_ENABLE_FMI=OFF
-DGRIDDYN_ENABLE_HELICS_EXECUTABLE=OFF
- name: Build
shell: bash
run: cmake --build build --parallel 4
- name: Run continuous tests
shell: bash
run: ctest --test-dir build --output-on-failure -L Continuous