Skip to content

Commit

Permalink
#784 Nightly release and release without mpi
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitri Baron <[email protected]>
  • Loading branch information
barondim committed Nov 5, 2024
1 parent f4a1215 commit 8c73591
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 25 deletions.
71 changes: 55 additions & 16 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ jobs:
fedora:
if: always() && !cancelled() && !failure() && (github.event.action == 'nightly-linux' || (github.event_name == 'workflow_dispatch' && inputs.perform-linux) || !endsWith(github.event_name, '_dispatch'))
name: Linux Fedora (Release, GCC, cxx11)
name: Linux Fedora (Release, GCC, cxx11) (${{ matrix.use-mpi.text }})
runs-on: ubuntu-latest
strategy:
matrix:
use-mpi:
- { value: YES, text: 'with MPI' }
- { value: NO, text: 'without MPI' }
needs: nightly
env:
DYNAFLOW_LAUNCHER_BUILD_TYPE: Release
Expand All @@ -71,6 +76,7 @@ jobs:
DYNAFLOW_LAUNCHER_LOCALE: "en_GB"
DYNAFLOW_LAUNCHER_USE_DOXYGEN: "OFF"
DYNAFLOW_LAUNCHER_BUILD_TESTS: "OFF"
DYNAWO_USE_MPI: ${{ matrix.use-mpi.value }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -89,7 +95,7 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: dynawo/dynawo-distribution-cxx11:latest
options: -v ${{ github.workspace }}:/dynaflow-launcher -e DYNAFLOW_LAUNCHER_BUILD_TYPE -e DYNAFLOW_LAUNCHER_PROCESSORS_USED -e DYNAFLOW_LAUNCHER_FORCE_CXX11_ABI -e DYNAFLOW_LAUNCHER_LOCALE -e DYNAFLOW_LAUNCHER_USE_DOXYGEN -e DYNAFLOW_LAUNCHER_BUILD_TESTS
options: -v ${{ github.workspace }}:/dynaflow-launcher -e DYNAFLOW_LAUNCHER_BUILD_TYPE -e DYNAFLOW_LAUNCHER_PROCESSORS_USED -e DYNAFLOW_LAUNCHER_FORCE_CXX11_ABI -e DYNAFLOW_LAUNCHER_LOCALE -e DYNAFLOW_LAUNCHER_USE_DOXYGEN -e DYNAFLOW_LAUNCHER_BUILD_TESTS -e DYNAWO_USE_MPI
shell: bash
run: |
cd /dynaflow-launcher
Expand All @@ -101,14 +107,17 @@ jobs:
scripts/envDFL.sh build-doc
- name: Prepare files for distribution
if: ${{ matrix.use-mpi.value == 'YES' }}
run: |
mkdir distributions
zip -r distributions/DynaFlowLauncher_v${DYNAWO_VERSION}.zip dynaflow-launcher
- name: INFO. Files created in distributions folder
if: ${{ matrix.use-mpi.value == 'YES' }}
run: du -hs distributions/*

- name: Fetch release script
if: ${{ matrix.use-mpi.value == 'YES' }}
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/dynawo
Expand All @@ -117,6 +126,7 @@ jobs:
path: dynawo

- name: Upload assets for release
if: ${{ matrix.use-mpi.value == 'YES' }}
uses: actions/github-script@v7
env:
tag_name: ${{ env.DYNAWO_TAG }}
Expand All @@ -133,9 +143,16 @@ jobs:
windows:
if: always() && !cancelled() && !failure() && (github.event.action == 'nightly-windows' || (github.event_name == 'workflow_dispatch' && inputs.perform-windows) || !endsWith(github.event_name, '_dispatch'))
name: Windows 2019 (Release, VS2019)
name: Windows 2019 (Release, VS2019) (${{ matrix.use-mpi.text }})
runs-on: windows-2019
strategy:
matrix:
use-mpi:
- { value: YES, text: 'with MPI' }
- { value: NO, text: 'without MPI' }
needs: nightly
env:
DYNAWO_USE_MPI: ${{ matrix.use-mpi.value }}
steps:
- name: No LF to CRLF conversion
shell: cmd
Expand All @@ -145,12 +162,14 @@ jobs:
uses: actions/checkout@v4

- name: Download MS-MPI
if: ${{ matrix.use-mpi.value == 'YES' }}
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
if: ${{ matrix.use-mpi.value == 'YES' }}
shell: cmd
run: |
msmpisdk.msi /passive
Expand All @@ -170,11 +189,21 @@ jobs:

- name: Fetch Dynawo-algorithms' nightly release
shell: bash
run: curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_Windows_v$DYNAWO_VERSION.zip
run: |
if [ "${{ matrix.use-mpi.value }}" == "YES" ]; then
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_Windows_v$DYNAWO_VERSION.zip
else
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_Windows_without_mpi_v$DYNAWO_VERSION.zip
fi
- name: Unzip Dynawo-algorithms
shell: cmd
run: 7z x DynawoAlgorithms_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
run: |
if "${{ matrix.use-mpi.value }}" == "YES" (
7z x DynawoAlgorithms_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
) else (
7z x DynawoAlgorithms_Windows_without_mpi_v%DYNAWO_VERSION%.zip -o..\deploy
)
- name: Dynawo-algorithms version
shell: cmd
Expand All @@ -186,13 +215,16 @@ jobs:
- 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\
MSMPI_BIN: C:\Program Files\Microsoft MPI\Bin\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: |
set PATH=%MSMPI_BIN%;%PATH%
setlocal enableDelayedExpansion
if "${{ matrix.use-mpi.value }}" == "YES" (
set "MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\"
set "MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\"
set "MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\"
set "MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\"
set "PATH=!MSMPI_BIN!;%PATH%"
)
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call scripts\dynaflow-launcher verbose build || exit /b 1
Expand All @@ -206,14 +238,17 @@ jobs:
if: github.event_name != 'workflow_dispatch' || inputs.perform-nrt
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\
MSMPI_BIN: C:\Program Files\Microsoft MPI\Bin\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts
run: |
setlocal enableDelayedExpansion
if "${{ matrix.use-mpi.value }}" == "YES" (
set "MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\"
set "MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\"
set "MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\"
set "MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\"
set "PATH=!MSMPI_BIN!;%PATH%"
)
pip install lxml
set PATH=%MSMPI_BIN%;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call scripts\dynaflow-launcher verbose tests "^^M" || exit /b 1
Expand All @@ -223,7 +258,11 @@ jobs:
md distrib
cd distrib
move /y ..\..\dfl-i dynaflow-launcher
7z a DynaFlowLauncher_Windows_v%DYNAWO_VERSION%.zip dynaflow-launcher
if "${{ matrix.use-mpi.value }}" == "YES" (
7z a DynaFlowLauncher_Windows_v%DYNAWO_VERSION%.zip dynaflow-launcher
) else (
7z a DynaFlowLauncher_Windows_without_mpi_v%DYNAWO_VERSION%.zip dynaflow-launcher
)
- name: INFO. Files created in distrib folder
shell: bash
Expand Down
42 changes: 33 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,15 @@ jobs:
distribution-windows:
if: github.event_name != 'workflow_dispatch' || inputs.perform-windows
name: Distribution Windows
name: Distribution Windows (${{ matrix.use-mpi.text }})
runs-on: windows-2019
strategy:
matrix:
use-mpi:
- { value: YES, text: 'with MPI' }
- { value: NO, text: 'without MPI' }
env:
DYNAWO_USE_MPI: ${{ matrix.use-mpi.value }}
steps:
- name: No LF to CRLF conversion
shell: cmd
Expand All @@ -162,12 +169,14 @@ jobs:
uses: actions/checkout@v4

- name: Download MS-MPI
if: ${{ matrix.use-mpi.value == 'YES' }}
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
if: ${{ matrix.use-mpi.value == 'YES' }}
shell: cmd
run: |
msmpisdk.msi /passive
Expand All @@ -177,25 +186,36 @@ jobs:
shell: bash
run: |
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/v$DYNAWO_VERSION/Dynawo_Windows_v$DYNAWO_VERSION.zip
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/v$DYNAWO_VERSION/DynawoAlgorithms_Windows_v$DYNAWO_VERSION.zip
if [ "${{ matrix.use-mpi.value }}" == "YES" ]; then
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/v$DYNAWO_VERSION/DynawoAlgorithms_Windows_v$DYNAWO_VERSION.zip
else
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/v$DYNAWO_VERSION/DynawoAlgorithms_Windows_without_mpi_v$DYNAWO_VERSION.zip
fi
- name: Unzip Dynawo
shell: cmd
run: |
7z x Dynawo_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
7z x DynawoAlgorithms_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
if "${{ matrix.use-mpi.value }}" == "YES" (
7z x DynawoAlgorithms_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
) else (
7z x DynawoAlgorithms_Windows_without_mpi_v%DYNAWO_VERSION%.zip -o..\deploy
)
# 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\
MSMPI_BIN: C:\Program Files\Microsoft MPI\Bin\
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: |
set PATH=%MSMPI_BIN%;%PATH%
setlocal enableDelayedExpansion
if "${{ matrix.use-mpi.value }}" == "YES" (
set "MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\"
set "MSMPI_LIB32: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\"
set "MSMPI_LIB64: C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\"
set "MSMPI_BIN: C:\Program Files\Microsoft MPI\Bin\"
set "PATH=!MSMPI_BIN!;%PATH%"
)
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call scripts\dynaflow-launcher verbose build || exit /b 1
Expand All @@ -205,7 +225,11 @@ jobs:
md distrib
cd distrib
move /y ..\..\dfl-i dynaflow-launcher
7z a DynaFlowLauncher_Windows_v%DYNAWO_VERSION%.zip dynaflow-launcher
if "${{ matrix.use-mpi.value }}" == "YES" (
7z a DynaFlowLauncher_Windows_v%DYNAWO_VERSION%.zip dynaflow-launcher
) else (
7z a DynaFlowLauncher_Windows_without_mpi_v%DYNAWO_VERSION%.zip dynaflow-launcher
)
- name: Fetch release script
uses: actions/checkout@v4
Expand Down

0 comments on commit 8c73591

Please sign in to comment.