Skip to content

ci

ci #252

Workflow file for this run

name: "ci"
on:
workflow_dispatch:
release:
types:
- created
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-13] # macos-12 is deprecated https://github.com/actions/runner-images/issues/10721
fail-fast: false # see https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#handling-failures
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: Debug # possible options: Release, Debug, RelWithDebInfo (we use the same with rake)
BUILD_PATH: cmake-build
INSTALL_PATH: out
steps:
- name: Install dependencies (Linux)
if: runner.os == 'Linux' # see https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: sudo apt-get update && sudo apt-get install libegl1-mesa-dev libdbus-1-dev libgtk-3-dev
- name: Install dependencies (macOS)
if: runner.os == 'macOS' # see https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: brew install mesalib-glw
- name: Git Checkout
uses: actions/checkout@v4
- name: Cache Submodules
id: cache-submodules
uses: actions/cache@v4
with:
path: libs
key: cache-submodules-${{ hashFiles( '.gitmodules' ) }}
restore-keys: cache-submodules-
- name: Git Checkout Submodules
if: steps.cache-submodules.outputs.cache-hit == 'false'
run: |
git submodule init
git submodule update
# - name: Configure CMake
# shell: bash
# working-directory: ${{env.BUILD_PATH}}
# run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGITHUB_REF_NAME=${{github.ref_name}} -DGITHUB_SHA=${{github.sha}}
- name: Build
working-directory: ${{env.BUILD_PATH}}
shell: bash
run: rake build --trace
# - name: CTest
# working-directory: ${{env.BUILD_PATH}}
# shell: bash
# run: ctest -C ${{env.BUILD_TYPE}} --verbose --output-on-failure
#
# - name: CPack
# working-directory: ${{env.BUILD_PATH}}
# shell: bash
# run: cpack -C ${{env.BUILD_TYPE}}
#
# - name: Binary Artifact
# uses: actions/upload-artifact@v4
# with:
# name: nodable-${{ runner.os }}
# path: ${{env.INSTALL_PATH}}/app/*
#
# - name: Package Artifact
# uses: actions/upload-artifact@v4
# with:
# name: nodable-package-${{ runner.os }}
# path: |
# !${{env.INSTALL_PATH}}/package/_CPack_Packages
# ${{env.INSTALL_PATH}}/package/*.*
#
# doxygen:
# runs-on: [ubuntu-20.04]
# needs: [build]
# if: ${{ success() }} # see https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
# steps:
# - name: Git recursive checkout
# uses: actions/checkout@v4
#
# - name: Install dependencies
# run: sudo apt-get update && sudo apt-get install doxygen
#
# - name: Generate documentation
# run: cd docs && doxygen
#
# - name: Upload documentation artifact
# uses: actions/upload-artifact@v4
# with:
# name: Nodable-Technical-Documentation
# path: ${{runner.workspace}}/Nodable/docs/doxygen