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
50 changes: 13 additions & 37 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: CMake on multiple platforms

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main", "*" ]
branches: ["main", "*"]

jobs:
build:
Expand All @@ -23,40 +23,24 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
# windows
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
# ubuntu
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
# macos
- os: macos-latest
c_compiler: gcc
cpp_compiler: g++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
cpp_compiler: [g++, clang++, cl]
exclude:
# windows
- os: windows-latest
c_compiler: gcc
cpp_compiler: g++
- os: windows-latest
c_compiler: clang
cpp_compiler: clang++
# ubuntu
- os: ubuntu-latest
c_compiler: cl
cpp_compiler: cl
# ubuntu
- os: ubuntu-24.04-arm
cpp_compiler: cl
# macos
- os: macos-latest
c_compiler: cl
cpp_compiler: cl

steps:
- uses: actions/checkout@v4
Expand All @@ -74,7 +58,6 @@ jobs:
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}

Expand All @@ -83,19 +66,12 @@ jobs:
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Upload example executables
if: ${{ runner.os == 'Windows' }}
uses: actions/upload-artifact@v4
with:
name: examples_${{ matrix.os }}_${{ matrix.c_compiler }}
path: ${{ steps.strings.outputs.build-output-dir }}/Release/*

- name: Upload example executables
if: ${{ runner.os != 'Windows' }}
uses: actions/upload-artifact@v4
with:
name: examples_${{ matrix.os }}_${{ matrix.c_compiler }}
name: cpptui-examples_${{ runner.os }}_${{ runner.arch }}_${{ matrix.cpp_compiler }}
path: |
${{ steps.strings.outputs.build-output-dir }}/*
!${{ steps.strings.outputs.build-output-dir }}/*/*
!${{ steps.strings.outputs.build-output-dir }}/*.*
!${{ steps.strings.outputs.build-output-dir }}/*Makefile
${{ steps.strings.outputs.build-output-dir }}/Release/*
2 changes: 1 addition & 1 deletion examples/snake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ int main() {

} catch (...) {
tui::reset();
std::cerr << "unknown error occured\n";
std::cerr << "unknown error occurred\n";
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace tui {
#define csi_fn(name, ...) \
inline void name() { csi(__VA_ARGS__) }

// ANSII Escape Sequnce
// ANSII Escape Sequence
#define esc(...) std::cout << concat("\x1B", __VA_ARGS__);
// function using ANSII Escape Sequence
#define esc_fn(name, ...) \
Expand Down