Refactored the bool setters and getters #904
Workflow file for this run
This file contains hidden or 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: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths-ignore: | |
- "docs/**" | |
- "LICENSES/**" | |
- "LICENSE" | |
- "**.md" | |
- .github/workflows/wheels.yml | |
- .github/workflows/ci-gcp.yml | |
- .github/workflows/ci-latest-slang.yml | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- "docs/**" | |
- "LICENSES/**" | |
- "LICENSE" | |
- "**.md" | |
- .github/workflows/wheels.yml | |
- .github/workflows/ci-gcp.yml | |
- .github/workflows/ci-latest-slang.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
checks: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows, linux, macos] | |
platform: [x86_64, aarch64] | |
compiler: [msvc, gcc, clang] | |
config: [Debug, Release] | |
python: ["3.10"] | |
exclude: | |
# Exclude aarch64 for windows | |
- { os: windows, platform: aarch64 } | |
# Exclude x86_64 for macos | |
- { os: macos, platform: x86_64 } | |
# Exclude unavailable compilers | |
- { os: windows, compiler: gcc } | |
- { os: windows, compiler: clang } | |
- { os: linux, compiler: msvc } | |
- { os: macos, compiler: msvc } | |
- { os: macos, compiler: gcc } | |
include: | |
# Builds running on self-hosted runners (build + tests + coverage) | |
- { os: windows, platform: x86_64, compiler: msvc, config: Debug, flags: "unit-test,header-validation", runs-on: { group: nvrgfx, labels: [Windows, X64] } } | |
- { os: windows, platform: x86_64, compiler: msvc, config: Release, flags: "unit-test,test-examples", runs-on: { group: nvrgfx, labels: [Windows, X64] } } | |
- { os: linux, platform: x86_64, compiler: gcc, config: Debug, flags: "unit-test,header-validation,coverage", runs-on: { group: nvrgfx, labels: [Linux, X64] } } | |
- { os: linux, platform: x86_64, compiler: gcc, config: Release, flags: "unit-test,test-examples", runs-on: { group: nvrgfx, labels: [Linux, X64] } } | |
# Additional builds running on GitHub hosted runners (build only) | |
- { os: linux, platform: x86_64, compiler: clang, runs-on: ubuntu-latest } | |
- { os: linux, platform: aarch64, compiler: gcc, runs-on: ubuntu-24.04-arm } | |
- { os: linux, platform: aarch64, compiler: clang, runs-on: ubuntu-24.04-arm } | |
- { os: macos, platform: aarch64, compiler: clang, flags: "unit-test", runs-on: macos-latest } | |
env: | |
# Environment variables used by ci.py | |
CI_OS: ${{ matrix.os }} | |
CI_PLATFORM: ${{ matrix.platform }} | |
CI_COMPILER: ${{ matrix.compiler }} | |
CI_CONFIG: ${{ matrix.config }} | |
CI_PYTHON: ${{ matrix.python }} | |
CI_FLAGS: ${{ matrix.flags }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
lfs: true | |
- name: Cleanup submodules # Fix for https://github.com/actions/checkout/issues/358 | |
run: | | |
git submodule foreach --recursive git clean -ffdx | |
git submodule foreach --recursive git reset --hard | |
# Setup Linux. | |
- name: Setup Linux | |
if: startsWith(matrix.os, 'linux') && contains(matrix.runs-on, 'ubuntu-') | |
run: | | |
sudo apt update && sudo apt install -y libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config | |
# Setup Python. | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' | |
# Setup Python environment. | |
- name: Setup Python environment | |
run: | | |
python -m pip install -r requirements-dev.txt | |
python -m pip install pytest-github-actions-annotate-failures | |
# Setup MSVC. | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
# Setup CMake/Ninja. | |
- name: Setup CMake/Ninja | |
uses: lukka/get-cmake@latest | |
# Setup. | |
- name: Setup | |
run: python tools/ci.py setup | |
# Setup vcpkg caching. | |
# Only run on hosted runners. | |
# For self-hosted runners, we use a local cache directory. | |
- name: Set vcpkg cache directory | |
if: startsWith(matrix.runs-on, 'ubuntu-') || startsWith(matrix.runs-on, 'macos-') || startsWith(matrix.runs-on, 'windows-') | |
run: | | |
echo "VCPKG_DEFAULT_BINARY_CACHE=${{ github.workspace }}/vcpkg-cache" >> $GITHUB_ENV | |
mkdir -p ${{ github.workspace }}/vcpkg-cache | |
- name: Setup vcpkg caching | |
if: startsWith(matrix.runs-on, 'ubuntu-') || startsWith(matrix.runs-on, 'macos-') || startsWith(matrix.runs-on, 'windows-') | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
key: vcpkg-cache-${{ runner.os }}-${{ matrix.platform }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json', 'external/vcpkg-triplets/**') }} | |
# Configure. | |
- name: Configure | |
run: python tools/ci.py configure | |
# Build. | |
- name: Build | |
run: python tools/ci.py build | |
# Typing Checks (Python) | |
- name: Typing Checks (Python) | |
run: python tools/ci.py typing-check-python | |
# Unit Tests (C++) | |
- name: Unit Tests (C++) | |
if: contains(matrix.flags, 'unit-test') | |
run: python tools/ci.py unit-test-cpp | |
# Unit Tests (Python) | |
- name: Unit Tests (Python) | |
if: contains(matrix.flags, 'unit-test') | |
run: python tools/ci.py unit-test-python --parallel | |
# Unit Test Report | |
- name: Unit Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: contains(matrix.flags, 'unit-test') | |
with: | |
report_paths: 'reports/*-junit.xml' | |
check_name: "Unit Test Report" | |
# Test Examples | |
- name: Test Examples | |
if: contains(matrix.flags, 'test-examples') | |
run: python tools/ci.py test-examples -p | |
# Generate Coverage Report | |
- name: Generate Coverage Report | |
if: contains(matrix.flags, 'coverage') | |
run: python tools/ci.py coverage-report | |
# Coverage Report | |
- name: Coverage Report | |
uses: actions/upload-artifact@v4 | |
if: contains(matrix.flags, 'coverage') | |
with: | |
name: coverage-report | |
path: reports/coverage.html |