Id attribute optional in measurement/discrete measurement extensions #1600
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2021, RTE (http://www.rte-france.com) | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# | |
name: CI | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release-v**' | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Boost | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libboost-all-dev | |
- name: Checkout sources | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6 | |
- name: Configure CMake | |
run: > | |
cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build-linux | |
-DCMAKE_BUILD_TYPE=Release | |
-DBUILD_EXAMPLES=ON | |
- name: Build | |
run: cmake --build $GITHUB_WORKSPACE/build-linux --parallel 3 | |
- name: Tests | |
run: cmake --build $GITHUB_WORKSPACE/build-linux --target test | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
macos: | |
name: MacOS | |
runs-on: macos-latest | |
steps: | |
- name: Install Boost | |
run: brew install boost | |
- name: Checkout sources | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6 | |
- name: Configure CMake | |
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build-macos -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON | |
- name: Build | |
run: cmake --build $GITHUB_WORKSPACE/build-macos --parallel 3 | |
- name: Tests | |
run: cmake --build $GITHUB_WORKSPACE/build-macos --target test | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
windows: | |
env: | |
BOOST_ROOT: C:\thirdparties\boost-1.72.0 | |
BOOST_URL: https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe/download | |
LIBXML2_ROOT: C:\thirdparties\libxml2-2.9.10 | |
LIBXML2_URL: https://github.com/GNOME/libxml2/archive/v2.9.10.zip | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- name: Install LibXml2 | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
choco install wget --no-progress | |
wget -nv %LIBXML2_URL% | |
7z x v2.9.10.zip | |
cd libxml2-2.9.10/win32 | |
cscript configure.js compiler=msvc prefix=%LIBXML2_ROOT% iconv=no | |
nmake -f Makefile.msvc | |
nmake -f Makefile.msvc install | |
- name: Install Boost | |
shell: cmd | |
run: | | |
wget -nv -O boost-installer.exe %BOOST_URL% | |
boost-installer.exe /dir=%BOOST_ROOT% /sp- /verysilent /suppressmsgboxes /norestart | |
- name: Checkout sources | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6 | |
- name: Configure CMake | |
shell: cmd | |
run: > | |
cmake -S %GITHUB_WORKSPACE% -B %GITHUB_WORKSPACE%\build-windows | |
-DBUILD_EXAMPLES=ON | |
- name: Build | |
shell: cmd | |
run: | | |
set CL=/MP | |
cmake --build %GITHUB_WORKSPACE%\build-windows --parallel 3 --config Release | |
- name: Tests | |
shell: cmd | |
run: | | |
set PATH=%PATH%;%LIBXML2_ROOT%\bin;%BOOST_ROOT%\lib64-msvc-14.2;%GITHUB_WORKSPACE%\build-windows\src\Release;%GITHUB_WORKSPACE%\build-windows\src\test\Release | |
cmake --build %GITHUB_WORKSPACE%\build-windows --target RUN_TESTS --config Release --verbose | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
qa: | |
name: QA | |
runs-on: ubuntu-latest | |
env: | |
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed | |
steps: | |
- name: Install Java 17 | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install gcovr | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y gcovr | |
- name: Install Boost | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libboost-all-dev | |
- name: Checkout sources | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6 | |
- name: Install sonar-scanner and build-wrapper | |
uses: SonarSource/sonarcloud-github-c-cpp@816b1822d71776ee0d32bc012e95024ec52ac1fc # v3.1.0 | |
- name: Build | |
run: | | |
cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=TRUE -DBUILD_EXAMPLES=ON | |
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build $GITHUB_WORKSPACE/build --parallel 2 | |
- name: Tests | |
run: > | |
cmake --build $GITHUB_WORKSPACE/build --target test | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
- name: Code coverage | |
run: cmake --build $GITHUB_WORKSPACE/build --target code-coverage | |
- name: Sonarcloud | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" | |