Update windows-automated-releases.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Windows-automated-releases" | |
on: | |
push: | |
branches: | |
- master | |
- feature/automate-release | |
env: | |
PULMTLN_TOP_DIR: pulmtln | |
MFEM_TOP_DIR: mfem | |
jobs: | |
builds-and-tests: | |
strategy: | |
matrix: | |
os: [windows-latest] | |
target: [opt] | |
name: ${{ matrix.os }}-${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- name: checkout PULMTLN | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ env.PULMTLN_TOP_DIR }} | |
ssh-key: ${{secrets.PULMTLN_SSH_KEY_2024}} | |
- name: getcmake | |
uses: lukka/get-cmake@latest | |
- name: Setup vcpkg (it does not install any package yet) | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: 42bb0d9e8d4cf33485afb9ee2229150f79f61a1f | |
vcpkgJsonGlob: 'pulmtln/vcpkg.json' | |
- name: cache MFEM | |
uses: actions/cache@v3 | |
id: mfem-cache | |
with: | |
path: ${{ env.MFEM_TOP_DIR }} | |
key: mfem-build-windows-opt | |
- name: checkout MFEM | |
if: steps.mfem-cache.outputs.cache-hit != 'true' | |
uses: actions/checkout@v3 | |
with: | |
repository: opensemba/mfem | |
path: ${{ env.MFEM_TOP_DIR }} | |
- name: build MFEM | |
if: steps.mfem-cache.outputs.cache-hit != 'true' | |
uses: mfem/github-actions/build-mfem@v2.4 | |
env: | |
HYPRE_TOP_DIR: hypre-2.19.0 | |
METIS_TOP_DIR: metis-4.0.3 | |
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg_cache | |
with: | |
os: windows-latest | |
target: opt | |
mpi: seq | |
build-system: cmake | |
hypre-dir: ${{ env.HYPRE_TOP_DIR }} | |
metis-dir: ${{ env.METIS_TOP_DIR }} | |
mfem-dir: ${{ env.MFEM_TOP_DIR }} | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Configuring PULMTLN | |
env: | |
MFEM_PACKAGE: ${{ github.workspace }}/${{env.MFEM_TOP_DIR}}/build | |
run: | | |
cmake --preset "msbuild-vcpkg" -S pulmtln -B pulmtln/build | |
- name: Building PULMTLN | |
run: | | |
cmake --build pulmtln/build/ --config Release | |
# - name: Configuring and building PULMTLN | |
# uses: lukka/run-cmake@v10 | |
# id: runcmake | |
# with: | |
# cmakeListsTxtPath: '${{ github.workspace }}/pulmtln/CMakeLists.txt' | |
# configurePreset: 'msbuild-vcpkg' | |
# configurePresetAdditionalArgs: '[`-DCMAKE_PREFIX_PATH=../mfem`]' | |
# buildPreset: 'msbuild-vcpkg' | |
# buildPresetAdditionalArgs: '[`--config Release`]' | |
- name: test PULMTLN | |
run: cd pulmtln && build/bin/Release/pulmtln_tests.exe | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Create dist folder | |
shell: bash | |
run: | | |
${{ env.PULMTLN_TOP_DIR }}/.github/workflows/create-dist.bat | |
- name: Create .tar file | |
run: | | |
tar -czvf pulmtln-windows.tar.gz dist/* | |
- name: Generating release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest-windows-pulmtln" | |
prerelease: false | |
title: "${{ steps.date.outputs.date }} Windows Pulmtln" | |
files: | | |
pulmtln-windows.tar.gz |