Upgrade: [Actions] Bump the actions group with 3 updates (#37) #68
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: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
linux: | |
name: Linux | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- compiler: clang | |
cxxcompiler: clang++ | |
- compiler: gcc | |
cxxcompiler: g++ | |
runs-on: ubuntu-latest | |
env: | |
CC: ${{ matrix.compiler }} | |
CXX: ${{ matrix.cxxcompiler }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
echo "::group::Update apt" | |
sudo apt-get update | |
echo "::endgroup::" | |
echo "::group::Install dependencies" | |
sudo apt-get install -y --no-install-recommends \ | |
libboost-dev \ | |
# EOF | |
echo "::endgroup::" | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Install GCC problem matcher | |
uses: ammaraskar/gcc-problem-matcher@master | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
echo "::group::CMake" | |
cmake .. | |
echo "::endgroup::" | |
echo "::group::Build" | |
echo "Running on $(nproc) cores" | |
cmake --build . -j $(nproc) | |
echo "::endgroup::" | |
macos: | |
name: Mac OS | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: arm64 | |
full_arch: arm64 | |
runs-on: macos-latest | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup vcpkg caching | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite') | |
- name: Install vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg | |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
- name: Prepare vcpkg | |
run: | | |
./vcpkg/vcpkg install --triplet=${{ matrix.arch }}-osx \ | |
boost-bimap \ | |
boost-date-time \ | |
boost-foreach \ | |
# EOF | |
- name: Install GCC problem matcher | |
uses: ammaraskar/gcc-problem-matcher@master | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
echo "::group::CMake" | |
cmake ${GITHUB_WORKSPACE} \ | |
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.full_arch }} \ | |
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-osx \ | |
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
# EOF | |
echo "::endgroup::" | |
echo "::group::Build" | |
echo "Running on $(sysctl -n hw.logicalcpu) cores" | |
cmake --build . -j $(sysctl -n hw.logicalcpu) | |
echo "::endgroup::" | |
windows: | |
name: Windows | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
arch: [x86, x64] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup vcpkg caching | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite') | |
- name: Install vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg | |
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics | |
- name: Prepare vcpkg | |
shell: bash | |
run: | | |
./vcpkg/vcpkg install --triplet=${{ matrix.arch }}-windows-static \ | |
boost-bimap \ | |
boost-date-time \ | |
boost-foreach \ | |
libpng \ | |
# EOF | |
- name: Install MSVC problem matcher | |
uses: ammaraskar/msvc-problem-matcher@master | |
- name: Configure developer command prompt for ${{ matrix.arch }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
- name: Build | |
shell: bash | |
run: | | |
mkdir build | |
cd build | |
echo "::group::CMake" | |
cmake .. \ | |
-GNinja \ | |
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \ | |
-DCMAKE_TOOLCHAIN_FILE="${GITHUB_WORKSPACE}\vcpkg\scripts\buildsystems\vcpkg.cmake" \ | |
# EOF | |
echo "::endgroup::" | |
echo "::group::Build" | |
cmake --build . | |
echo "::endgroup::" |