Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ed647bf
Add WebAssembly build support with Emscripten
lefticus Dec 21, 2025
a693bfe
Fix spdlog output and add COOP/COEP service worker
lefticus Dec 21, 2025
f8fd18a
Add GitHub Pages deployment workflow
lefticus Dec 22, 2025
217d516
Clean up Emscripten CMake options
lefticus Dec 22, 2025
c95430a
Clean up WASM ifdefs and comments in main.cpp
lefticus Dec 22, 2025
b54a655
Replace C-style cast with reinterpret_cast in WASM code
lefticus Dec 23, 2025
bc226c3
Move pthread flags into Emscripten.cmake
lefticus Dec 23, 2025
0f929e4
Remove outdated comment and debug logging
lefticus Dec 28, 2025
802bea9
Simplified differences between wasm and native builds
lefticus Dec 29, 2025
4581a0a
Unify CLI11 argument handling for native and WASM builds
lefticus Dec 29, 2025
6784000
Enable WASM exceptions and improve terminal output
lefticus Dec 29, 2025
a3e45ee
Fix WASM input handling and update to FTXUI 6.1.9
lefticus Dec 29, 2025
18eb319
:art: Committing clang-format changes
Dec 29, 2025
154e806
Add Dependabot config for GitHub Actions updates
lefticus Dec 29, 2025
c4042fc
Update GitHub Actions to latest versions
lefticus Dec 29, 2025
3c7b164
Update CI to use recent stable OS and compiler versions
lefticus Dec 29, 2025
ed6254a
Upgrade actions/cache to v4
lefticus Dec 29, 2025
481ee45
Upgrade gcc and clang
lefticus Dec 29, 2025
d250104
Fix missing initializer
lefticus Dec 29, 2025
1f33950
Cleanup some warnings
lefticus Dec 29, 2025
035dd1f
Update dependendcies
lefticus Dec 29, 2025
db903ba
Push OS release up further
lefticus Dec 29, 2025
6977fa8
Fix CMake hardening flags causing build failures
lefticus Dec 29, 2025
c7c14cb
Remove debug statements from hardening code
lefticus Dec 29, 2025
f7ed569
Use add_compile_options for global hardening flags
lefticus Dec 29, 2025
46943fc
Update of clang-tidy
lefticus Dec 30, 2025
aa84195
Build WASM on all CI runs, deploy only on main/develop/tags
lefticus Dec 30, 2025
187be81
Remove travels.worker.js from WASM artifact copying
lefticus Dec 30, 2025
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
7 changes: 5 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Checks: "*,
-google-*,
-llvm*,
-modernize-use-trailing-return-type,
-performance-enum-size,
-zircon-*,
-readability-else-after-return,
-readability-static-accessed-through-instance,
Expand All @@ -15,11 +16,13 @@ Checks: "*,
-misc-non-private-member-variables-in-classes,
"
WarningsAsErrors: ''
HeaderFilterRegex: ''
HeaderFilterRegex: '(src|include)/.*'
FormatStyle: none



CheckOptions:
- key: readability-identifier-naming.IgnoredRegexp
value: '^(x|y|z|fd|id)$'



2 changes: 1 addition & 1 deletion .github/actions/setup_cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
using: "composite"
steps:
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
# You might want to add .ccache to your cache configuration?
path: |
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
# Keep GitHub Actions up to date
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
include: "scope"
4 changes: 2 additions & 2 deletions .github/workflows/auto-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.13
with:
source: '.'
exclude: './third_party ./external'
extensions: 'h,cpp,hpp'
clangFormatVersion: 12
inplace: True
- uses: EndBug/add-and-commit@v4
- uses: EndBug/add-and-commit@v9
with:
author_name: Clang Robot
author_email: robot@example.com
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- develop

env:
CLANG_TIDY_VERSION: "15.0.2"
CLANG_TIDY_VERSION: "20.1.0"
VERBOSE: 1

jobs:
Expand All @@ -29,13 +29,13 @@ jobs:
# and your own projects needs
matrix:
os:
- ubuntu-20.04
- macos-10.15
- windows-2019
- ubuntu-24.04
- macos-15
- windows-2025
compiler:
# you can specify the version after `-` like "llvm-15.0.2".
- llvm-15.0.2
- gcc-11
# you can specify the version after `-` like "llvm-20.1.0".
- llvm-20.1.0
- gcc-15
generator:
- "Ninja Multi-Config"
build_type:
Expand All @@ -49,26 +49,26 @@ jobs:

exclude:
# mingw is determined by this author to be too buggy to support
- os: windows-2019
compiler: gcc-11
- os: windows-2025
compiler: gcc-15

include:
# Add appropriate variables for gcov version required. This will intentionally break
# if you try to use a compiler that does not have gcov set
- compiler: gcc-11
- compiler: gcc-15
gcov_executable: gcov
enable_ipo: On

- compiler: llvm-15.0.2
- compiler: llvm-20.1.0
enable_ipo: Off
gcov_executable: "llvm-cov gcov"

- os: macos-10.15
- os: macos-15
enable_ipo: Off
enable_cppcheck: OFF
enable_clang_tidy: OFF

- os: ubuntu-20.04
- os: ubuntu-24.04
enable_clang_tidy: On
enable_cppcheck: On

Expand All @@ -79,8 +79,8 @@ jobs:
package_generator: TBZ2

# This exists solely to make sure a non-multiconfig build works
- os: ubuntu-20.04
compiler: gcc-11
- os: ubuntu-24.04
compiler: gcc-15
generator: "Unix Makefiles"
build_type: Debug
gcov_executable: gcov
Expand All @@ -91,7 +91,7 @@ jobs:


# Windows msvc builds
- os: windows-2022
- os: windows-2025
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Debug
Expand All @@ -101,7 +101,7 @@ jobs:
enable_cppcheck: Off


- os: windows-2022
- os: windows-2025
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Release
Expand All @@ -111,7 +111,7 @@ jobs:
enable_cppcheck: Off


- os: windows-2022
- os: windows-2025
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Debug
Expand All @@ -120,7 +120,7 @@ jobs:
enable_cppcheck: Off


- os: windows-2022
- os: windows-2025
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Release
Expand All @@ -130,7 +130,7 @@ jobs:
enable_cppcheck: Off


- os: windows-2022
- os: windows-2025
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Release
Expand All @@ -145,12 +145,12 @@ jobs:
steps:
- name: Check for llvm version mismatches
if: ${{ contains(matrix.compiler, 'llvm') && !contains(matrix.compiler, env.CLANG_TIDY_VERSION) }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('There is a mismatch between configured llvm compiler and clang-tidy version chosen')

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Cache
uses: ./.github/actions/setup_cache
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:


- name: Publish to codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
flags: ${{ runner.os }}
name: ${{ runner.os }}-coverage
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
compiler:
# you can specify the version after `-` like "llvm-13.0.0".
- gcc-11
# you can specify the version after `-` like "llvm-17.0.6".
- gcc-13
generator:
- "Ninja Multi-Config"
build_type:
Expand All @@ -48,7 +48,7 @@ jobs:


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Cache
uses: ./.github/actions/setup_cache
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -99,4 +99,4 @@ jobs:
cmake --build ./build --config ${{matrix.build_type}}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
61 changes: 61 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build WASM and Deploy to GitHub Pages

on:
pull_request:
release:
types: [published]
push:
branches: [main, develop]
tags: ['**']

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: 'latest'

- name: Install Ninja
run: sudo apt-get install -y ninja-build

- name: Configure CMake
run: emcmake cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: Build
run: emmake cmake --build build --target travels

- name: Prepare artifacts
run: |
mkdir -p dist
cp build/src/travels.html dist/index.html
cp build/src/travels.js dist/
cp build/src/travels.wasm dist/
cp build/src/coi-serviceworker.min.js dist/

- name: Determine deploy path
id: deploy-path
if: github.event_name != 'pull_request' && github.event_name != 'release'
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
echo "path=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
elif [[ "$GITHUB_REF" == refs/heads/main ]]; then
echo "path=." >> $GITHUB_OUTPUT
elif [[ "$GITHUB_REF" == refs/heads/develop ]]; then
echo "path=develop" >> $GITHUB_OUTPUT
fi

- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request' && github.event_name != 'release'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
destination_dir: ${{ steps.deploy-path.outputs.path }}
keep_files: true
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ project(
LANGUAGES CXX C)

include(cmake/PreventInSourceBuilds.cmake)


include(cmake/Emscripten.cmake)
include(ProjectOptions.cmake)


travels_setup_options()

# Create travels_options and travels_warnings FIRST before they're used
add_library(travels_warnings INTERFACE)
add_library(travels_options INTERFACE)

travels_global_options()
include(Dependencies.cmake)
travels_setup_dependencies()
Expand Down
11 changes: 6 additions & 5 deletions Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,24 @@ function(travels_setup_dependencies)
NAME
spdlog
VERSION
1.14.1
1.16.0
GITHUB_REPOSITORY
"gabime/spdlog"
OPTIONS
"SPDLOG_USE_STD_FORMAT ON")
endif()

if(NOT TARGET Catch2::Catch2WithMain)
cpmaddpackage("gh:catchorg/Catch2@3.7.0")
cpmaddpackage("gh:catchorg/Catch2@3.12.0")
endif()

# CLI11 used for argument parsing in both native and WASM builds
if(NOT TARGET CLI11::CLI11)
cpmaddpackage("gh:CLIUtils/CLI11@2.4.2")
cpmaddpackage("gh:CLIUtils/CLI11@2.6.1")
endif()

if(NOT TARGET ftxui::screen)
cpmaddpackage("gh:ArthurSonzogni/FTXUI@5.0.0")
cpmaddpackage("gh:ArthurSonzogni/FTXUI@6.1.9")
endif()

if(NOT TARGET cons_expr::cons_expr)
Expand All @@ -57,7 +58,7 @@ function(travels_setup_dependencies)


if(NOT TARGET nlohmann_json::nlohmann_json)
cpmaddpackage("gh:nlohmann/json@3.11.3")
cpmaddpackage("gh:nlohmann/json@3.12.0")
endif()

endfunction()
Loading
Loading