Skip to content

Fix VTK 9 API changes that were causing compilation errors #11

Fix VTK 9 API changes that were causing compilation errors

Fix VTK 9 API changes that were causing compilation errors #11

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-ubuntu-18:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
shell: bash
run: |
sudo apt-get install openmpi-bin libopenmpi-dev libglu1-mesa-dev libxt-dev libxi-dev libglew-dev libxmu-dev zip
- name: Build
shell: bash
run: |
mkdir Build
cd Build
cmake ..
make -j2
- name: Create installer
shell: bash
run: |
cd Build/svSolver-build
cmake . -DSV_ENABLE_DISTRIBUTION=ON
cpack
cp svsolver*.deb ../../svSolver-Ubuntu-18.deb
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Ubuntu 18 Installer
path: svSolver-Ubuntu-18.deb
if-no-files-found: error
- name: Upload release asset
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: svSolver-Ubuntu-18.deb
asset_name: svSolver-${{github.ref_name}}-Ubuntu-18.deb
tag: ${{ github.ref }}
build-ubuntu-20:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
shell: bash
run: |
sudo apt-get install gcc-8 g++-8 libvtk7-dev openmpi-bin libopenmpi-dev libglu1-mesa-dev libxt-dev libxi-dev libglew-dev libxmu-dev zip
- name: Build
shell: bash
run: |
export CC=/usr/bin/gcc-8
export CXX=/usr/bin/g++-8
mkdir Build
cd Build
cmake .. -DSV_USE_LOCAL_VTK=ON
make -j2
- name: Create installer
shell: bash
run: |
cd Build/svSolver-build
cmake . -DSV_ENABLE_DISTRIBUTION=ON
cpack
cp svsolver*.deb ../../svSolver-Ubuntu-20.deb
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Ubuntu 20 Installer
path: svSolver-Ubuntu-20.deb
if-no-files-found: error
- name: Upload release asset
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: svSolver-Ubuntu-20.deb
asset_name: svSolver-${{github.ref_name}}-Ubuntu-20.deb
tag: ${{ github.ref }}
build-macos-big-sur:
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
shell: bash
run: |
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib
gfortran --version
brew install open-mpi
- name: Build
shell: bash
run: |
export TERM=xterm-256color
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
mkdir Build
cd Build
cmake ..
make -j3
- name: Create installer
shell: bash
run: |
cd Build/svSolver-build
cmake . -DSV_ENABLE_DISTRIBUTION=ON
make
cpack
cp svsolver*.pkg ../../svSolver-macOS-BigSur.pkg
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: macOS BigSur Installer
path: svSolver-macOS-BigSur.pkg
if-no-files-found: error
- name: Upload release asset
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: svSolver-macOS-BigSur.pkg
asset_name: svSolver-${{github.ref_name}}-macOS-BigSur.pkg
tag: ${{ github.ref }}