Skip to content

Some fixes for AppleClang and MacOS. #314

Some fixes for AppleClang and MacOS.

Some fixes for AppleClang and MacOS. #314

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- created
jobs:
build-windows:
strategy:
matrix:
os: [[windows-latest,x64-windows,msvc]]
buildType: [Debug]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 'f740d6f22908ccd8a519228a26b267f7a68dda9c'
- name: Install dependencies from vcpkg
shell: bash
run: |
$VCPKG_ROOT/vcpkg install vulkan-headers:${{ matrix.os[1] }}
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
- name: Setup OpenCppCoverage
id: setup_opencppcoverage
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure Warnings as errors (OFF)
if: github.event_name == 'push'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV
- name: Configure Warnings as errors (ON)
if: github.event_name == 'pull_request'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=ON" >> $GITHUB_ENV
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DPROJECTS_COVERAGE=ON -DCRG_BUILD_STATIC=OFF -DCRG_UNITY_BUILD=ON -DCRG_BUILD_TESTS=ON -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Build coverage report
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --target RenderGraphCoverage --config ${{ matrix.buildType }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ github.workspace }}/doc/RenderGraphCoverage.xml
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}.zip
build-macos:
strategy:
matrix:
os: [[macos-latest,x64-osx,clang]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 'f740d6f22908ccd8a519228a26b267f7a68dda9c'
- name: Install dependencies from vcpkg
shell: bash
run: |
$VCPKG_ROOT/vcpkg install vulkan-headers:${{ matrix.os[1] }}
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure Warnings as errors (OFF)
if: github.event_name == 'push'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV
- name: Configure Warnings as errors (ON)
if: github.event_name == 'pull_request'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=ON" >> $GITHUB_ENV
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DCRG_UNITY_BUILD=ON -DCRG_BUILD_TESTS=ON -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Test
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
ctest -C ${{ matrix.buildType }}
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}.zip
build-linux-gcc:
strategy:
matrix:
os: [[ubuntu-latest,x64-linux,gcc]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 'f740d6f22908ccd8a519228a26b267f7a68dda9c'
- name: Install dependencies from vcpkg
shell: bash
run: |
$VCPKG_ROOT/vcpkg install vulkan-headers:${{ matrix.os[1] }}
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure Warnings as errors (OFF)
if: github.event_name == 'push'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV
- name: Configure Warnings as errors (ON)
if: github.event_name == 'pull_request'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=ON" >> $GITHUB_ENV
- name: Configure GCC version
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DCRG_UNITY_BUILD=ON -DCRG_BUILD_TESTS=ON -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Test
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
ctest -C ${{ matrix.buildType }}
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}-gcc.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}-gcc.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}-gcc.zip
build-linux-clang:
strategy:
matrix:
os: [[ubuntu-latest,x64-linux,clang]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 'f740d6f22908ccd8a519228a26b267f7a68dda9c'
- name: Install dependencies from vcpkg
shell: bash
run: |
$VCPKG_ROOT/vcpkg install vulkan-headers:${{ matrix.os[1] }}
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure Warnings as errors (OFF)
if: github.event_name == 'push'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV
- name: Configure Warnings as errors (ON)
if: github.event_name == 'pull_request'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=ON" >> $GITHUB_ENV
- name: Configure Clang version
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "CC=clang-15" >> $GITHUB_ENV
echo "CXX=clang++-15" >> $GITHUB_ENV
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DCRG_UNITY_BUILD=ON -DCRG_BUILD_TESTS=ON -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Test
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
ctest -C ${{ matrix.buildType }}
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}-clang.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}-clang.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}-clang.zip