Feature/astrophysics #233
Workflow file for this run
This file contains hidden or 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 Inviwo Modules" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
| required: false | |
| default: false | |
| inviwo_ref: | |
| type: string | |
| description: 'Branch/tag/SHA to use for the inviwo/inviwo checkout (default: master). Can also be set in the PR body using /inviwo-ref <ref>' | |
| required: false | |
| default: 'master' | |
| permissions: | |
| contents: write # Enable vcpkg to write to the dependency graph | |
| env: | |
| VCPKG_CACHE_TOKEN: ${{ secrets.VCPKG_CACHE_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_NODIRECT: true | |
| CCACHE_NODEPEND: true | |
| # Information about the github runners can be found here | |
| # https://github.com/actions/runner-images | |
| jobs: | |
| build: | |
| name: "Build" | |
| permissions: | |
| actions: write # Allow the job to delete caches (https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps?apiVersion=2022-11-28#repository-permissions-for-actions) | |
| strategy: | |
| matrix: | |
| system: [windows, macos, linux] | |
| linkage: [dynamic, static] | |
| configuration: [Release, Debug] | |
| include: | |
| - system: windows | |
| os: 'windows-2022' | |
| targets: 'ALL_BUILD' | |
| installer: 'inviwo-installer-win' | |
| artifact: 'build/inviwo-v*.exe' | |
| run: | | |
| ./Release/inviwo-cli.exe --logconsole --quit | |
| if [ $? -nq 0 ] | |
| then | |
| C:/'Program Files (x86)'/'Windows Kits'/10/Debuggers/x64/gflags.exe /i ./Release/inviwo-cli.exe +sls | |
| C:/'Program Files (x86)'/'Windows Kits'/10/Debuggers/x64/cdb.exe -g -c q ./Release/inviwo-cli.exe | |
| fi | |
| - system: macos | |
| os: 'macos-15' | |
| targets: 'ALL_BUILD' | |
| installer: 'inviwo-installer-macos' | |
| artifact: 'build/inviwo-v*.dmg' | |
| - system: linux | |
| os: 'ubuntu-24.04' | |
| targets: 'all' | |
| installer: 'inviwo-installer-linux' | |
| artifact: 'build/inviwo-v*.AppImage' | |
| run: QT_QPA_PLATFORM=offscreen ./inviwo --logconsole --quit | |
| # set triplets | |
| - system: 'windows' | |
| linkage: 'dynamic' | |
| triplet: 'x64-windows' | |
| - system: 'windows' | |
| linkage: 'static' | |
| triplet: 'x64-windows-static-md' | |
| - system: 'macos' | |
| linkage: 'dynamic' | |
| triplet: 'arm64-osx-dynamic' | |
| - system: 'macos' | |
| linkage: 'static' | |
| triplet: 'arm64-osx' | |
| - system: 'linux' | |
| linkage: 'dynamic' | |
| triplet: 'x64-linux-dynamic' | |
| - system: 'linux' | |
| linkage: 'static' | |
| triplet: 'x64-linux' | |
| # Run | |
| - system: 'macos' | |
| configuration: Release | |
| run: './Release/inviwo.app/Contents/MacOS/inviwo --logconsole --quit' | |
| - system: 'macos' | |
| configuration: Debug | |
| run: './Debug/inviwo.app/Contents/MacOS/inviwo --logconsole --quit' | |
| # Extra targets | |
| - system: 'windows' | |
| linkage: 'dynamic' | |
| configuration: Release | |
| targets: 'ALL_BUILD package DOXY-Inviwo DOXY-Python' | |
| - system: 'macos' | |
| linkage: 'dynamic' | |
| configuration: Release | |
| targets: 'ALL_BUILD package' | |
| - system: 'linux' | |
| linkage: 'dynamic' | |
| configuration: Release | |
| targets: 'all package' | |
| exclude: | |
| # Windows debug build are to big, they run out of diskspace | |
| - system: windows | |
| configuration: Debug | |
| # This build fails very close to the end with "ninja: build stopped: interrupted by user." | |
| - system: linux | |
| linkage: static | |
| configuration: Debug | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 360 | |
| steps: | |
| - name: "Read Inviwo Branch" | |
| id: inviwo_ref | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| if [ -n "$PR_NUMBER" ]; then | |
| PR_BODY=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.body // empty') | |
| else | |
| PR_BODY="" | |
| fi | |
| REF=$(echo "$PR_BODY" | grep -oE '/inviwo-ref \S+' | sed 's|/inviwo-ref ||' | head -1) || true | |
| if [ -z "$REF" ]; then | |
| REF="${{ inputs.inviwo_ref || 'master' }}" | |
| fi | |
| echo "ref=${REF}" >> $GITHUB_OUTPUT | |
| - name: Free Disk Space | |
| if: matrix.system == 'linux' | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: false | |
| docker-images: true | |
| swap-storage: true | |
| - name: "Clone Modules" | |
| uses: actions/checkout@v6 | |
| with: | |
| path: modules | |
| submodules: false | |
| - name: "Clone Inviwo" | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: inviwo/inviwo | |
| ref: ${{ steps.inviwo_ref.outputs.ref }} | |
| path: inviwo | |
| submodules: false | |
| - name: Install dependencies | |
| uses: ./inviwo/.github/actions/install-dependencies | |
| - name: "Brew Install" | |
| shell: bash | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install bison | |
| - name: Configure build environment | |
| uses: ./inviwo/.github/actions/configure-build-env | |
| with: | |
| triplet: ${{ matrix.triplet }} | |
| configuration: ${{ matrix.configuration }} | |
| gh-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Copy Preset | |
| shell: bash | |
| run: cp modules/.github/presets/${{ matrix.system }}.json inviwo/CMakeUserPresets.json | |
| - name: "Configure CMake" | |
| shell: bash | |
| run: > | |
| cmake -S inviwo -B build --preset gha-${{ matrix.linkage }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} | |
| - name: "Build" | |
| timeout-minutes: 360 | |
| shell: bash | |
| run: | | |
| echo "::add-matcher::inviwo/.github/matchers/${{ matrix.system }}.json" | |
| cmake --build build --config ${{ matrix.configuration }} --parallel --target ${{ matrix.targets }} | |
| echo "::remove-matcher owner=compiler::" | |
| echo "::remove-matcher owner=linker::" | |
| - name: "Run" | |
| shell: bash | |
| working-directory: "build/bin" | |
| run: ${{ matrix.run }} | |
| - name: "Unittests" | |
| shell: bash | |
| working-directory: "build" | |
| run: ctest -C ${{ matrix.configuration }} --output-on-failure | |
| - name: "Upload installer" | |
| if: matrix.linkage == 'dynamic' && matrix.configuration == 'Release' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ matrix.installer }} | |
| path: ${{ matrix.artifact }} | |
| - name: "Upload doxygen" | |
| if: matrix.system == 'windows' && matrix.linkage == 'dynamic' && matrix.configuration == 'Release' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: inviwo-cpp-api | |
| path: build/docs/inviwo/html/* | |
| - name: "Upload shpinx" | |
| if: matrix.system == 'windows' && matrix.linkage == 'dynamic' && matrix.configuration == 'Release' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: inviwo-python-api | |
| path: build/docs/python-api/* | |
| - name: "Upload ccache-logs" | |
| if: "${{ contains( github.event.pull_request.labels.*.name, 'CI: Cache Debug') }}" | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ccache-log-${{ matrix.system }}-${{ matrix.linkage }}-${{ matrix.configuration }} | |
| path: ccache-debug/* | |
| - name: "Upload Vcpkg build Logs" | |
| if: "${{ failure() }}" | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vcpkg-logs-${{ matrix.system }}-${{ matrix.linkage }}-${{ matrix.configuration }} | |
| path: vcpkg/buildtrees/**/*.log | |
| - name: "Setup tmate session" | |
| if: "${{ failure() && ((github.event_name == 'workflow_dispatch' && inputs.debug_enabled) || contains( github.event.pull_request.labels.*.name, 'CI: Debug')) }}" | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true | |
| regression: | |
| name: "Regression" | |
| runs-on: [regression, macOS] | |
| permissions: | |
| pull-requests: write | |
| timeout-minutes: 320 | |
| steps: | |
| - name: "Read Inviwo Branch" | |
| id: inviwo_ref | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| if [ -n "$PR_NUMBER" ]; then | |
| PR_BODY=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.body // empty') | |
| else | |
| PR_BODY="" | |
| fi | |
| REF=$(echo "$PR_BODY" | grep -oE '/inviwo-ref \S+' | sed 's|/inviwo-ref ||' | head -1) || true | |
| if [ -z "$REF" ]; then | |
| REF="${{ inputs.inviwo_ref || 'master' }}" | |
| fi | |
| echo "ref=${REF}" >> $GITHUB_OUTPUT | |
| - name: "Clone Modules" | |
| uses: actions/checkout@v6 | |
| with: | |
| path: modules | |
| - name: "Clone Inviwo" | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: inviwo/inviwo | |
| ref: ${{ steps.inviwo_ref.outputs.ref }} | |
| path: inviwo | |
| - name: "Get Vcpkg SHA" | |
| shell: bash | |
| run: | | |
| SHA=`jq -r '.["vcpkg-configuration"].["default-registry"].baseline' inviwo/vcpkg.json` | |
| echo "VCPKG_SHA=${SHA}" >> $GITHUB_ENV | |
| - name: "VCPKG Update" | |
| shell: bash | |
| run: | | |
| cd $VCPKG_INSTALLATION_ROOT | |
| git fetch | |
| git checkout $VCPKG_SHA | |
| ./bootstrap-vcpkg.sh | |
| - name: Copy Preset | |
| shell: bash | |
| run: cp modules/.github/presets/macos.json inviwo/CMakeUserPresets.json | |
| - name: "Configure CMake" | |
| shell: bash | |
| run: > | |
| VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT && cmake -S inviwo -B build --preset gha-dynamic --fresh | |
| --toolchain $VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake | |
| -DCMAKE_CXX_FLAGS='-stdlib=libc++' | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| -DIVW_MODULE_TETRAMESH=OFF | |
| - name: "Build" | |
| timeout-minutes: 360 | |
| shell: bash | |
| run: | | |
| echo "::add-matcher::inviwo/.github/matchers/macos.json" | |
| cmake --build build --config RelWithDebInfo --parallel --target ALL_BUILD | |
| echo "::remove-matcher owner=compiler::" | |
| echo "::remove-matcher owner=linker::" | |
| - name: "Unit Tests" | |
| id: unit_tests | |
| continue-on-error: true | |
| shell: bash | |
| working-directory: "build" | |
| run: ctest -C RelWithDebInfo --output-on-failure | |
| - name: "Integration Tests" | |
| id: integration | |
| continue-on-error: true | |
| shell: bash | |
| working-directory: "build/bin/RelWithDebInfo" | |
| run: ./inviwo-integrationtests | |
| - name: "Clone Regression" | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: inviwo/regression | |
| ref: main | |
| token: ${{ secrets.INVIWO_TEAM_SECRET }} | |
| path: regression | |
| - name: "Regression Tests" | |
| id: regression | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| mkdir -p regression/modules/macos/${{ github.ref }} | |
| python3 inviwo/tools/regression.py \ | |
| --config build/pyconfig.ini \ | |
| --build_type RelWithDebInfo \ | |
| --output regression/modules/macos/${{ github.ref }} \ | |
| --summary | |
| - name: Push report | |
| shell: bash | |
| run: | | |
| cd regression | |
| git config --global user.name 'Inviwo-Team' | |
| git config --global user.email 'team@inviwo.org' | |
| git add . | |
| git commit -am "Regression report for macos ${{ github.ref }}" | |
| git pull --rebase=true origin --verbose || { echo "Report Git Conflict! Aborting." >> $GITHUB_STEP_SUMMARY; exit 1; } | |
| git push | |
| echo "### :chart_with_upwards_trend: Regression report at https://inviwo.org/regression/modules/macos/${{ github.ref }}/report.html " >> $GITHUB_STEP_SUMMARY | |
| - name: Summary | |
| if: "${{ github.ref != 'refs/heads/master' }}" | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| NUMBER: ${{ github.event.pull_request.number }} | |
| UNIT_TESTS: "${{ steps.unit_tests.outcome }}" | |
| INTEGRATION: ${{ steps.integration.outcome }} | |
| REGRESSION: ${{ steps.regression.outcome }} | |
| run: | | |
| if [[ ${UNIT_TESTS} == "failure" ]] | |
| then | |
| gh pr edit "$NUMBER" --add-label "J: Unit Test Failure" || echo "Warning: could not add unit test label" | |
| echo "### :bug: Unit Test Failure:bangbang:" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [[ ${UNIT_TESTS} == "success" ]] | |
| then | |
| gh pr edit "$NUMBER" --remove-label "J: Unit Test Failure" || true | |
| fi | |
| if [[ ${INTEGRATION} == "failure" ]] | |
| then | |
| gh pr edit "$NUMBER" --add-label "J: Integration Test Failure" || echo "Warning: could not add integration label" | |
| echo "### :bug: Integration Test Failure:bangbang:" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [[ ${INTEGRATION} == "success" ]] | |
| then | |
| gh pr edit "$NUMBER" --remove-label "J: Integration Test Failure" || true | |
| fi | |
| if [[ ${REGRESSION} == "failure" ]] | |
| then | |
| gh pr edit "$NUMBER" --add-label "J: Regression Test Failure" || echo "Warning: could not add regression label" | |
| echo "### :beetle: Regression Test Failure:bangbang:" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [[ ${REGRESSION} == "success" ]] | |
| then | |
| gh pr edit "$NUMBER" --remove-label "J: Regression Test Failure" || true | |
| fi | |
| - name: Exit | |
| shell: bash | |
| env: | |
| UNIT_TESTS: ${{ steps.unit_tests.outcome }} | |
| INTEGRATION: ${{ steps.integration.outcome }} | |
| REGRESSION: ${{ steps.regression.outcome }} | |
| run: | | |
| echo "Unit Tests: ${UNIT_TESTS}, Integration Tests: ${INTEGRATION}, Regression Tests: ${REGRESSION}" | |
| echo "Regression report at https://inviwo.org/regression/modules/macos/${{ github.ref }}/report.html" | |
| if [[ ${UNIT_TESTS} == "success" ]] && [[ ${INTEGRATION} == "success" ]] && [[ ${REGRESSION} == "success" ]] | |
| then | |
| exit 0 | |
| else | |
| exit 1 | |
| fi | |
| clang-tidy: | |
| name: "Clang-tidy" | |
| if: github.ref != 'refs/heads/master' | |
| permissions: | |
| pull-requests: write | |
| env: | |
| LLVM_VERSION: 19 | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 320 | |
| steps: | |
| - name: "Read Inviwo Branch" | |
| id: inviwo_ref | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| if [ -n "$PR_NUMBER" ]; then | |
| PR_BODY=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.body // empty') | |
| else | |
| PR_BODY="" | |
| fi | |
| REF=$(echo "$PR_BODY" | grep -oE '/inviwo-ref \S+' | sed 's|/inviwo-ref ||' | head -1) || true | |
| if [ -z "$REF" ]; then | |
| REF="${{ inputs.inviwo_ref || 'master' }}" | |
| fi | |
| echo "ref=${REF}" >> $GITHUB_OUTPUT | |
| - name: "Clone Modules" | |
| uses: actions/checkout@v6 | |
| with: | |
| path: modules | |
| - name: "Clone Inviwo" | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: inviwo/inviwo | |
| ref: ${{ steps.inviwo_ref.outputs.ref }} | |
| path: inviwo | |
| - name: "Install dependencies" | |
| uses: ./inviwo/.github/actions/install-dependencies | |
| with: | |
| linux-compilter: clang | |
| clang-version: ${{ env.LLVM_VERSION }} | |
| - name: "Configure build environment" | |
| uses: ./inviwo/.github/actions/configure-build-env | |
| with: | |
| triplet: x64-linux-dynamic | |
| configuration: Release | |
| ccache: false | |
| - name: "Copy Preset" | |
| shell: bash | |
| run: | | |
| cp modules/.github/presets/linux.json inviwo/CMakeUserPresets.json | |
| sudo apt install --fix-missing libomp-dev | |
| - name: "Configure CMake" | |
| shell: bash | |
| run: > | |
| cmake -S inviwo -B build --preset gha-dynamic | |
| -DCMAKE_CXX_FLAGS='-stdlib=libc++' | |
| -DVCPKG_INSTALL_OPTIONS='--clean-after-build' | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| -DIVW_MODULE_WEBBROWSER=ON | |
| -DIVW_MODULE_SGCT=ON | |
| -DIVW_APP_INVIWO_DOME=ON | |
| -DVCPKG_MANIFEST_FEATURES="python;qt;sgct;graphviz;openmesh;nanovg;vtk;ttk;ezc3d" | |
| - name: "Run clang-tidy" | |
| uses: cpp-linter/cpp-linter-action@v2.16.7 | |
| id: linter | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| repo-root: inviwo | |
| database: ../build | |
| style: 'file' | |
| tidy-checks: '' | |
| version: ${{ env.LLVM_PATH }} | |
| tidy-review: true | |
| format-review: false | |
| step-summary: true | |
| no-lgtm: false | |
| lines-changed-only: true | |
| thread-comments: update | |
| file-annotations: false | |
| verbosity: debug | |
| - name: "Upload Vcpkg build Logs" | |
| if: "${{ failure() }}" | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vcpkg-logs-clang-tidy | |
| path: vcpkg/buildtrees/**/*.log | |
| - name: "Setup tmate session" | |
| if: "${{ failure() && contains(github.event.pull_request.labels.*.name, 'CI: Debug') }}" | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true | |
| test-installer-windows: | |
| name: "Test Installer Windows" | |
| needs: build | |
| runs-on: windows-latest | |
| steps: | |
| - name: "Download artifact" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: inviwo-installer-win | |
| - name: "Run Installer" | |
| shell: pwsh | |
| run: | | |
| # find the name of the installer | |
| $exe = Get-ChildItem -Name inviwo-*.exe | |
| # launch the nsis installer in "silent mode" (/S), should run without user interaction | |
| Invoke-expression "./$exe /S" | |
| # this will spawn the installer in the background so we need to wait for it to finish | |
| $proc = Get-Process | where {$_.ProcessName -like "inviwo-*"} | Select-Object -First 1 | |
| if ($proc) { | |
| Wait-Process -Id $proc.id | |
| } | |
| - name: "Run Inviwo" | |
| shell: pwsh | |
| run: | | |
| $ver = (Get-ChildItem -Name C:/"Program Files"/Inviwo/*) | |
| cd C:/'Program Files'/Inviwo/$ver/bin/ | |
| ./inviwo-cli.exe --logconsole --quit | |
| if ($LASTEXITCODE -ne 0) { | |
| C:\'Program Files (x86)'\'Windows Kits'\10\Debuggers\x64\gflags.exe /i inviwo-cli.exe +sls | |
| C:\'Program Files (x86)'\'Windows Kits'\10\Debuggers\x64\cdb.exe -g -c q inviwo-cli.exe | |
| } | |
| - name: "Setup tmate session" | |
| if: "${{ failure() && contains(github.event.pull_request.labels.*.name, 'CI: Debug') }}" | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true | |
| test-installer-macos: | |
| name: "Test Installer MacOS" | |
| needs: build | |
| runs-on: macos-latest | |
| steps: | |
| - name: "Download artifact" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: inviwo-installer-macos | |
| - name: "Run Installer" | |
| shell: bash | |
| run: | | |
| # Find the name of the installer | |
| DMG=$(ls inviwo-*.dmg) | |
| # Mount installer image | |
| hdiutil attach $DMG | |
| # Install by copying Inviwo.app to applications folder | |
| cp -R /Volumes/${DMG%%.dmg}/inviwo.app /Applications/ | |
| hdiutil detach /Volumes/${DMG%%.dmg}/ | |
| - name: "Run Inviwo" | |
| shell: bash | |
| run: | | |
| cd /Applications/inviwo.app/Contents/MacOS/ | |
| ./inviwo --logconsole --quit | |
| - name: "Setup tmate session" | |
| if: "${{ failure() && contains(github.event.pull_request.labels.*.name, 'CI: Debug') }}" | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true | |
| test-installer-linux: | |
| name: "Test Installer Linux" | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Download artifact" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: inviwo-installer-linux | |
| - name: "Install OpenGL runtime" | |
| env: | |
| LIBGL_ALWAYS_SOFTWARE: 1 | |
| GALLIUM_DRIVER: llvmpipe | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libopengl0 libgl1 libgl1-mesa-dri mesa-utils xvfb \ | |
| libxcb-cursor0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 \ | |
| libxcb-xinput0 | |
| xvfb-run glxinfo | |
| - name: "Run Inviwo" | |
| shell: bash | |
| env: | |
| QT_QPA_PLATFORM: xcb | |
| QT_DEBUG_PLUGINS: 1 | |
| LIBGL_ALWAYS_SOFTWARE: 1 | |
| GALLIUM_DRIVER: llvmpipe | |
| INVIWO_DISABLE_MODULES: webbrowser | |
| run: | | |
| app=$(ls inviwo-*.AppImage) | |
| echo ${app} | |
| chmod +x ./${app} | |
| xvfb-run ./${app} --logconsole --quit | |
| - name: "Setup tmate session" | |
| if: "${{ failure() && contains(github.event.pull_request.labels.*.name, 'CI: Debug') }}" | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true | |
| create-changelog: | |
| name: "Create Changelog" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Generate Changelog" | |
| id: changelog | |
| uses: mikepenz/release-changelog-builder-action@v6 | |
| with: | |
| toTag: ${{ github.ref }} | |
| outputFile: changelog.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "Log Changelog" | |
| shell: bash | |
| run: | | |
| echo "-- Changes --" | |
| echo "${{ steps.changelog.outputs.changelog }}" | |
| echo "-- End --" | |
| - name: "Upload Changelog" | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: changelog.md | |
| path: changelog.md | |
| update-api-docs: | |
| name: "Publish updated API Docs" | |
| if: github.ref == 'refs/heads/master' | |
| needs: [build, test-installer-windows, test-installer-macos, test-installer-linux, regression] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Clone Inviwo" | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: gh-pages | |
| path: modules | |
| submodules: false | |
| - name: "Download python-api" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: inviwo-python-api | |
| path: modules/python-api | |
| - name: "Download cpp-api" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: inviwo-cpp-api | |
| path: modules/cpp-api | |
| - name: "Publish python-api" | |
| run: | | |
| cd modules | |
| git config --global user.email "team@inviwo.org" | |
| git config --global user.name "Inviwo Team" | |
| git add python-api | |
| git diff --cached --quiet || git commit -m "Update Python API Docs" | |
| git push | |
| - name: "Publish cpp-api" | |
| run: | | |
| cd modules | |
| git config --global user.email "team@inviwo.org" | |
| git config --global user.name "Inviwo Team" | |
| git add cpp-api | |
| git diff --cached --quiet || git commit -m "Update C++ API Docs" | |
| git push | |
| update-latest-release: | |
| name: "Update latest release" | |
| if: github.ref == 'refs/heads/master' | |
| needs: [build, test-installer-windows, test-installer-macos, test-installer-linux, regression, create-changelog] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Download installer" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| pattern: inviwo-installer-* | |
| merge-multiple: true | |
| - name: "Upload binaries to release" | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: inviwo-* | |
| file_glob: true | |
| tag: latest | |
| overwrite: true | |
| body: "The latest inviwo build, updated for every merged pull request." |