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
99 changes: 99 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# .gitattributes — C++ (GitHub-hosted)
#
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp),
# gitattributes/gitattributes C++.gitattributes + Common.gitattributes,
# github-linguist overrides.

# Default: detect text, normalize to LF in the repository
* text=auto

# --- Source ---
*.c text diff=cpp
*.c++ text diff=cpp
*.cc text diff=cpp
*.cpp text diff=cpp
*.cxx text diff=cpp
*.h text diff=cpp
*.h++ text diff=cpp
*.hh text diff=cpp
*.hpp text diff=cpp
*.hxx text diff=cpp
*.inc text
*.inl text
*.ipp text
*.tcc text
*.tpp text

# --- Build / config ---
*.am text
*.cmake text
*.m4 text
*.mak text
*.mk text
*akefile text
CMakeLists.txt text
configure text eol=lf
configure.ac text

# --- Scripts ---
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sh text eol=lf
*.zsh text eol=lf

# --- Docs / meta ---
*.adoc text
*.markdown text diff=markdown
*.md text diff=markdown
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
LICENSE text
NEWS text
README text
TODO text
.gitattributes text
.gitignore text

# --- Serialisation ---
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# --- Compiled / binary artefacts ---
*.a binary
*.dll binary
*.dylib binary
*.exe binary
*.gch binary
*.la binary
*.lai binary
*.lib binary
*.lo binary
*.o binary
*.obj binary
*.out binary
*.pch binary
*.slo binary
*.so binary

# --- Archives / images (common) ---
*.gif binary
*.gz binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.tar binary
*.zip binary

# --- GitHub Linguist ---
**/build/** linguist-generated
**/cmake-build-*/** linguist-generated
89 changes: 89 additions & 0 deletions .github/workflows/ci-cell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI cell

on:
workflow_call:
inputs:
cell-id:
required: true
type: string
os:
required: true
type: string
c-compiler:
required: true
type: string
cpp-compiler:
required: true
type: string
build-type:
required: false
type: string
default: Release

jobs:
cell:
name: ${{ inputs.cell-id }}
runs-on: ${{ inputs.os }}

steps:
- uses: actions/checkout@v4

- name: Setup MSYS2 MinGW
if: inputs.c-compiler == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make

- name: Configure
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.c-compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake -B build -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DBUILD_TESTING=OFF
else
cmake -B build -S . \
-DBUILD_TESTING=OFF
fi

- name: Build
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.c-compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake --build build --parallel 2
else
cmake --build build --config "${{ inputs.build-type }}" --parallel
fi

- name: Install and verify
shell: bash
run: |
set -euo pipefail
PREFIX="${RUNNER_TEMP}/install-prefix"
PROJECT="$(tr -d '[:space:]' < .sis/project_name.txt)"
if [ "${{ inputs.c-compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake --install build --prefix "$PREFIX"
else
cmake --install build --config "${{ inputs.build-type }}" --prefix "$PREFIX"
fi
test -f "$PREFIX/bin/${PROJECT}.exe"

- name: Smoke run
shell: bash
run: |
set -euo pipefail
PREFIX="${RUNNER_TEMP}/install-prefix"
PROJECT="$(tr -d '[:space:]' < .sis/project_name.txt)"
"$PREFIX/bin/${PROJECT}.exe"
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- master
- dev
- boilerplate
- idiomatic
- rc1
- rc2
- rc3
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
cell:
name: CI (${{ matrix.id }})
strategy:
fail-fast: false
matrix:
include:
- id: windows-cl
os: windows-latest
c_compiler: cl
cpp_compiler: cl
- id: windows-mingw
os: windows-latest
c_compiler: mingw
cpp_compiler: g++
uses: ./.github/workflows/ci-cell.yml
with:
cell-id: ${{ matrix.id }}
os: ${{ matrix.os }}
c-compiler: ${{ matrix.c_compiler }}
cpp-compiler: ${{ matrix.cpp_compiler }}
build-type: Release
1 change: 1 addition & 0 deletions .sis/project_name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ReadDebugString
2 changes: 2 additions & 0 deletions .sis/script_info_lines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ReadDebugString is a Windows CLI that reads messages from the Windows debugger
Copyright (c) 2026, Matthew Wilson and Synesis Information Systems
70 changes: 70 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json

set nocompatible
filetype indent plugin on
syntax enable
set autoindent
set backspace=indent,eol,start
set hlsearch
set incsearch
set number

" files.insertFinalNewline
set eol
set fixeol

" editor.renderWhitespace: all
set list
set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+

" editor.detectIndentation: false — global defaults (editor.tabSize: 4, insertSpaces: true)
set colorcolumn=76
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4

" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line).
" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes.
if has('termguicolors')
" set termguicolors
endif

function! s:ConfigureColorColumn() abort
highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE
endfunction

call s:ConfigureColorColumn()
autocmd ColorScheme * call s:ConfigureColorColumn()

" files.trimTrailingWhitespace
autocmd BufWritePre * %s/\s\+$//e

augroup sis_c_cxx
autocmd!

" [c] / [cpp]
autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76

" [rust]
autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76

" [cmake]
autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4

" [shellscript]
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76

" [bat]
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76

" [json] / [markdown] / [yaml] / [ruby]
autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2

" [python]
autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76

" [toml]
autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2
augroup END

Loading