Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8b0705d
Enable windows runner, install some dependencies with vcpkg
publixsubfan Apr 13, 2022
b521679
Make cmake config work on windows
publixsubfan Apr 13, 2022
f0b0850
Switch to msmpi instead of openmpi
publixsubfan Apr 13, 2022
bc1735b
Disable MPI entirely for windows
publixsubfan Apr 13, 2022
871a7eb
Don't deal with hypre or metis if we aren't building with mpi support
publixsubfan Apr 14, 2022
00aa33a
Use my gh actions branch
publixsubfan Apr 14, 2022
6f4d511
Run cmake build script in bash
publixsubfan Apr 14, 2022
e9e25fc
Add an initial vcpkg manifest
publixsubfan Apr 14, 2022
7613f1b
Use binary cache for vcpkg dependencies
publixsubfan Apr 14, 2022
1486db3
Fix vcpkg cache path
publixsubfan Apr 14, 2022
eedcf54
Fix vcpkg cache path again
publixsubfan Apr 14, 2022
3d298df
Fix vcpkg cache path again
publixsubfan Apr 14, 2022
c0dc35f
Fix for windows build
publixsubfan Apr 14, 2022
7584229
Fix mkdir command
publixsubfan Apr 14, 2022
b128271
Disable screenshot tarballing for windows
publixsubfan Apr 14, 2022
af66160
Add a release gh actions workflow
publixsubfan Apr 15, 2022
60416e5
Fix release workflow name
publixsubfan Apr 15, 2022
79205e6
Fix release workflow name
publixsubfan Apr 15, 2022
5dbc14c
Trying to fix cache and mkdir interaction
publixsubfan Apr 15, 2022
e02a6b5
Trying to run release actions
publixsubfan Apr 15, 2022
71eab1f
Upload executable after build
publixsubfan Apr 15, 2022
0442903
Fix
publixsubfan Apr 15, 2022
df1ac2d
Fix dependencies for macos app bundle
publixsubfan Apr 19, 2022
0daf537
Fix for multi-config CI builds on windows
publixsubfan Apr 19, 2022
96c667c
Use release build mode instead of relwithdebinfo
publixsubfan Apr 19, 2022
a6cb758
Use recursive option when zipping mac app bundle
publixsubfan Apr 19, 2022
e0e1766
Trying to fix windows release script
publixsubfan Apr 19, 2022
45f908d
Fix windows release path again
publixsubfan Apr 19, 2022
84f9f62
Fix windows release path again
publixsubfan Apr 20, 2022
80c2490
Don't use 7zip
publixsubfan Apr 20, 2022
7cd6a4f
Fix for using env vars in powershell
publixsubfan Apr 20, 2022
e0ac403
Fix windows release path again
publixsubfan Apr 20, 2022
104d4b6
Use windows-ci-dev branch on mfem
publixsubfan Apr 20, 2022
b1625a2
Don't double-zip produced executables
publixsubfan Apr 28, 2022
1ff38d1
Use forked mfem actions
publixsubfan Apr 28, 2022
9688dab
Fix copy command for mac bundle
publixsubfan Apr 28, 2022
d6cf919
Switch to mfem/github-actions@v2.2 actions
publixsubfan May 18, 2022
c77faef
Fix shadowing errors in renderer code
publixsubfan May 18, 2022
1cb0f91
Fix shadowing errors related to mfem globals
publixsubfan May 18, 2022
db7b147
Fix shadowing errors in sdl_main
publixsubfan May 18, 2022
5cf249a
Remove forward declaration of loop variables causing shadowing errors
publixsubfan May 18, 2022
a4ca7e7
Fix shadowing errors in glvis.cpp
publixsubfan May 18, 2022
acaeb3b
Fix shadowing of member level/levels variables in vssolution
publixsubfan May 18, 2022
7f18a35
Scope bounding box variables to avoid shadowing errors
publixsubfan May 18, 2022
ec761bd
Switch back to mainline mfem
publixsubfan May 18, 2022
ddfce41
Disable release on this branch
publixsubfan May 18, 2022
eea9336
Update vcpkg.json
publixsubfan May 19, 2022
49be444
Allow manual dispatch of action workflows
publixsubfan May 19, 2022
1707ee3
Remove ubuntu release build for now
publixsubfan May 19, 2022
817f97d
Trying to fix mac app packaging
publixsubfan May 19, 2022
4af0555
Use cmake-native capabilities to build a relocatable mac app bundle
publixsubfan May 19, 2022
829cd19
Fixes to macos release script
publixsubfan May 19, 2022
91b933c
Fix install prefix path
publixsubfan May 19, 2022
7cfe061
Fix hdiutil command
publixsubfan May 19, 2022
2b85d3e
Updated CHANGELOG
tzanio May 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 39 additions & 16 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
branches:
- master
pull_request:
workflow_dispatch:

env:
HYPRE_ARCHIVE: v2.19.0.tar.gz
Expand All @@ -31,7 +32,7 @@ jobs:
builds-and-tests:
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
os: [ubuntu-20.04, macos-10.15, windows-2022]
target: [dbg, opt]
mpi: [seq]
build-system: [cmake]
Expand All @@ -58,18 +59,18 @@ jobs:

steps:
- name: get MPI (Linux)
if: matrix.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-20.04' && matrix.mpi == 'par'
run: |
sudo apt-get update
sudo apt-get install mpich libmpich-dev
export MAKE_CXX_FLAG="MPICXX=mpic++"

- name: Set up Homebrew
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' && matrix.mpi == 'par'
uses: Homebrew/actions/setup-homebrew@master

- name: get MPI (MacOS)
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' && matrix.mpi == 'par'
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew install openmpi
Expand All @@ -78,38 +79,42 @@ jobs:
# Get Hypre through cache, or build it.
# Install will only run on cache miss.
- name: cache hypre
if: matrix.mpi == 'par'
id: hypre-cache
uses: actions/cache@v2
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2.2

- name: build hypre
if: steps.hypre-cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-hypre@v2.0
if: steps.hypre-cache.outputs.cache-hit != 'true' && matrix.mpi == 'par'
uses: mfem/github-actions/build-hypre@v2.2
with:
archive: ${{ env.HYPRE_ARCHIVE }}
dir: ${{ env.HYPRE_TOP_DIR }}
build-system: make

# Get Metis through cache, or build it.
# Install will only run on cache miss.
- name: cache metis
if: matrix.mpi == 'par'
id: metis-cache
uses: actions/cache@v2
with:
path: ${{ env.METIS_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2.2

- name: build metis
if: steps.metis-cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-metis@v2.0
if: steps.metis-cache.outputs.cache-hit != 'true' && matrix.mpi == 'par'
uses: mfem/github-actions/build-metis@v2.2
with:
archive: ${{ env.METIS_ARCHIVE }}
dir: ${{ env.METIS_TOP_DIR }}

# make generic links to libraries for MFEM install
# Those links are already created by build-mfem action, but not when the cache is used...
- name: configure links
if: matrix.mpi == 'par'
run: |
echo "Hypre symlink:"
ln -s $HYPRE_TOP_DIR hypre;
Expand All @@ -127,7 +132,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.MFEM_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.MFEM_TOP_DIR }}-${{ env.MFEM_COMMIT }}-${{ matrix.target }}-${{ matrix.build-system}}-v1
key: ${{ runner.os }}-build-${{ env.MFEM_TOP_DIR }}-${{ env.MFEM_COMMIT }}-${{ matrix.target }}-${{ matrix.build-system}}-v2.2

# We are using the defaults of the MFEM action here, which is to use master
# branch. There is an implicit assumption here that mfem master hasn't
Expand All @@ -136,7 +141,7 @@ jobs:
# superfluous.
- name: build mfem
if: steps.cache-mfem.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-mfem@v2.0
uses: mfem/github-actions/build-mfem@v2.2
with:
os: ${{ matrix.os }}
target: ${{ matrix.target }}
Expand Down Expand Up @@ -167,6 +172,18 @@ jobs:
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew install fontconfig freetype sdl2 glew glm libpng

- name: cache deps (Windows)
id: cache-deps
uses: actions/cache@v3
with:
path: vcpkg_cache
key: ${{ runner.os }}-vcpkg-v1

- name: prepare binary cache location
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
mkdir -p vcpkg_cache

- name: checkout GLVis
uses: actions/checkout@v2
with:
Expand All @@ -182,17 +199,23 @@ jobs:

- name: build GLVis (cmake)
if: matrix.build-system == 'cmake'
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg_cache
run: |
build_type="RelWithDebInfo"
build_type="Release"
[[ ${{ matrix.target }} == "dbg" ]] && build_type="Debug";
[[ ${{ matrix.os }} == "windows-2022" ]] \
&& toolchain_file="${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake"
cd glvis && mkdir build && cd build
cmake \
-D CMAKE_TOOLCHAIN_FILE:STRING=${toolchain_file} \
-D CMAKE_BUILD_TYPE:STRING=${build_type} \
-D ENABLE_TESTS:BOOL=TRUE \
-D mfem_DIR:PATH=${GITHUB_WORKSPACE}/${MFEM_TOP_DIR}/build \
-D GLVIS_BASELINE_SYS=${{ matrix.os }} \
..
make -j3
cmake --build . --parallel 3 --config "${build_type}"
shell: bash

- name: setup Python
if: matrix.build-system == 'cmake'
Expand Down Expand Up @@ -225,13 +248,13 @@ jobs:
ctest --verbose

- name: create screenshot tarball
if: always() && matrix.build-system == 'cmake'
if: always() && matrix.build-system == 'cmake' && matrix.os != 'windows-2022'
run: |
cd glvis && cd build
tar czvf test_screenshots.tar.gz tests/test.*.png

- name: upload test screenshots
if: always() && matrix.build-system == 'cmake'
if: always() && matrix.build-system == 'cmake' && matrix.os != 'windows-2022'
uses: actions/upload-artifact@v2
with:
name: test-screenshots-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.mpi }}
Expand Down
232 changes: 232 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-443271.
#
# This file is part of the GLVis visualization tool and library. For more
# information and source code availability see https://glvis.org.
#
# GLVis is free software; you can redistribute it and/or modify it under the
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.

# GLVis - an OpenGL visualization server based on the MFEM library

name: release

on:
push:
tags:
- v*
branches:
- master
- windows-ci-dev #TODO: remove before merge
workflow_dispatch:

env:
HYPRE_ARCHIVE: v2.19.0.tar.gz
HYPRE_TOP_DIR: hypre-2.19.0
METIS_ARCHIVE: metis-4.0.3.tar.gz
METIS_TOP_DIR: metis-4.0.3
MFEM_TOP_DIR: mfem
MFEM_BRANCH: master

jobs:
release-builds:
strategy:
matrix:
os: [macos-10.15, windows-2022]
target: [opt]
mpi: [seq]
build-system: [cmake]
name: ${{ matrix.os }}-${{ matrix.build-system }}-${{ matrix.target }}-${{ matrix.mpi }}

runs-on: ${{ matrix.os }}

steps:
- name: get MPI (Linux)
if: matrix.os == 'ubuntu-20.04' && matrix.mpi == 'par'
run: |
sudo apt-get update
sudo apt-get install mpich libmpich-dev
export MAKE_CXX_FLAG="MPICXX=mpic++"

- name: Set up Homebrew
if: matrix.os == 'macos-10.15' && matrix.mpi == 'par'
uses: Homebrew/actions/setup-homebrew@master

- name: get MPI (MacOS)
if: matrix.os == 'macos-10.15' && matrix.mpi == 'par'
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew install openmpi
export MAKE_CXX_FLAG="MPICXX=mpic++"

# Get Hypre through cache, or build it.
# Install will only run on cache miss.
- name: cache hypre
if: matrix.mpi == 'par'
id: hypre-cache
uses: actions/cache@v2
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2.2

- name: build hypre
if: steps.hypre-cache.outputs.cache-hit != 'true' && matrix.mpi == 'par'
uses: mfem/github-actions/build-hypre@v2.2
with:
archive: ${{ env.HYPRE_ARCHIVE }}
dir: ${{ env.HYPRE_TOP_DIR }}
build-system: make

# Get Metis through cache, or build it.
# Install will only run on cache miss.
- name: cache metis
if: matrix.mpi == 'par'
id: metis-cache
uses: actions/cache@v2
with:
path: ${{ env.METIS_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2.2

- name: build metis
if: steps.metis-cache.outputs.cache-hit != 'true' && matrix.mpi == 'par'
uses: mfem/github-actions/build-metis@v2.2
with:
archive: ${{ env.METIS_ARCHIVE }}
dir: ${{ env.METIS_TOP_DIR }}

# make generic links to libraries for MFEM install
# Those links are already created by build-mfem action, but not when the cache is used...
- name: configure links
if: matrix.mpi == 'par'
run: |
echo "Hypre symlink:"
ln -s $HYPRE_TOP_DIR hypre;
echo "Metis symlink:"
ln -s $METIS_TOP_DIR metis-4.0;

- name: MFEM ${{ env.MFEM_BRANCH }} commit
run: |
echo "MFEM_COMMIT=$(git ls-remote --heads https://github.com/mfem/mfem.git ${MFEM_BRANCH} | awk '{print $1;}')" >> $GITHUB_ENV

# Get MFEM through cache, or build it.
# Install will only run on cache miss.
- name: cache mfem
id: cache-mfem
uses: actions/cache@v2
with:
path: ${{ env.MFEM_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.MFEM_TOP_DIR }}-${{ env.MFEM_COMMIT }}-${{ matrix.target }}-${{ matrix.build-system}}-v2.2

# We are using the defaults of the MFEM action here, which is to use master
# branch. There is an implicit assumption here that mfem master hasn't
# changed since the 'MFEM master commit' step.
# Also, if we apply to MFEM build the same target as GLVis. This may be
# superfluous.
- name: build mfem
if: steps.cache-mfem.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-mfem@v2.2
with:
os: ${{ matrix.os }}
target: ${{ matrix.target }}
hypre-dir: ${{ env.HYPRE_TOP_DIR }}
metis-dir: ${{ env.METIS_TOP_DIR }}
mfem-dir: ${{ env.MFEM_TOP_DIR }}
mfem-branch: ${{ env.MFEM_BRANCH }}
build-system: ${{ matrix.build-system }}
mpi: ${{ matrix.mpi }}

# Install GLVis dependencies with package manager
- name: get deps (Linux)
if: matrix.os == 'ubuntu-20.04'
run: |
# We need to add a PPA for SDL 2.0.14 - fixes some initialization
# errors for X11
sudo add-apt-repository -y ppa:savoury1/multimedia
sudo apt-get update
sudo apt-get install libfontconfig1-dev libfreetype6-dev libsdl2-dev libglew-dev libglm-dev libpng-dev

- name: Set up Homebrew
if: matrix.os == 'macos-10.15'
uses: Homebrew/actions/setup-homebrew@master

- name: get deps (MacOS)
if: matrix.os == 'macos-10.15'
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew install fontconfig freetype sdl2 glew glm libpng

- name: cache deps (Windows)
id: cache-deps
uses: actions/cache@v3
with:
path: vcpkg_cache
key: ${{ runner.os }}-vcpkg-v1

- name: prepare binary cache location
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
mkdir -p vcpkg_cache

- name: checkout GLVis
uses: actions/checkout@v2
with:
path: glvis
submodules: recursive

- name: build GLVis (cmake)
if: matrix.build-system == 'cmake'
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg_cache
run: |
build_type="Release"
[[ ${{ matrix.os }} == "windows-2022" ]] \
&& toolchain_file="${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake"
cd glvis && mkdir build && cd build
cmake \
-D CMAKE_TOOLCHAIN_FILE:STRING=${toolchain_file} \
-D CMAKE_BUILD_TYPE:STRING=${build_type} \
-D ENABLE_TESTS:BOOL=TRUE \
-D mfem_DIR:PATH=${GITHUB_WORKSPACE}/${MFEM_TOP_DIR}/build \
-D GLVIS_BASELINE_SYS=${{ matrix.os }} \
-D CMAKE_INSTALL_PREFIX=../install-${{ matrix.os }} \
..
cmake --build . --parallel 3 --config "${build_type}"
shell: bash

- name: package binary (Windows)
if: matrix.os == 'windows-2022'
env:
GLVIS_EXPORT_NAME: glvis-${{ github.ref_name }}-${{ runner.os }}-amd64
Copy link
Copy Markdown
Member

@tzanio tzanio May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to automatically get a link to or somehow publish the binaries?

A link will be useful for https://glvis.org, publishing could be OK for https://github.com/GLVis/glvis (e.g. similar to the Docker package on the right of https://github.com/mfem/mfem)

run: |
cd glvis/build
Copy-Item -Path "Release" -Destination "${Env:GLVIS_EXPORT_NAME}" -Recurse

- name: package binary (Mac)
if: matrix.os == 'macos-10.15'
env:
GLVIS_EXPORT_NAME: glvis-${{ github.ref_name }}-${{ runner.os }}-amd64
run: |
cd glvis/build
make app
# Creates the actual relocatable bundle (copying system libraries)
sudo make install
# Fix permissions from running `make install` as root
cd ../install-${{ matrix.os }}
sudo chown -R ${USER} GLVis.app
# Go back to build directory
cd ../build
# Copy executable to a temporary directory
mkdir dmg_tmp
cp -a ../install-${{ matrix.os }}/GLVis.app dmg_tmp/GLVis.app
# Create DMG since actions/upload-artifact will clobber Unix permissions
hdiutil create -volname "GLVis macOS x86_64" -srcfolder dmg_tmp -ov -format UDZO GLVis.dmg
mkdir ${GLVIS_EXPORT_NAME}
cp GLVis.dmg ${GLVIS_EXPORT_NAME}

- name: upload binary
uses: actions/upload-artifact@v2
with:
name: glvis-${{ github.ref_name }}-${{ runner.os }}-amd64
path: glvis/build/glvis-${{ github.ref_name }}-${{ runner.os }}-amd64
Loading