Skip to content

Commit

Permalink
Merge branch 'feature/reserve_model_lot2_scalian' into feature/reserv…
Browse files Browse the repository at this point in the history
…e_model_lot2_scalian_without_tests

Updating the generated exe
  • Loading branch information
sylvmara committed Dec 4, 2024
2 parents 8476abc + 9c3a50a commit d4754be
Show file tree
Hide file tree
Showing 419 changed files with 12,560 additions and 6,498 deletions.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/support_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Request for support
about: Ask any question
title: ''
labels: help wanted

---

**Your identity**
Your name, company, why you are interested in Antares-Simulator...
Any information that can help us understand the context of your request!

**Question**
Your question, remark...
35 changes: 18 additions & 17 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,19 @@ jobs:
- name: Install gcc 10
run: |
# update mirrors, official centos7 is deprecated
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&\
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&\
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo &&\
yum update -y
# not a typo, centos-release-scl is needed to install devtoolset-10 but introduce deprecated mirror
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&\
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&\
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
yum install -y centos-release-scl
yum install -y devtoolset-10-gcc*
yum install -y devtoolset-11-gcc*
- name: Install cmake 3.28
run: pip3 install cmake==3.28.4
Expand Down Expand Up @@ -75,7 +86,7 @@ jobs:
- name: Config OR-Tools URL
run: |
echo "URL_ORTOOLS=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV
echo "URL_ORTOOLS=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV
- name: Download OR-Tools
id: ortools
Expand All @@ -89,12 +100,12 @@ jobs:
if: ${{ env.IS_RELEASE == 'true' }}
run: |
wget https://github.com/cli/cli/releases/download/v2.52.0/gh_2.52.0_linux_amd64.rpm
rpm -i gh_2.52.0_linux_amd64.rpm
gh --version
rpm -i gh_2.52.0_linux_amd64.rpm
gh --version
- name: Configure
run: |
source /opt/rh/devtoolset-10/enable
source /opt/rh/devtoolset-11/enable
source /opt/rh/rh-git227/enable
cmake -B _build -S src \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
Expand All @@ -110,7 +121,7 @@ jobs:
- name: Build
run: |
source /opt/rh/devtoolset-10/enable
source /opt/rh/devtoolset-11/enable
source /opt/rh/rh-git227/enable
cmake --build _build --config Release -j$(nproc)
ccache -s
Expand All @@ -135,24 +146,14 @@ jobs:
cd _build
cpack -G TGZ
- name: Installer TGZ push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz

- name: Installer RPM push
uses: actions/upload-artifact@v3
with:
path: _build/*.rpm

- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" _build/*.tar.gz _build/*.rpm
- name: Cache vcpkg binary dir
if: always()
id: save-cache-vcpkg-binary
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/cucumber-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Run cucumber tests"
description: "Run cucumber tests"
inputs:
feature:
description: 'Feature file or folder to run (default runs all features in "features" folder)'
required: false
default: 'features'
tags:
description: 'Tags to run (default skips tests marked @flaky)'
required: false
default: '~@flaky'
runs:
using: "composite"
steps:
- name: Install Python requirements
shell: bash
run: python3 -m pip install -r src/tests/cucumber/requirements.txt

- name: Run tests
shell: bash
run: |
cd src/tests/cucumber
behave --tags ${{ inputs.tags }} ${{ inputs.feature }}
11 changes: 5 additions & 6 deletions .github/workflows/oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
- name: Restore vcpkg binary dir from cache
id: cache-vcpkg-binary
# Note: we are stuck with v3, because v4 is not compatible with oracle8 image
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ${{ env.VCPKG_CACHE_DIR }}
key: vcpkg-cache-oracle8-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }}
Expand All @@ -74,7 +73,7 @@ jobs:

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_oraclelinux-8_static_sirius.zip" >> $GITHUB_ENV
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_oraclelinux-8_static_sirius.zip" >> $GITHUB_ENV
- name: Download & extract OR-Tools
run: |
Expand Down Expand Up @@ -144,13 +143,13 @@ jobs:
- name: Installer TGZ push
uses: actions/upload-artifact@v4
with:
name: targz
name: oracle-targz
path: _build/*.tar.gz

- name: Installer RPM push
uses: actions/upload-artifact@v4
with:
name: rpm
name: oracle-rpm
path: _build/*.rpm

- name: Publish assets
Expand All @@ -164,7 +163,7 @@ jobs:
- name: Cache vcpkg binary dir
if: always()
id: save-cache-vcpkg-binary
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: ${{ env.VCPKG_CACHE_DIR }}
key: vcpkg-cache-oracle8-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }}
40 changes: 36 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ jobs:
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
# Caching strategy of VCPKG dependencies
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite"
BUILD_WRAPPER_OUT_DIR: ${{ github.workspace }}/_build/output # Directory where build-wrapper output will be placed

steps:
# Disk space on / is insufficient, leading to errors
# We use this 'hack' to remove unused stuff (android, dotnet, etc.) and change partition layout
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 5120
swap-size-mb: 1024
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true

- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
Expand All @@ -40,7 +53,7 @@ jobs:

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v3
Expand Down Expand Up @@ -78,6 +91,16 @@ jobs:
python -m pip install --upgrade pip
pip3 install -r src/tests/examples/requirements.txt
- name: Read simtest version
run: |
echo 'SIMTEST_JSON<<EOF' >> $GITHUB_ENV
cat ./simtest.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Export simtest version
run: |
echo "SIMTEST=${{ fromJson(env.SIMTEST_JSON).version }}" >> $GITHUB_ENV
- name: Init submodule
run: |
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests
Expand All @@ -92,22 +115,31 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
-DCODE_COVERAGE=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="../install;${{ env.ORTOOLS_DIR }}/install" \
-DBUILD_TESTING=ON \
-DMZ_CODE_COVERAGE=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}'
- name: Build
run: |
build-wrapper-linux-x86-64 --out-dir $GITHUB_WORKSPACE/_build/output cmake --build _build --config release -j$(nproc)
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build _build --config Release -j$(nproc)
- name: Test and generate coverage
continue-on-error: true
run: |
cd $GITHUB_WORKSPACE/_build
ctest -C Release --output-on-failure -L "unit"
- name: Run short-tests
continue-on-error: true
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{ env.SIMTEST }}
batch-name: short-tests
os: ${{ matrix.os }}

- name: Collect coverage into one XML report
run: |
gcovr --sonarqube --output coverage.xml
Expand All @@ -116,7 +148,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}"
run: sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"

- name: Cache vcpkg binary dir
if: always()
Expand Down
Loading

0 comments on commit d4754be

Please sign in to comment.