Skip to content

nightly-windows

nightly-windows #1079

name: Nightly Release
on:
workflow_dispatch:
inputs:
perform-nightly:
description: Prepare nightly tag and release
type: boolean
default: true
perform-linux:
description: Build Linux release
type: boolean
default: true
perform-windows:
description: Build Windows release
type: boolean
default: true
perform-nrt:
description: Run NRT on Windows
type: boolean
default: true
repository_dispatch:
types: [nightly-linux, nightly-windows]
# schedule:
# - cron: "30 4 * * 2-6" # 30 minutes later after Dynawo-algorithms nightly-release.yml
env:
DYNAWO_VERSION: 1.7.0
DYNAWO_TAG: nightly
jobs:
nightly:
if: github.event_name != 'workflow_dispatch' || inputs.perform-nightly
name: Prepare nightly tag and release
runs-on: ubuntu-latest
steps:
- name: Fetch release script
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/dynawo
sparse-checkout: .github/release.js
sparse-checkout-cone-mode: false
- name: Create nightly tag and release if necessary
uses: actions/github-script@v7
env:
body: |
DynaFlowLauncher's nightly release. Compiled on *release* settings.
**Don't use it for production**
draft: false
prerelease: true
release_name: Nightly
tag_name: ${{ env.DYNAWO_TAG }}
target_commitish: heads/master
with:
retries: 3
script: |
const release = require('.github/release.js')
await release({github, context, core, glob})
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)
runs-on: ubuntu-latest
needs: nightly
env:
DYNAFLOW_LAUNCHER_BUILD_TYPE: Release
DYNAFLOW_LAUNCHER_PROCESSORS_USED: 2
DYNAFLOW_LAUNCHER_FORCE_CXX11_ABI: "true"
DYNAFLOW_LAUNCHER_LOCALE: "en_GB"
DYNAFLOW_LAUNCHER_USE_DOXYGEN: "OFF"
DYNAFLOW_LAUNCHER_BUILD_TESTS: "OFF"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Dynawo's and Dynawo-algorithms's nightly releases
run: |
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo/releases/download/nightly/Dynawo_headers_v$DYNAWO_VERSION.zip
curl -LOs https://github.com/${{ github.repository_owner }}/dynawo-algorithms/releases/download/nightly/DynawoAlgorithms_headers_v$DYNAWO_VERSION.zip
- name: Unzip Dynawo and Dynawo-algorithms
run: |
unzip -qq "Dynawo_headers_v${DYNAWO_VERSION}.zip"
unzip -qq "DynawoAlgorithms_headers_v${DYNAWO_VERSION}.zip"
- name: Build, Build documentation
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
shell: bash
run: |
cd /dynaflow-launcher
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)/dynawo-algorithms
export DYNAFLOW_LAUNCHER_HOME=$(pwd)
export DYNAFLOW_LAUNCHER_INSTALL_DIR=$DYNAFLOW_LAUNCHER_HOME/dynaflow-launcher
scripts/envDFL.sh build-user
scripts/envDFL.sh build-doc
- name: Prepare files for distribution
run: |
mkdir distributions
zip -r distributions/DynaFlowLauncher_v${DYNAWO_VERSION}.zip dynaflow-launcher
- name: INFO. Files created in distributions folder
run: du -hs distributions/*
- name: Fetch release script
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/dynawo
sparse-checkout: .github/release.js
sparse-checkout-cone-mode: false
path: dynawo
- name: Upload assets for release
uses: actions/github-script@v7
env:
tag_name: ${{ env.DYNAWO_TAG }}
draft: false
prerelease: true
files: |
distributions/*.zip
documentation/dynaflowLauncherDocumentation/DynaflowLauncherDocumentation.pdf
with:
retries: 3
script: |
const release = require('./dynawo/.github/release.js')
await release({github, context, core, glob})
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)
runs-on: windows-2019
needs: nightly
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's nightly release
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
- 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
- name: Unzip Dynawo-algorithms
shell: cmd
run: 7z x DynawoAlgorithms_Windows_v%DYNAWO_VERSION%.zip -o..\deploy
- 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 ..\deploy\dynawo-algorithms\dynawo-algorithms verbose version || exit /b 1
# 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%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call scripts\dynaflow-launcher verbose build || exit /b 1
- name: Dynaflow-launcher version
shell: cmd
env:
PATH: C:\Windows\system32;C:\Program Files\Git\cmd;C:\hostedtoolcache\windows\Python\3.7.9\x64
run: call ..\dfl-i\dynaflow-launcher verbose version || exit /b 1
- name: Build and run NRT
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: |
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
- name: Create distribution
shell: cmd
run: |
md distrib
cd distrib
move /y ..\..\dfl-i dynaflow-launcher
7z a DynaFlowLauncher_Windows_v%DYNAWO_VERSION%.zip dynaflow-launcher
- name: INFO. Files created in distrib folder
shell: bash
run: du -hs distrib/*
- name: Fetch release script
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/dynawo
sparse-checkout: .github/release.js
sparse-checkout-cone-mode: false
path: dynawo
- name: Upload distribution
uses: actions/github-script@v7
env:
tag_name: ${{ env.DYNAWO_TAG }}
draft: false
prerelease: true
files: distrib/DynaFlowLauncher*.zip
with:
retries: 3
script: |
const release = require('./dynawo/.github/release.js')
await release({github, context, core, glob})