Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
dc7b523
set -ferror-limit=0 on clang to prevent errors in clangd
braxtons12 Jul 9, 2025
2880c73
Fix CI?
braxtons12 Jul 9, 2025
d925ce9
Fix CI?
braxtons12 Jul 9, 2025
e00a8d4
Fix CI?
braxtons12 Jul 9, 2025
a2dc3e4
Drop llvm 15 support and fix(?) llvm20
braxtons12 Jul 9, 2025
78fb39d
Fix clang 19 build with xmake
braxtons12 Jul 9, 2025
82fed5e
Fix docs build?\
braxtons12 Jul 9, 2025
49b4c99
Fix docs build?
braxtons12 Jul 9, 2025
d4f02c7
Fix windows XMake build?
braxtons12 Jul 10, 2025
07d9acf
change llvm versions in CI
braxtons12 Jul 10, 2025
b022188
Drop llvm 15 from CI
braxtons12 Jul 10, 2025
a9540de
Fix doc install steps?
braxtons12 Jul 10, 2025
e0e1f20
fix mac xmake builds
braxtons12 Jul 10, 2025
13d0cac
Fix xmake mac build?
braxtons12 Jul 10, 2025
78df01d
Fix mac build?
braxtons12 Jul 10, 2025
b1041fc
Fix mac build?
braxtons12 Jul 10, 2025
6526f26
Fix mac xmake build?
braxtons12 Jul 10, 2025
27a2152
Fix xmake mac build?
braxtons12 Jul 10, 2025
faa38af
debug xmake mac toolchains
braxtons12 Jul 10, 2025
4079052
debug xmake mac
braxtons12 Jul 10, 2025
b67c940
debug xmake mac
braxtons12 Jul 10, 2025
9e209e5
debug xmake mac build
braxtons12 Jul 10, 2025
9a7b1eb
Fix warning on clang 19 and 20
braxtons12 Jul 10, 2025
5ec44ff
debug xmake mac build on clang 19 and 20
braxtons12 Jul 10, 2025
d41f434
debug xmake mac clang 19, 20
braxtons12 Jul 10, 2025
b400808
debug xmake mac build
braxtons12 Jul 10, 2025
2a56593
debug xmake mac build
braxtons12 Jul 10, 2025
2d5a97d
Debug xmake mac build
braxtons12 Jul 10, 2025
4e08f12
debug macos xmake build
braxtons12 Jul 10, 2025
14e2c59
debug xmake mac build
braxtons12 Jul 10, 2025
f4d9be0
debug xmake mac build
braxtons12 Jul 10, 2025
76d6ef1
debug xmake mac build
braxtons12 Jul 10, 2025
ec1cbe0
mac/bsd sed is wack
braxtons12 Jul 10, 2025
b82e765
disable clang-tidy on xmake macos clang19 and clang20 builds
braxtons12 Jul 10, 2025
1a29845
bump version
braxtons12 Jul 10, 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
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Checks: 'cert-*,clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,hicpp-*,google-*,misc-*,modernize-*,performance-*,portability-*,readability-*,bugprone-*,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes,-google-readability-casting,-clang-analyzer-optin.cplusplus.UninitializedObject,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.NullDereference'
WarningsAsErrors: 'cert-*,clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,hicpp-*,google-*,misc-*,modernize-*,performance-*,portability-*,readability-*,bugprone-*,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes,-google-readability-casting,-clang-analyzer-optin.cplusplus.UninitializedObject,-clang-analyzer-cplusplus.NewDeleteLeaks,-misc-include-cleaner,-clang-analyzer-core.NullDereference'
HeaderFilterRegex: '(hyperion)$'
AnalyzeTemporaryDtors: true
FormatStyle: none
User: braxton
UseColor: true
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [12, 13]
version: [12, 13, 14]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [15, 16, 17, 18]
version: [16, 17, 18, 19, 20]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -60,11 +60,21 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get -y install clang-tidy-${{matrix.version}}
if [[ ${{matrix.version}} == 20 \
]]; then
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get install -y clang-tidy-${{matrix.version}}
else
sudo apt-get install -y llvm-${{matrix.version}} clang-${{matrix.version}} clang-tidy-${{matrix.version}}
fi

- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f
run: |
if [[ "$(realpath --canonicalize-existing /usr/bin/clang-tidy-${{matrix.version}})" \
!= "$(realpath --canonicalize-existing /usr/bin/clang-tidy)" \
]]; then
sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f
fi

- name: Configure
env:
Expand Down Expand Up @@ -132,7 +142,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
version: [15, 16, 17, 18]
version: [16, 17, 18, 19, 20]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -141,7 +151,7 @@ jobs:
- name: Install LLVM
run: |
brew install llvm@${{matrix.version}}
echo "PATH=$(brew --prefix llvm@${{matrix.version}})/bin:$PATH" >> $GITHUB_ENV
echo "$(brew --prefix llvm@${{matrix.version}})/bin" >> $GITHUB_PATH
echo "CC=$(brew --prefix llvm@${{matrix.version}})/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@${{matrix.version}})/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS='-L$(brew --prefix llvm@${{matrix.version}})/lib/c++ -Wl,-rpath,$(brew --prefix llvm@${{matrix.version}})/lib/c++'" >> $GITHUB_ENV
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Update apt
run: sudo apt-get -y update

- name: Install Doxygen
run: sudo apt-get -y install doxygen

- name: Install Graphviz
run: sudo apt-get -y install graphviz

- name: Install LibGS
run: sudo apt-get -y install libgs9 libgs9-common
run: sudo apt-get -y install libgs10 libgs10-common

- name: Install GCC 12
run: sudo apt-get -y install gcc-12
Expand Down
51 changes: 34 additions & 17 deletions .github/workflows/xmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [12, 13]
version: [12, 13, 14]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [15, 16, 17, 18]
version: [16, 17, 18, 19, 20]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -79,11 +79,21 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get -y install clang-tidy-${{matrix.version}}
if [[ ${{matrix.version}} == 20 \
]]; then
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get install -y clang-tidy-${{matrix.version}}
else
sudo apt-get install -y llvm-${{matrix.version}} clang-${{matrix.version}} clang-tidy-${{matrix.version}}
fi

- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f
run: |
if [[ "$(realpath --canonicalize-existing /usr/bin/clang-tidy-${{matrix.version}})" \
!= "$(realpath --canonicalize-existing /usr/bin/clang-tidy)" \
]]; then
sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f
fi

- name: Configure
working-directory: ${{github.workspace}}
Expand Down Expand Up @@ -143,9 +153,6 @@ jobs:
- name: Install XMake
run: |
scoop install xmake
xmake update -sfy master
Start-Sleep -Seconds 2
xmake update -fy master

- name: Configure
working-directory: ${{github.workspace}}
Expand Down Expand Up @@ -182,7 +189,7 @@ jobs:
runs-on: macos-13
strategy:
matrix:
version: [15, 16, 17, 18]
version: [16, 17, 18, 19, 20]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -196,22 +203,32 @@ jobs:
- name: Install LLVM
run: |
brew install llvm@${{matrix.version}}
echo "PATH=$(brew --prefix llvm@${{matrix.version}})/bin:$PATH" >> $GITHUB_ENV
echo "CC=$(brew --prefix llvm@${{matrix.version}})/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@${{matrix.version}})/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS='-L$(brew --prefix llvm@${{matrix.version}})/lib/c++ -Wl,-rpath,$(brew --prefix llvm@${{matrix.version}})/lib/c++'" >> $GITHUB_ENV
echo "$(brew --prefix llvm@${{matrix.version}})/bin"
ln -s "$(brew --prefix llvm@${{matrix.version}})/bin/clang++" "$(brew --prefix llvm@${{matrix.version}})/bin/clang++-${{matrix.version}}"
ls "$(brew --prefix llvm@${{matrix.version}})/bin"
echo "$(brew --prefix llvm@${{matrix.version}})/bin" >> $GITHUB_PATH

- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=clang --hyperion_enable_tracy=y
run: |
xmake show -l toolchains
xmake f -c -y --toolchain=clang-${{matrix.version}} --hyperion_enable_tracy=y
xmake project -k compile_commands
sed -i '' 's/"-I"/"-isystem"/g' compile_commands.json
cat compile_commands.json

- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b
xmake check clang.tidy
# disable clang-tidy on clang 19 and 20 because it is scanning errors
# within standard library headers
if [[ ${{matrix.version}} != 19 && ${{matrix.version}} != 20 \
]]; then
xmake check clang.tidy
fi

- name: Test
env:
Expand All @@ -230,6 +247,6 @@ jobs:
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=clang "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-${{matrix.version}} "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
project(hyperion_platform LANGUAGES CXX VERSION 0.5.3)
project(hyperion_platform LANGUAGES CXX VERSION 0.5.4)

include(CTest)

Expand Down
2 changes: 1 addition & 1 deletion cmake/hyperion_compiler_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function(hyperion_compile_settings TARGET)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMILER_ID STREQUAL "clang")
target_compile_options(${TARGET} ${PUBLIC_VISIBILITY} -fsized-deallocation)
target_compile_options(${TARGET} ${PUBLIC_VISIBILITY} -fsized-deallocation -ferror-limit=0)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMILER_ID STREQUAL "clang")
Expand Down
5 changes: 3 additions & 2 deletions src/test_main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// @file test_main.cpp
/// @author Braxton Salyer <braxtonsalyer@gmail.com>
/// @brief Unit tests main for hyperion::platform.
/// @version 0.1
/// @date 2024-09-22
/// @version 0.1.1
/// @date 2025-07-09
///
/// MIT License
/// @copyright Copyright (c) 2024 Braxton Salyer <braxtonsalyer@gmail.com>
Expand All @@ -25,6 +25,7 @@
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
/// SOFTWARE.

#include <hyperion/platform.h>
#include <hyperion/platform/types.h>

#include <boost/ut.hpp>
Expand Down
4 changes: 2 additions & 2 deletions xmake.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---@diagnostic disable: undefined-global,undefined-field
set_project("hyperion_platform")
set_version("0.5.3")
set_version("0.5.4")

set_xmakever("2.8.7")
set_xmakever("3.0.0")

set_languages("cxx20")

Expand Down
8 changes: 7 additions & 1 deletion xmake/hyperion_compiler_settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ end

local function _set_compile_options(target)
if is_mode("release") then
target:set("optimize", "aggressive")
if target:has_tool("cxx", "clang", "clang++") then
-- clang 19 deprecates -Ofast, so just use -O3 on clang
target:set("optimize", "fastest")
else
target:set("optimize", "aggressive")
end
if target:has_tool("cxx", "cl") then
-- do not enable avx512 on MSVC is it has an optimizer error
-- that will cause a crash due to misalignment
Expand Down Expand Up @@ -50,6 +55,7 @@ local function _set_compile_options(target)
target:add("cxflags", "/sdl", { public = false })
elseif target:has_tool("cxx", "clang", "clang++") then
target:add("cxflags", "-fsized-deallocation", { public = true })
target:add("cxflags", "-ferror-limit=0", { public = true })
end
end

Expand Down