Skip to content

Incremented version to 1.7.6. #31

Incremented version to 1.7.6.

Incremented version to 1.7.6. #31

Workflow file for this run

name: ModularShaderLanguage
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CTEST_OUTPUT_ON_FAILURE: '1'
GTEST_OUTPUT: xml:${{ github.workspace }}/test-results/
boost_version: 1.86.0
cmake_common_args: >-
-DCMAKE_FIND_ROOT_PATH=${{ github.workspace }}/dependencies
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/dependencies
cores_count: '4'
cores_mac_count: '3'
dependency_location: "${{ github.workspace }}/dependencies"
gtest_version: v1.15.2
msvc_version: 14.2
msvc_toolset: 142
test_results_location: "${{ github.workspace }}/test-results"
jobs:
Linux:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- lib_type: Static
cmake_args: "-DMSL_SHARED=OFF"
- lib_type: Shared
cmake_args: "-DMSL_SHARED=ON"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: |-
git submodule update --init --recursive
# Need system boost for static libs.
sudo apt-get update
sudo apt-get -y install libboost-all-dev
working-directory: "${{ github.workspace }}"
- name: Build gtest
run: |-
git clone https://github.com/google/googletest.git googletest-code
cd googletest-code
git checkout ${{ env.gtest_version }}
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.dependency_location }}
cmake --build . -j ${{ env.cores_count }}
cmake --build . --target install
working-directory: "${{ github.workspace }}"
- name: Build debug
run: |-
mkdir -p build/Debug
cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug ${{ env.cmake_common_args }} ${{ matrix.cmake_args }} \
${{ github.workspace }}
cmake --build . -j ${{ env.cores_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests debug
continue-on-error: true
timeout-minutes: 10
run: ctest
working-directory: "${{ github.workspace }}/build/Debug"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Tests (Linux ${{ matrix.lib_type }} Debug)
junit_files: "${{ env.test_results_location }}/*.xml"
- name: Clear test results
run: rm *.xml
working-directory: "${{ env.test_results_location }}"
- name: Build release
run: |-
mkdir -p build/Release
cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release ${{ env.cmake_common_args }} ${{ matrix.cmake_args }} \
${{ github.workspace }}
cmake --build . -j ${{ env.cores_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests release
continue-on-error: true
timeout-minutes: 10
run: ctest
working-directory: "${{ github.workspace }}/build/Release"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Tests (Linux ${{ matrix.lib_type }} Release)
junit_files: "${{ env.test_results_location }}/*.xml"
Mac:
runs-on: macos-latest
strategy:
matrix:
include:
- lib_type: Static
cmake_args: "-DMSL_SHARED=OFF"
- lib_type: Shared
cmake_args: "-DMSL_SHARED=ON"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: |-
git submodule update --init --recursive
brew install boost
working-directory: "${{ github.workspace }}"
- name: Build gtest
run: |-
git clone https://github.com/google/googletest.git googletest-code
cd googletest-code
git checkout ${{ env.gtest_version }}
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.dependency_location }}
cmake --build . -j ${{ env.cores_mac_count }}
cmake --build . --target install
working-directory: "${{ github.workspace }}"
- name: Build debug
run: |-
mkdir -p build/Debug
cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug ${{ env.cmake_common_args }} ${{ matrix.cmake_args }} \
${{ github.workspace }}
cmake --build . -j ${{ env.cores_mac_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests debug
continue-on-error: true
timeout-minutes: 10
run: ctest
working-directory: "${{ github.workspace }}/build/Debug"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/macos@v2
with:
check_name: Tests( Mac ${{ matrix.lib_type }} Debug)
junit_files: "${{ env.test_results_location }}/*.xml"
- name: Clear test results
run: rm *.xml
working-directory: "${{ env.test_results_location }}"
- name: Build release
run: |-
mkdir -p build/Release
cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release ${{ env.cmake_common_args }} ${{ matrix.cmake_args }} \
${{ github.workspace }}
cmake --build . -j ${{ env.cores_mac_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests release
continue-on-error: true
timeout-minutes: 10
run: ctest
working-directory: "${{ github.workspace }}/build/Release"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/macos@v2
with:
check_name: Mac-${{ matrix.lib_type }}-Release
junit_files: "${{ env.test_results_location }}/*.xml"
Windows:
runs-on: windows-latest
strategy:
matrix:
include:
- arch: Win32
bits: 32
lib_type: Static
cmake_args: "-DMSL_SHARED=OFF -DBOOST_ROOT=D:/boost"
- arch: Win32
bits: 32
lib_type: Shared
cmake_args: "-DMSL_SHARED=ON -DBOOST_ROOT=D:/boost"
- arch: x64
bits: 64
lib_type: Static
cmake_args: "-DMSL_SHARED=OFF -DBOOST_ROOT=D:/boost"
- arch: x64
bits: 64
lib_type: Shared
cmake_args: "-DMSL_SHARED=ON -DBOOST_ROOT=D:/boost"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: git submodule update --init --recursive
shell: bash
working-directory: "${{ github.workspace }}"
- name: Download boost
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
command: |-
$underscoreVersion = "${{ env.boost_version }}".replace(".", "_")
$url = "https://sourceforge.net/projects/boost/files/boost-binaries/${{ env.boost_version }}/boost_$underscoreVersion-msvc-${{ env.msvc_version }}-${{ matrix.bits }}.exe"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=D:\boost"
- name: Checkout gtest
run: |-
git clone https://github.com/google/googletest.git googletest-code
cd googletest-code
git checkout ${{ env.gtest_version }}
mkdir build
shell: bash
working-directory: "${{ github.workspace }}"
- name: Build gtest
run: |-
cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.dependency_location }} -Dgtest_force_shared_crt=ON `
-A ${{ matrix.arch }} -T v${{ env.msvc_toolset }} -DCMAKE_DEBUG_POSTFIX=d
cmake --build . --config Debug
cmake --build . --config Debug --target install
# Need to also install release build to find the debug version.
cmake --build . --config Release
cmake --build . --config Release --target install
working-directory: "${{ github.workspace }}/googletest-code/build"
- name: Run CMake
run: |-
mkdir build
cd build
cmake ${{ env.cmake_common_args }} ${{ matrix.cmake_args }} -A ${{ matrix.arch }} `
-T v${{ env.msvc_toolset }} ${{ github.workspace }}
working-directory: "${{ github.workspace }}"
- name: Build debug
run: cmake --build . --config Debug
working-directory: "${{ github.workspace }}/build"
- name: Run tests debug
continue-on-error: true
timeout-minutes: 10
run: |-
$env:Path += ";D:\\boost\\lib${{ matrix.bits }}-msvc-${{ env.msvc_version }}"
ctest -C Debug
working-directory: "${{ github.workspace }}/build"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
check_name: Tests (Windows ${{ matrix.arch }} ${{ matrix.lib_type }} Debug)
junit_files: "${{ env.test_results_location }}/*.xml"
- name: Clear test results
run: rm *.xml
shell: bash
working-directory: "${{ env.test_results_location }}"
- name: Build release
run: cmake --build . --config Release
working-directory: "${{ github.workspace }}/build"
- name: Run tests release
continue-on-error: true
timeout-minutes: 10
run: |-
$env:Path += ";D:\\boost\\lib${{ matrix.bits }}-msvc-${{ env.msvc_version }}"
ctest -C Release
working-directory: "${{ github.workspace }}/build"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
check_name: Tests (Windows ${{ matrix.arch }} ${{ matrix.lib_type }} Release)
junit_files: "${{ env.test_results_location }}/*.xml"
# vim: ts=2 sts=2 sw=2 et