Fix/update #94
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: Build VisualNeuro | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: write # Enable vcpkg to write to the dependency graph | |
env: | |
VCPKG_INSTALL_OPTIONS: "--clean-after-build;--x-abi-tools-use-exact-versions" | |
VCPKG_CACHE_TOKEN: ${{ secrets.VCPKG_CACHE_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VCPKG_FEATURE_FLAGS: dependencygraph | |
jobs: | |
build: | |
name: "Build" | |
strategy: | |
matrix: | |
system: [windows, macos, linux] | |
linkage: [dynamic] | |
cmake_linkage: ['ON'] | |
configuration: [Release] | |
include: | |
- system: windows | |
os: 'windows-latest' | |
triplet: 'x64-windows' | |
cmake: '-DIVW_MODULE_HDF5=OFF' | |
preset: msvc-visualneuro | |
targets: 'ALL_BUILD' | |
installer: 'visualneuro-installer-win' | |
artifact: 'build/VisualNeuroApp-v*.exe' | |
- system: macos | |
os: 'macos-13' # for now macos-latest == macos-12 since macos-13 is still "beta" | |
triplet: 'x64-osx' | |
cmake: '-DVCPKG_APPLOCAL_DEPS=OFF' | |
preset: ninja-visualneuro | |
targets: 'all' | |
installer: 'visualneuro-installer-macos' | |
artifact: 'build/VisualNeuroApp-v*.dmg' | |
- system: linux | |
os: 'ubuntu-24.04' | |
triplet: 'x64-linux' | |
cmake: '-DIVW_PACKAGE_INSTALLER=OFF' | |
preset: ninja-visualneuro | |
targets: 'all' | |
installer: 'visualneuro-installer-ubuntu' | |
artifact: 'build/VisualNeuroApp-v*.tar.gz' | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 360 | |
steps: | |
- name: "Clone Inviwo" | |
uses: actions/checkout@v4 | |
with: | |
repository: 'inviwo/inviwo' | |
ref: '038e36a17217126d755a563b8c4bfa64daab74cd' | |
path: 'inviwo' | |
submodules: false | |
- name: "Clone VisualNeuro" | |
uses: actions/checkout@v4 | |
with: | |
path: visualneuro | |
submodules: false | |
- name: Install dependencies | |
uses: ./inviwo/.github/actions/install-dependencies | |
- name: Configure build environment | |
uses: ./inviwo/.github/actions/configure-build-env | |
with: | |
triplet: ${{ matrix.triplet }} | |
configuration: ${{ matrix.configuration }} | |
- name: "Copy CMakePresets to Inviwo" | |
shell: bash | |
run: > | |
cp "visualneuro/CMakePresets.json" "inviwo/CMakeUserPresets.json" | |
- name: "Configure CMake" | |
shell: bash | |
run: > | |
cmake -S inviwo -B build --preset ${{ matrix.preset }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.configuration }} | |
- name: "Build" | |
timeout-minutes: 360 | |
shell: bash | |
run: cmake --build build --config ${{ matrix.configuration }} --parallel --target ${{ matrix.targets }} | |
- name: "Package" | |
timeout-minutes: 120 | |
if: ( matrix.system == 'windows' || matrix.system == 'linux') && matrix.linkage == 'dynamic' && matrix.configuration == 'Release' | |
shell: bash | |
run: | | |
cmake --build build --config ${{ matrix.configuration }} --verbose --parallel --target package | |
- name: "Upload installer" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.installer }} | |
path: ${{ matrix.artifact }} | |