Skip to content

#443 Windows without MPI CI build fix on DFL #728

#443 Windows without MPI CI build fix on DFL

#443 Windows without MPI CI build fix on DFL #728

Workflow file for this run

name: CI
on: [push]
defaults:
run:
shell: bash
env:
DYNAWO_VERSION: 1.7.0
jobs:
build-linux:
runs-on: ubuntu-latest
container: dynawo/dynawo-ci:latest
env:
DYNAWO_BUILD_TYPE: Debug
DYNAWO_RESULTS_SHOW: "false"
DYNAWO_FORCE_CXX11_ABI: "true"
DYNAWO_NB_PROCESSORS_USED: 2
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Fetch Dynawo
run: curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_headers_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo
run: unzip -qq "Dynawo_headers_v${DYNAWO_VERSION}.zip"
- name: Dynawo version
run: ./dynawo/dynawo.sh version
- name: Build
run: |
source /etc/profile.d/00-modulepath.sh
source /etc/profile.d/modules.sh
source /usr/share/lmod/lmod/init/bash
module load mpi/mpich-x86_64
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)
util/envDynawoAlgorithms.sh build
coverage:
runs-on: ubuntu-latest
container: dynawo/dynawo-ci:latest
env:
DYNAWO_BUILD_TYPE: Debug
DYNAWO_FORCE_CXX11_ABI: "true"
DYNAWO_RESULTS_SHOW: "false"
DYNAWO_NB_PROCESSORS_USED: 2
steps:
- name: Install Sonar wrapper
working-directory: ${{ runner.workspace }}
env:
CONTAINER_WORKSPACE: ${{ 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 }}
env:
SONAR_SCANNER_VERSION: 4.6.0.2311
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
cd /
curl -LO https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz
tar xzf openjdk-17.0.2_linux-x64_bin.tar.gz
- name: Checkout sources
uses: actions/checkout@v4
- name: Fetch Dynawo
run: curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_omc_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo
run: unzip -qq "Dynawo_omc_v${DYNAWO_VERSION}.zip"
- name: Build
env:
CONTAINER_WORKSPACE: ${{ runner.workspace }}
run: |
source /etc/profile.d/00-modulepath.sh
source /etc/profile.d/modules.sh
source /usr/share/lmod/lmod/init/bash
module load mpi/mpich-x86_64
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)
$CONTAINER_WORKSPACE/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output util/envDynawoAlgorithms.sh build-tests-coverage
- name: Sonarcloud
working-directory: ${{ runner.workspace }}/dynawo-algorithms
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CONTAINER_WORKSPACE: ${{ runner.workspace }}
JAVA_HOME: /jdk-17.0.2
run: |
export PATH=${JAVA_HOME}/bin:${PATH}
$CONTAINER_WORKSPACE/sonar/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.cfamily.threads=2
build-windows:
runs-on: windows-2019
steps:
- name: No LF to CRLF conversion
shell: cmd
run: git config --global core.autocrlf input
- name: Checkout sources
uses: actions/checkout@v4
- name: Download MS-MPI
shell: bash
run: |
curl -Os https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisdk.msi
curl -Os https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe
- name: Install MS-MPI
shell: cmd
run: |
msmpisdk.msi /passive
msmpisetup.exe /unattend
- name: Fetch Dynawo
shell: bash
run: curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_Windows_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo
shell: cmd
run: 7z x Dynawo_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
- name: Dynawo version
shell: cmd
run: ..\deploy\dynawo\dynawo version
# use a minimal PATH to avoid too long command lines and conflict with Strawberry pkg-config !
- name: Build and install
shell: cmd
env:
MSMPI_INC: C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
MSMPI_LIB32: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
MSMPI_LIB64: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call util\windows\dynawo-algorithms verbose build
- name: Dynawo-Algorithms version
shell: cmd
env:
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: call ..\da-i\dynawo-algorithms verbose version
- name: Build and run unit tests
shell: cmd
env:
MSMPI_INC: C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
MSMPI_LIB32: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
MSMPI_LIB64: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call util\windows\dynawo-algorithms verbose tests