Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b2f2468
Refine deps caching
yaito3014 Feb 15, 2026
90b7276
Enable IRIS_CI
yaito3014 Feb 15, 2026
5d29008
Merge branch 'main' into refine-deps-caching
yaito3014 Feb 16, 2026
0cff232
Rename cache key
yaito3014 Feb 16, 2026
af7719e
Split deps build
yaito3014 Feb 16, 2026
1a0ef38
Fix
yaito3014 Feb 16, 2026
eb48a31
Fix2
yaito3014 Feb 16, 2026
2aa54e8
Fix?
yaito3014 Feb 16, 2026
0c78284
Checkout recursively
yaito3014 Feb 16, 2026
0fbccac
Refactor
yaito3014 Feb 16, 2026
2e71afb
Do things in parallel
yaito3014 Feb 16, 2026
91f0a0d
Test windows-2025-vs2026
yaito3014 Feb 16, 2026
fa0d36d
Use toolset arg with windows setup
yaito3014 Feb 16, 2026
ee25207
Update iris
yaito3014 Feb 16, 2026
a1e56ee
Grant write permission
yaito3014 Feb 16, 2026
88404bb
Fix please?
yaito3014 Feb 16, 2026
2e6b569
Jonny Depp 3
yaito3014 Feb 16, 2026
6f648ad
Rename
yaito3014 Feb 16, 2026
7e81974
Remove timestamp file to test
yaito3014 Feb 16, 2026
20ed902
Revert "Remove timestamp file to test"
yaito3014 Feb 16, 2026
6cb2fe8
Update iris
yaito3014 Feb 16, 2026
8766e08
Cache only timestamp
yaito3014 Feb 16, 2026
bf6e99c
Set enableCrossOsArchive
yaito3014 Feb 17, 2026
216da73
Put timestamp file under _deps
yaito3014 Feb 17, 2026
432b216
Revert timestamp related code
yaito3014 Feb 17, 2026
9d974bb
Revert some code
yaito3014 Feb 17, 2026
244d903
Restore catch2 build
yaito3014 Feb 17, 2026
6ece85d
Restore matrix
yaito3014 Feb 17, 2026
31adfc7
Drop windows 2022
yaito3014 Feb 17, 2026
c1c4c69
Explicitly specify cmake generator for VS 2022
saki7 Feb 17, 2026
9e13f33
Make job names cleaner
saki7 Feb 17, 2026
b156fe4
Re-enable all matrix
saki7 Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright 2026 The Iris Project Contributors
#
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

name: Setup Toolchain
description: Checkout, install compiler, and fetch environment info

inputs:
os-name:
required: true
os-version:
required: true
compiler-toolset:
required: true
compiler-version:
required: true
compiler-executable:
required: true
compiler-toolset-version:
required: false
type: string
default: ''
vs-path:
required: false
type: string
default: ''
cpp-version-name:
required: true
build-type-name:
required: true

outputs:
compiler-full-version:
description: Full version string of the compiler
value: ${{ steps.env-info.outputs.compiler-full-version }}
deps-cache-key:
description: Cache key for CMake dependencies
value: ${{ steps.env-info.outputs.deps-cache-key }}

runs:
using: composite
steps:
- name: Initialize Ubuntu
if: inputs.os-name == 'ubuntu'
shell: bash
run: |
sudo echo "set man-db/auto-update false" | sudo debconf-communicate
sudo dpkg-reconfigure man-db

- name: Setup GCC
if: inputs.compiler-toolset == 'gcc'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y g++-${{ inputs.compiler-version }}

- name: Setup Clang
if: inputs.compiler-toolset == 'clang'
shell: bash
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh ${{ inputs.compiler-version }}
sudo apt-get install -y libc++-${{ inputs.compiler-version }}-dev libc++abi-${{ inputs.compiler-version }}-dev libunwind-${{ inputs.compiler-version }}-dev

- uses: TheMrMilchmann/setup-msvc-dev@v3
if: inputs.os-name == 'windows'
with:
arch: x64
vs-path: ${{ inputs.vs-path }}
toolset: ${{ inputs.compiler-toolset-version }}

- name: Fetch Environment Info
id: env-info
shell: bash
run: |
set -e
case "${{ inputs.compiler-toolset }}" in
"gcc")
COMPILER_FULL_VERSION=$(${{ inputs.compiler-executable }} -dumpfullversion -dumpversion)
;;
"clang")
COMPILER_FULL_VERSION=$(${{ inputs.compiler-executable }} -dumpversion)
;;
"msvc")
COMPILER_FULL_VERSION=$(powershell -NoProfile -Command "(Get-Command ${{ inputs.compiler-executable }}).FileVersionInfo.FileVersion")
;;
esac
echo "COMPILER_FULL_VERSION=$COMPILER_FULL_VERSION"
echo "compiler-full-version=$COMPILER_FULL_VERSION" >> "$GITHUB_OUTPUT"
echo "deps-cache-key=deps4-${{ inputs.os-name }}-${{ inputs.os-version }}-${{ inputs.compiler-toolset }}-${COMPILER_FULL_VERSION}-${{ inputs.cpp-version-name }}-${{ inputs.build-type-name }}" >> "$GITHUB_OUTPUT"
191 changes: 191 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Copyright 2026 The Iris Project Contributors
#
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

name: Build

on:
workflow_call:
inputs:
os-name:
required: true
type: string
os-version:
required: true
type: string
build-type-name:
required: true
type: string
cpp-version-name:
required: true
type: string
cpp-version-number:
required: true
type: string
compiler-toolset:
required: true
type: string
compiler-version:
required: true
type: string
compiler-executable:
required: true
type: string
compiler-cxxflags:
required: false
type: string
default: ''
compiler-toolset-version:
required: false
type: string
default: ''
vs-path:
required: false
type: string
default: ''
cmake-config-additional-args:
required: false
type: string
default: ''
compiler-builder-additional-args:
required: false
type: string
default: ''
components:
required: true
type: string
description: 'JSON array of components to build (e.g. ["alloy","x4"])'

env:
IRIS_X4_BUILD_JOBS: 4

jobs:
prepare-deps:
name: "Dependencies"
runs-on: ${{ inputs.os-name }}-${{ inputs.os-version }}

steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Setup Toolchain
id: setup
uses: ./.github/actions/setup
with:
os-name: ${{ inputs.os-name }}
os-version: ${{ inputs.os-version }}
compiler-toolset: ${{ inputs.compiler-toolset }}
compiler-version: ${{ inputs.compiler-version }}
compiler-executable: ${{ inputs.compiler-executable }}
compiler-toolset-version: ${{ inputs.compiler-toolset-version }}
vs-path: ${{ inputs.vs-path }}
cpp-version-name: ${{ inputs.cpp-version-name }}
build-type-name: ${{ inputs.build-type-name }}

- name: Cache CMake Dependencies (restore)
id: cache-deps
uses: actions/cache/restore@v4
with:
key: ${{ steps.setup.outputs.deps-cache-key }}
path: ${{ github.workspace }}/build/_deps

# Adapt CMP0168; enable caching in CI
# https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_FULLY_DISCONNECTED
- name: Setup Cached CMake Dependencies
id: deps-info
shell: bash
run: |
if [ "${{ steps.cache-deps.outputs.cache-hit }}" = "true" ]; then
echo "IRIS_X4_CMAKE_ARGS=-DFETCHCONTENT_FULLY_DISCONNECTED=ON" >> "$GITHUB_OUTPUT"
else
echo "IRIS_X4_CMAKE_ARGS=" >> "$GITHUB_OUTPUT"
fi

- name: Configure
shell: bash
run: |
set -xe
cmake ${{ steps.deps-info.outputs.IRIS_X4_CMAKE_ARGS }} -B build \
${{ inputs.cmake-config-additional-args }} \
-DCMAKE_CXX_COMPILER=${{ inputs.compiler-executable }} \
-DCMAKE_CXX_FLAGS="${{ inputs.compiler-cxxflags }}" \
-DCMAKE_CXX_STANDARD=${{ inputs.cpp-version-number }} \
-DCMAKE_BUILD_TYPE=${{ inputs.build-type-name }} \
-DIRIS_TEST_ALLOY=OFF \
-DIRIS_TEST_X4=OFF \
-DIRIS_CI=ON \
-S .

- name: Build Deps
run: |
cmake --build build --config ${{ inputs.build-type-name }} -j${{ env.IRIS_X4_BUILD_JOBS }} --target Catch2WithMain ${{ inputs.compiler-builder-additional-args }}

- name: Cache CMake Dependencies (save)
# Due to some bogus "Unable to reserve cache with key" error, we *always* save the cache for now.
# See this page for the rate limit: https://docs.github.com/en/actions/reference/limits#existing-system-limits
# if: steps.cache-deps.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-deps.outputs.cache-primary-key }}
path: ${{ github.workspace }}/build/_deps

build:
name: ${{ matrix.component }}
needs: prepare-deps
runs-on: ${{ inputs.os-name }}-${{ inputs.os-version }}

strategy:
fail-fast: false

matrix:
component: ${{ fromJSON(inputs.components) }}

steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Setup Toolchain
id: setup
uses: ./.github/actions/setup
with:
os-name: ${{ inputs.os-name }}
os-version: ${{ inputs.os-version }}
compiler-toolset: ${{ inputs.compiler-toolset }}
compiler-version: ${{ inputs.compiler-version }}
compiler-executable: ${{ inputs.compiler-executable }}
cpp-version-name: ${{ inputs.cpp-version-name }}
build-type-name: ${{ inputs.build-type-name }}

- name: Cache CMake Dependencies (restore)
id: cache-deps
uses: actions/cache/restore@v4
with:
key: ${{ steps.setup.outputs.deps-cache-key }}
path: ${{ github.workspace }}/build/_deps

- name: Configure
shell: bash
run: |
set -xe
cmake -DFETCHCONTENT_FULLY_DISCONNECTED=ON -B build \
-DCMAKE_CXX_COMPILER=${{ inputs.compiler-executable }} \
-DCMAKE_CXX_FLAGS="${{ inputs.compiler-cxxflags }}" \
-DCMAKE_CXX_STANDARD=${{ inputs.cpp-version-number }} \
-DCMAKE_BUILD_TYPE=${{ inputs.build-type-name }} \
-DIRIS_TEST_ALLOY=${{ case(matrix.component == 'alloy', 'ON', 'OFF') }} \
-DIRIS_TEST_X4=${{ case(matrix.component == 'x4', 'ON', 'OFF') }} \
-DIRIS_CI=ON \
-S .

- name: Build Tests
run: |
cmake --build build --config ${{ inputs.build-type-name }} -j${{ env.IRIS_X4_BUILD_JOBS }} ${{ inputs.compiler-builder-additional-args }}

- name: Test
env:
CLICOLOR_FORCE: 1
working-directory: ${{ github.workspace }}/build/test
run: ctest --output-on-failure -C ${{ inputs.build-type-name }}
Loading