Skip to content

Commit

Permalink
Test_centos7_release_1
Browse files Browse the repository at this point in the history
Signed-off-by: arnaud <[email protected]>
  • Loading branch information
ARnDOSrte committed Oct 10, 2023
1 parent 64c08c3 commit 7ba4118
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 101 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ jobs:
- name: Build
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build-linux --target install --parallel 2

# - name: Tests
# run: cd $GITHUB_WORKSPACE/metrix-simulator/build-linux && ctest -j2 --output-on-failure
- name: Tests
run: cd $GITHUB_WORKSPACE/metrix-simulator/build-linux && ctest -j2 --output-on-failure
148 changes: 73 additions & 75 deletions .github/workflows/ci_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,78 +37,76 @@ jobs:
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build-linux --target install --parallel 2

- name: Tests
run: cd $GITHUB_WORKSPACE/metrix-simulator/build-linux && ctest -j2 --output-on-failure

qa:
name: QA - CI
runs-on: ubuntu-latest
steps:
- name: Install Java 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Install gcovr
run: |
sudo apt-get update -y
sudo apt-get install -y gcovr
- name: Install Sonar wrapper
working-directory: ${{ runner.workspace }}
run: |
wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip build-wrapper-linux-x86.zip
- name: Install Sonar scanner
working-directory: ${{ runner.workspace }}
run: |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
unzip sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
ln -s sonar-scanner-${SONAR_SCANNER_VERSION} sonar
rm sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
env:
SONAR_SCANNER_VERSION: 3.3.0.1492

- name: Install Boost
run: |
sudo apt-get update -y
sudo apt-get install -y libboost-all-dev
- name: Checkout sources
uses: actions/checkout@v1

- name: Configure 3rd parties
run: >
cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build/external
- name: Build 3rd parties
run: >
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2
- name: Configure CMake
run: >
cmake -Wno-dev -S $GITHUB_WORKSPACE/metrix-simulator -B $GITHUB_WORKSPACE/metrix-simulator/build
-DCMAKE_BUILD_TYPE=Debug
-DCODE_COVERAGE=TRUE
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build/install
- name: Build
run: >
${{ runner.workspace }}/build-wrapper-linux-x86/build-wrapper-linux-x86-64
--out-dir $GITHUB_WORKSPACE/metrix-simulator/build/output
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --parallel 2 --target install
- name: Tests
run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j2 --output-on-failure

- name: Code coverage
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --target code-coverage

# - name: Sonarcloud
# working-directory: ${{ runner.workspace }}/powsybl-metrix/metrix-simulator
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# run: >
# ${{ runner.workspace }}/sonar/bin/sonar-scanner
# -Dsonar.host.url=https://sonarcloud.io
run: cd $GITHUB_WORKSPACE/metrix-simulator/build-linux && ctest -j8 --output-on-failure

# qa:
# name: QA - CI
# runs-on: ubuntu-latest
# steps:
# - name: Install Java 11
# uses: actions/setup-java@v1
# with:
# java-version: 11

# - name: Install gcovr
# run: |
# sudo apt-get update -y
# sudo apt-get install -y gcovr

# - name: Install Sonar wrapper
# working-directory: ${{ runner.workspace }}
# run: |
# wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
# unzip build-wrapper-linux-x86.zip

# - name: Install Sonar scanner
# working-directory: ${{ runner.workspace }}
# run: |
# wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
# unzip sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
# ln -s sonar-scanner-${SONAR_SCANNER_VERSION} sonar
# rm sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
# env:
# SONAR_SCANNER_VERSION: 3.3.0.1492

# - name: Install Boost
# run: |
# sudo apt-get update -y
# sudo apt-get install -y libboost-all-dev

# - name: Checkout sources
# uses: actions/checkout@v1

# - name: Configure 3rd parties
# run: >
# cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build/external

# - name: Build 3rd parties
# run: >
# cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2

# - name: Configure CMake
# run: >
# cmake -Wno-dev -S $GITHUB_WORKSPACE/metrix-simulator -B $GITHUB_WORKSPACE/metrix-simulator/build
# -DCMAKE_BUILD_TYPE=Debug
# -DCODE_COVERAGE=TRUE
# -DMETRIX_RUN_ALL_TESTS=OFF
# -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build/install

# - name: Build
# run: >
# ${{ runner.workspace }}/build-wrapper-linux-x86/build-wrapper-linux-x86-64
# --out-dir $GITHUB_WORKSPACE/metrix-simulator/build/output
# cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --parallel 2 --target install

# - name: Tests
# run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j8 --output-on-failure

# - name: Sonarcloud
# working-directory: ${{ runner.workspace }}/powsybl-metrix/metrix-simulator
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# run: >
# ${{ runner.workspace }}/sonar/bin/sonar-scanner
# -Dsonar.host.url=https://sonarcloud.io
2 changes: 1 addition & 1 deletion .github/workflows/qa_pr_cpp_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2
- name: Configure CMake
run: >
run: |
source /opt/rh/devtoolset-9/enable
cmake -S $GITHUB_WORKSPACE/metrix-simulator -B $GITHUB_WORKSPACE/metrix-simulator/build
-DCMAKE_BUILD_TYPE=Debug
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/qa_pr_cpp_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: QA-PR-CPP-UBUNTU
name: QA-PR-CPP

on:
pull_request:
types: [opened, synchronize, edited]
release:
types: [created, published, released]
types: [created]

jobs:
clang-tidy:
Expand Down Expand Up @@ -54,7 +54,9 @@ jobs:
java-version: 11

- name: Install gcovr
run: sudo pip install gcovr
run: |
sudo apt-get update -y
sudo apt-get install -y gcovr
- name: Install Sonar wrapper
working-directory: ${{ runner.workspace }}
Expand Down Expand Up @@ -114,24 +116,25 @@ jobs:
run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j8 -R "bug_pne" --output-on-failure

- name: Code coverage
if: github.event_name == 'release'
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --target code-coverage

# - name: Sonarcloud
# working-directory: ${{ runner.workspace }}/powsybl-metrix/metrix-simulator
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# run: >
# ${{ runner.workspace }}/sonar/bin/sonar-scanner
# -Dsonar.host.url=https://sonarcloud.io

- name: Prepare Metrix install
- name: Sonarcloud
working-directory: ${{ runner.workspace }}/powsybl-metrix/metrix-simulator
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
${{ runner.workspace }}/sonar/bin/sonar-scanner
-Dsonar.host.url=https://sonarcloud.io
- name: Prepare Metrix install
if: github.event_name == 'release'
id: metrix-install
run: |
ARCHIVE_NAME="metrix-simulator.zip"
ARCHIVE_PATH="$PWD/${ARCHIVE_NAME}"
zip $ARCHIVE_PATH /__w/powsybl-metrix/powsybl-metrix/metrix-simulator/build-linux/install/bin/metrix-simulator
zip $ARCHIVE_PATH /__w/powsybl-metrix/powsybl-metrix/metrix-simulator/build/install/bin/metrix-simulator
echo "::set-output name=archive_name::$ARCHIVE_NAME"
echo "::set-output name=archive_path::$ARCHIVE_PATH"
Expand All @@ -154,24 +157,19 @@ jobs:
name: metrix-simulator.zip
path: ./

- name: Create Release
id: create_release
uses: actions/create-release@v1
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ secrets.TEST_TOKEN_RELEASE }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TEST_TOKEN_RELEASE }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ steps.get_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: metrix-simulator.zip
asset_name: metrix-simulator.zip
asset_content_type: application/zip

0 comments on commit 7ba4118

Please sign in to comment.