Skip to content

chore(deps): bump actions/cache from 3 to 4 #52

chore(deps): bump actions/cache from 3 to 4

chore(deps): bump actions/cache from 3 to 4 #52

Workflow file for this run

name: build
on: [push, pull_request]
env:
# Vulkan version
UNIX_VULKAN_VERSION: 1.2.198
WINDOWS_VULKAN_VERSION: 1.2.198.1
# Conan cache environment variables
CONAN_SYSREQUIRES_MODE: enabled
CONAN_USER_HOME: "${{ github.workspace }}/conan-cache"
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-cache/short"
# Cache
PIP_CACHE_DIR: "${{ github.workspace }}/pip-cache"
CHOCO_CACHE_DIR: "${{ github.workspace }}/choco-cache"
CPM_SOURCE_CACHE: "${{ github.workspace }}/cpm_modules"
jobs:
linux:
strategy:
fail-fast: false
matrix:
include:
- compiler: g++
version: 7
cxx: g++-7
- compiler: g++
version: 8
cxx: g++-8
- compiler: g++
version: 9
cxx: g++-9
- compiler: clang
version: 9
cxx: clang++-9
- compiler: clang
version: 10
cxx: clang++-10
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
env:
cache-name: cache-conan-pip-chocolatey-modules
with:
path: |
${{ env.CONAN_USER_HOME }}
${{ env.PIP_CACHE_DIR }}
${{ env.CHOCO_CACHE_DIR }}
${{ env.CPM_SOURCE_CACHE }}
key: ubuntu-${{ hashFiles('conanfile.txt') }} }}
- name: Install compiler
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.compiler }}-${{ matrix.version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build cmake doxygen
ninja --version
cmake --version
gcc --version
clang --version
- name: Install Conan
run: python -m pip install conan==1.*
- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install freeglut3-dev \
libxi-dev libxinerama-dev libxcb-cursor-dev xorg-dev \
libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev \
libxcb-render-util0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
libxcb-sync-dev libxcb-xfixes0-dev libx11-xcb-dev libxcb-dri3-dev libxcb-util-dev
- name: Install Vulkan SDK
run: |
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$UNIX_VULKAN_VERSION-focal.list https://packages.lunarg.com/vulkan/$UNIX_VULKAN_VERSION/lunarg-vulkan-$UNIX_VULKAN_VERSION-focal.list
sudo apt update
sudo apt install -f vulkan-sdk
- 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 ${{ runner.workspace }}/instdir
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{ runner.workspace }}/build
env:
CXX: ${{ matrix.cxx }}
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: |
cmake \
$GITHUB_WORKSPACE \
-DBUILD_TESTING=ON -DBUILD_DOCS=ON -DINSTALL_APPS=ON \
-DCMAKE_INSTALL_PREFIX="${{ runner.workspace }}/instdir"
- name: Build
working-directory: ${{ runner.workspace }}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config Release
- name: Run tests
working-directory: ${{ runner.workspace }}/build
env:
CTEST_OUTPUT_ON_FAILURE: 1
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --timeout 10 -C Release -j4
- name: Install Strip
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --install . --strip
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{ runner.workspace }}/instdir
name: ubuntu-${{ matrix.cxx }}
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
env:
cache-name: cache-conan-pip-chocolatey-modules
with:
path: |
${{ env.CONAN_USER_HOME }}
${{ env.PIP_CACHE_DIR }}
${{ env.CHOCO_CACHE_DIR }}
${{ env.CPM_SOURCE_CACHE }}
key: windows-${{ hashFiles('conanfile.txt') }} }}
- name: Install Build Dependencies
run: |
choco config set cacheLocation ${{ env.CHOCO_CACHE_DIR }}
choco install ninja cmake
ninja --version
cmake --version
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Conan
run: python -m pip install conan==1.*
- name: Download Vulkan SDK
run: Invoke-WebRequest "https://sdk.lunarg.com/sdk/download/$Env:WINDOWS_VULKAN_VERSION/windows/VulkanSDK-$Env:WINDOWS_VULKAN_VERSION-Installer.exe" -OutFile VulkanSDK.exe -v
- name: Install Vulkan SDK
run: .\VulkanSDK.exe --accept-licenses --default-answer --confirm-command install
shell: cmd
- name: Create Build Environment
run: cmake -E make_directory ${{ runner.workspace }}/build ${{ runner.workspace }}/instdir
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
env:
VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}"
run: |
cmake \
$GITHUB_WORKSPACE \
-DBUILD_TESTING=ON -DBUILD_DOCS=ON -DINSTALL_APPS=ON \
-DCMAKE_INSTALL_PREFIX="${{ runner.workspace }}/instdir"
- name: Build
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --build . --config Release
env:
VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}"
- name: Run tests
working-directory: ${{ runner.workspace }}/build
env:
CTEST_OUTPUT_ON_FAILURE: 1
VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}"
run: ctest --timeout 10 -C Release -j4
- name: Install Strip
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --install . --strip
env:
VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}"
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{ runner.workspace }}/instdir
name: windows-msvc
docs:
name: Publish documentation
runs-on: ubuntu-latest
needs: linux
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ubuntu-g++-9
path: ${{ runner.workspace }}
- name: Display structure of downloaded files
working-directory: ${{ runner.workspace }}
run: ls -R
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ runner.workspace }}/docs/doxygen/html