feat: Scope, ScopeView, atomic code block #200
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: "ci" | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- created | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, 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 | |
env: | |
build_type: Release # possible options: MinSizeRel Release, Debug, RelWithDebInfo | |
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 recursive checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Cache CMake dependency source code | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-cmake-dependency-sources | |
with: | |
path: ${{github.workspace}}/build/_deps/*-src | |
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} | |
restore-keys: | | |
${{ env.cache-name }}- | |
- name: Cache CMake dependency build objects | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-cmake-dependency-builds | |
with: | |
path: | | |
${{github.workspace}}/build/_deps/*-build | |
${{github.workspace}}/build/_deps/*-subbuild | |
key: ${{ env.cache-name }}-${{ matrix.os }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} | |
restore-keys: | | |
${{ env.cache-name }}-${{ matrix.os }} | |
- name: Create Build Environment | |
# Some projects don't allow in-source building, so create a separate build directory | |
# We'll use this as our working directory for all subsequent commands | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.build_type}} -DGITHUB_REF_NAME=${{github.ref_name}} -DGITHUB_SHA=${{github.sha}} | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cmake --build . --config ${{env.build_type}} --target install | |
- name: CTest | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: ctest -C ${{env.build_type}} --verbose --output-on-failure | |
- name: CPack | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cpack -C ${{env.build_type}} | |
- name: Binary Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nodable-${{ runner.os }} | |
path: ${{runner.workspace}}/nodable/out/app/* | |
- name: Package Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nodable-package-${{ runner.os }} | |
path: | | |
!${{runner.workspace}}/nodable/out/package/_CPack_Packages | |
${{runner.workspace}}/nodable/out/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@v3 | |
- 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@v3 | |
with: | |
name: Nodable-Technical-Documentation | |
path: ${{runner.workspace}}/Nodable/docs/doxygen |