Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 34 additions & 3 deletions .github/workflows/conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ jobs:
- name: Install GCC 15 (Linux)
if: runner.os == 'Linux'
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# Retry PPA setup — Launchpad occasionally returns transient
# GPGKeyTemporarilyNotFoundError (HTTP 500) errors.
for i in 1 2 3 4 5; do
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && break
echo "Attempt $i failed, retrying in 10s..."
sleep 10
done
sudo apt-get update
sudo apt-get install -y gcc-15 g++-15 ccache

Expand All @@ -79,7 +85,17 @@ jobs:

- name: Install pkg-config (Windows)
if: runner.os == 'Windows'
run: choco install pkgconfiglite
shell: pwsh
run: |
# Retry choco install — chocolatey community feed occasionally
# returns 504 Gateway Timeout errors.
foreach ($i in 1..5) {
choco install pkgconfiglite -y
if ($LASTEXITCODE -eq 0) { break }
Write-Host "Attempt $i failed, retrying in 10s..."
Start-Sleep -Seconds 10
}
if ($LASTEXITCODE -ne 0) { exit 1 }

# -- Conan --
- name: Create conan profile (Unix)
Expand Down Expand Up @@ -122,11 +138,26 @@ jobs:
ccache -z

# -- Build & Test --
- name: Write compiler native file (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
mkdir -p builddir
{
echo "[binaries]"
echo "c = '${{ matrix.platform.cc }}'"
echo "cpp = '${{ matrix.platform.cxx }}'"
} > builddir/compiler.ini

- name: Configure
env:
CC: ${{ runner.os != 'Windows' && format('ccache {0}', matrix.platform.cc) || matrix.platform.cc }}
CXX: ${{ runner.os != 'Windows' && format('ccache {0}', matrix.platform.cxx) || matrix.platform.cxx }}
run: meson setup builddir/ --native-file builddir/conan/conan_meson_native.ini
run: >
meson setup builddir/
--wrap-mode=forcefallback
--native-file builddir/conan/conan_meson_native.ini
${{ runner.os != 'Windows' && '--native-file builddir/compiler.ini' || '' }}

- name: Build
run: meson compile -C builddir/
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/system-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ jobs:
- name: Install packages (Linux)
if: runner.os == 'Linux'
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# Retry PPA setup — Launchpad occasionally returns transient
# GPGKeyTemporarilyNotFoundError (HTTP 500) errors.
for i in 1 2 3 4 5; do
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && break
echo "Attempt $i failed, retrying in 10s..."
sleep 10
done
sudo apt-get update
sudo apt-get install -y gcc-15 g++-15 ccache
sudo apt-get install -y libspdlog-dev libfmt-dev catch2 libtbb-dev
Expand Down Expand Up @@ -98,6 +104,7 @@ jobs:
run: >
meson setup build/
--buildtype=${{ matrix.build_type }}
--wrap-mode=forcefallback
-Dtesting=true

- name: Build
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,12 @@ build*

# meson wrap likes to add this file
.meson-subproject-wrap-hash.txt

# Ignore auto-promoted wrap-redirect files from subprojects.
# Only directly-needed wraps are whitelisted below.
subprojects/*.wrap
!subprojects/catch2.wrap
!subprojects/spdlog.wrap
!subprojects/zipper.wrap

docs/
1 change: 0 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class AnotherRayTracer(ConanFile):
requires = [
"spdlog/1.15.1",
"catch2/3.8.1",
"mdspan/0.6.0",
]
settings = "os", "compiler", "build_type", "arch"
generators = "PkgConfigDeps"
Expand Down
2 changes: 1 addition & 1 deletion include/art/utils/AffineTransform.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <zipper/transform/transform.hpp>
#include <zipper/transform/all.hpp>

#include "art/zipper_types.hpp"

Expand Down
8 changes: 2 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('AnotherRayTracer', 'cpp',
version : '0.1',
default_options : ['warning_level=3', 'cpp_std=c++26'])
default_options : ['warning_level=3', 'cpp_std=c++26,vc++latest'])



Expand All @@ -10,16 +10,12 @@ spdlog_version = '>=1.9.2'


cc = meson.get_compiler('cpp')
dl_lib = cc.find_library('dl')


spdlog_dep = dependency('spdlog', version: spdlog_version, default_options: ['tests=disabled'])

zipper_proj = subproject('zipper', default_options: {'testing': false, 'examples': false})
zipper_dep = zipper_proj.get_variable('zipper_dep')

TBB_dep = dependency('tbb')

required_deps = [zipper_dep]
internal_deps = [spdlog_dep] + required_deps

Expand Down Expand Up @@ -60,7 +56,7 @@ art_dep = declare_dependency(
include_directories: include_dirs)


art_exec = executable('art', 'src/main.cpp', dependencies: [art_dep] + internal_deps)
art_exec = executable('art-cli', 'src/main.cpp', dependencies: [art_dep] + internal_deps)


if get_option('testing')
Expand Down
2 changes: 1 addition & 1 deletion src/Camera.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "art/Camera.hpp"

#include <iostream>
#include <zipper/transform/transform.hpp>
#include <zipper/transform/all.hpp>

#include "art/Ray.hpp"
#include "art/utils/AffineTransform.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>

#include <zipper/transform/transform.hpp>
#include <zipper/transform/all.hpp>

#include "art/Camera.hpp"
#include "art/geometry/Box.hpp"
Expand Down
Loading