Skip to content

nightly-windows

nightly-windows #658

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
perform-dispatch:
description: Tell dynaflow-launcher the nightly release is ready
type: boolean
default: true
repository_dispatch:
types: [nightly-linux, nightly-windows]
# schedule:
# - cron: "0 4 * * 2-6" # 6 hours later after Dynawo nightly-release.yml
env:
DYNAWO_VERSION: 1.6.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@v3
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@v6
env:
body: |
DynawoAlgorithms'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
container: dynawo/dynawo-distribution-cxx11:latest
needs: nightly
env:
DYNAWO_RESULTS_SHOW: "false"
DYNAWO_BUILD_TYPE: Release
DYNAWO_FORCE_CXX11_ABI: "true"
DYNAWO_NB_PROCESSORS_USED: 2
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch Dynawo's nightly release
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: Build
run: |
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)
util/envDynawoAlgorithms.sh build
- name: Build documentation
run: |
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)
util/envDynawoAlgorithms.sh build-doc
- name: Prepare files for distribution
run: |
export DYNAWO_HOME=$(pwd)/dynawo
export DYNAWO_ALGORITHMS_HOME=$(pwd)
util/envDynawoAlgorithms.sh distrib
util/envDynawoAlgorithms.sh distrib-headers
- name: INFO. Files created in distributions folder
run: du -hs distributions/*
- name: Fetch release script
uses: actions/checkout@v3
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@v6
env:
tag_name: ${{ env.DYNAWO_TAG }}
draft: false
prerelease: true
files: |
distributions/*.zip
documentation/dynawoAlgorithmsDocumentation/DynawoAlgorithmsDocumentation.pdf
with:
retries: 3
script: |
const release = require('./dynawo/.github/release.js')
await release({github, context, core, glob})
# The secrets.DISPATCH_TOKEN should contain a fine-grained PAT with access to dynawo/dynaflow-launcher with Repository permissions 'Contents: Read and write'
- name: Tell dynaflow-launcher the nightly release is ready
if: github.event_name != 'workflow_dispatch' || inputs.perform-dispatch
uses: actions/github-script@v6
with:
github-token: ${{ secrets.DISPATCH_TOKEN }}
script: |
await github.rest.repos.createDispatchEvent({ owner: context.repo.owner, repo: "dynaflow-launcher", event_type: "nightly-linux" });
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@v3
- 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
# 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 || exit /b 1
- 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 || exit /b 1
- name: Run NRT
if: github.event_name != 'workflow_dispatch' || inputs.perform-nrt
shell: cmd
env:
MSMPI_BENCHMARKS: C:\Program Files\Microsoft MPI\Benchmarks\
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 psutil
set PATH=%MSMPI_BIN%;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call util\windows\dynawo-algorithms verbose nrt || exit /b 1
- name: Create distribution
shell: cmd
env:
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 distrib-headers distrib || exit /b 1
- name: INFO. Files created in distrib folder
shell: bash
run: |
du -hs distrib/*
for file in distrib/DynawoAlgorithms_*.zip ; do mv $file ${file//headers_Release/Windows} ; done
- name: Fetch release script
uses: actions/checkout@v3
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@v6
env:
tag_name: ${{ env.DYNAWO_TAG }}
draft: false
prerelease: true
files: |
distrib/DynawoAlgorithms_*.zip
with:
retries: 3
script: |
const release = require('./dynawo/.github/release.js')
await release({github, context, core, glob})
- name: Tell dynaflow-launcher the nightly release is ready
if: github.event_name != 'workflow_dispatch' || inputs.perform-dispatch
uses: actions/github-script@v6
with:
github-token: ${{ secrets.DISPATCH_TOKEN }}
script: |
await github.rest.repos.createDispatchEvent({ owner: context.repo.owner, repo: "dynaflow-launcher", event_type: "nightly-windows" });