Skip to content

added one more threads test #884

added one more threads test

added one more threads test #884

Workflow file for this run

name: Build
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
types: [opened, synchronize, reopened]
workflow_dispatch:
#concurrency:
# group: ${{ github.ref }}
# cancel-in-progress: true
jobs:
verify-formatting:
name: Verify Formatting
runs-on: ubuntu-24.04
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Verify Formatting
uses: jidicula/clang-format-action@v4.14.0
with:
clang-format-version: '19'
check-path: 'src'
dump-registry:
name: Dump Registry
runs-on: windows-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Dump Registry
run: src/tools/grab-registry.bat
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Temp Registry Dump
path: |
registry/*
build:
name: Build
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
platform:
- Windows
- Linux GCC
- Linux Clang
- macOS
- Android x86_64
- Android arm64-v8a
configuration:
- Debug
- Release
include:
- configuration: Debug
preset: debug
- configuration: Release
preset: release
- platform: Windows
runner: windows-latest
- platform: Linux GCC
runner: ubuntu-24.04
- platform: Linux Clang
runner: ubuntu-24.04
clang-version: 18
- platform: macOS
runner: macos-latest
- platform: Android x86_64
runner: ubuntu-24.04
abi: x86_64
- platform: Android arm64-v8a
runner: ubuntu-24.04
abi: arm64-v8a
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Install Clang
if: "${{ matrix.platform == 'Linux Clang' }}"
run: |
sudo apt update
sudo apt install -y wget gnupg software-properties-common
wget https://apt.llvm.org/llvm-snapshot.gpg.key -O- | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-${{ matrix.clang-version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt update
sudo apt install -y clang-${{ matrix.clang-version }} lld-${{ matrix.clang-version }}
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ matrix.clang-version }} 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ matrix.clang-version }} 100
sudo update-alternatives --set cc /usr/bin/clang-${{ matrix.clang-version }}
sudo update-alternatives --set c++ /usr/bin/clang++-${{ matrix.clang-version }}
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.13.0
if: "${{ matrix.platform == 'Windows' }}"
- uses: nttld/setup-ndk@v1
id: setup-ndk
if: ${{ startsWith(matrix.platform, 'Android') }}
with:
ndk-version: r26d
add-to-path: false
- name: CMake Build
run: cmake --preset=${{matrix.preset}} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/toolchain/android-ndk.cmake && cmake --build --preset=${{matrix.preset}}
if: ${{ startsWith(matrix.platform, 'Android') }}
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_ABI: ${{matrix.abi}}
- name: CMake Build
run: cmake --workflow --preset=${{matrix.preset}}
if: ${{ !startsWith(matrix.platform, 'Android') }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts
path: |
build/${{matrix.preset}}/artifacts/*
- name: Upload Test Configuration
uses: actions/upload-artifact@v4
with:
name: Temp ${{ matrix.platform }} ${{matrix.configuration}} Test Config
path: |
build/${{matrix.preset}}/**/CTestTestfile.cmake
test:
name: Test
runs-on: ${{ matrix.runner }}
needs: [dump-registry, build]
strategy:
fail-fast: false
matrix:
platform:
# TODO: Move different windows platforms into registry dump matrix
- Windows 2025
- Windows 2022
- Windows 2019
- Linux GCC
- Linux Clang
- macOS
configuration:
- Debug
- Release
include:
- configuration: Debug
preset: debug
- configuration: Release
preset: release
- platform: Windows 2025
build-platform: Windows
runner: windows-2025
- platform: Windows 2022
build-platform: Windows
runner: windows-2022
- platform: Windows 2019
build-platform: Windows
runner: windows-2019
- platform: Linux GCC
build-platform: Linux GCC
runner: ubuntu-24.04
- platform: Linux Clang
build-platform: Linux Clang
runner: ubuntu-24.04
- platform: macOS
build-platform: macOS
runner: macos-latest
steps:
- name: Download Test Config
uses: actions/download-artifact@v4
with:
name: Temp ${{ matrix.build-platform }} ${{matrix.configuration}} Test Config
path: build/${{matrix.preset}}
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: ${{ matrix.build-platform }} ${{matrix.configuration}} Artifacts
path: build/${{matrix.preset}}/artifacts
- name: Download Windows Artifacts
uses: actions/download-artifact@v4
if: "${{ matrix.build-platform != 'Windows' }}"
with:
name: Windows ${{matrix.configuration}} Artifacts
path: build/${{matrix.preset}}/artifacts
- name: Download Registry Dump
uses: actions/download-artifact@v4
with:
name: Temp Registry Dump
path: build/${{matrix.preset}}/artifacts/registry
- name: CMake Test
run: cd build/${{matrix.preset}} && ctest --verbose
if: "${{ matrix.build-platform == 'Windows' }}"
summary:
name: Pipeline Summary
runs-on: ubuntu-24.04
needs: [dump-registry, build, test, verify-formatting]
if: always()
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: 'Temp *'
- name: Pipeline suceeded
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Pipeline failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1