Skip to content

Commit 50e858a

Browse files
Boilerplate, CI (#11)
* markdown files * chore(c-cpp): union files.associations from ~/dev vscode settings Give the 28 in-wave C/C++ projects (and gold **c** / **cxx** / **c_cxx** templates) a sorted **files.associations** union of all associations found under **~/dev**; * .gitattributes * .vscode/settings.json * .vimrc * .sis * chore(<lib>): use computed PREFIX_VER with documented PATCH Align library version macros to c-cpp-standards. Define MAJOR, MINOR, PATCH, and ALPHABETA; compute PREFIX_VER by shifts; keep REVISION as a skip-section alias of PATCH (target at column 60); retain named historical VER_* constants only for comparison and documentation. * test: add canonical scratch versions reporter Add a Phase 3 gold version printer under test/scratch/versions, wire it from the scratch parent list, and use CMake target/argv0 versions; * .gitattributes * fix(c-cpp): quote Dir resolution in CMake helper scripts Use Dir=$(cd "$(dirname "$ScriptPath")" && pwd) so paths with spaces resolve reliably; apply the same one-line fix across in-wave helper scripts (prepare/build/clean/ctest/remove and run_all_*). * chore(helper scripts): adopt SisClr CMake helpers from gold tip Replace the MakeCmd helper set with misc-dev-scripts cmake-helpers b92fdfc: - common scripts are byte-identical, including native run_all_*.cmd; - unit and component runners forward --verbosity; - examples, scratch, and performance runners take no extra arguments; - prepare keeps --bdut-root-dir, --stlsoft-root-dir, and --use-stlsoft; - MSYSTEM no longer selects the MinGW generator. * chore(scratch tests): name the scratch version reporter test.scratch.versions Rename the scratch reporter target from versions to test.scratch.versions so run_all_scratch_tests matches it. The source directory stays test/scratch/versions. Helper scripts are unchanged. Suggested * chore(libpath): gold helpers, modular CI, and Phase 8 docs Bring libpath to the Synesis C/C++ gold bar on boilerplate: - Copy examples/scratch runners from cmake-helpers @dfa6add; keep prepare_cmake.sh SimulateWindowsOnUnix and --stlsoft-root-dir; - Set test.scratch.versions PROGRAM_NAME; drop dead PRIVATE STLSoft link from core; absorb MSVC_USE_MT in CMakeLists.txt; - Add install-sis-deps, ci.yml + ci-cell (STLSoft xTests), Windows .cmd dogfood, execute-bit restore, install-smoke; README CI badge; - Create CHANGES.md from HISTORY, upgrade NEWS to three-column Details, remove subsumed HISTORY.md; list example.cpp.parse.1 as allowed-to-fail; * chore(libpath): gold helpers, modular CI, and Phase 8 docs Bring libpath to the Synesis C/C++ gold bar on boilerplate: - Copy examples/scratch runners from cmake-helpers @dfa6add; keep prepare_cmake.sh SimulateWindowsOnUnix and --stlsoft-root-dir; - Set test.scratch.versions PROGRAM_NAME; drop dead PRIVATE STLSoft link from core; absorb MSVC_USE_MT; register unit tests via add_test; fix test.unit.parse.c Windows offsets / UNC compile; - Add install-sis-deps, ci.yml + ci-cell (STLSoft xTests), Windows .cmd dogfood, execute-bit restore, install-smoke; README CI badge; - Create CHANGES.md from HISTORY, upgrade NEWS to three-column Details, remove subsumed HISTORY.md; list example.cpp.parse.1 as allowed-to-fail; * chore(libpath): gold helpers, modular CI, and Phase 8 docs Bring libpath to the Synesis C/C++ gold bar on boilerplate: - Copy examples/scratch runners from cmake-helpers @dfa6add; keep prepare_cmake.sh SimulateWindowsOnUnix and --stlsoft-root-dir; - Set test.scratch.versions PROGRAM_NAME; drop dead PRIVATE STLSoft link from core; absorb MSVC_USE_MT; register unit tests via add_test; fix test.unit.parse.c Windows offsets / UNC compile; - Add install-sis-deps, ci.yml + ci-cell (STLSoft xTests), Windows .cmd dogfood, execute-bit restore (exclude CMakeFiles / *.d / *.o / *.obj per Pantheios), install-smoke; README CI badge; - Create CHANGES.md from HISTORY, upgrade NEWS to three-column Details, remove subsumed HISTORY.md; list example.cpp.parse.1 as allowed-to-fail;
1 parent adaac20 commit 50e858a

42 files changed

Lines changed: 4000 additions & 503 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
root = true
2+
3+
# Language indent/EOL/charset overlap with .vscode/settings.json.
4+
# Rulers, renderWhitespace, detectIndentation, mergeEditor, and
5+
# language-server settings cannot be expressed here — they stay in
6+
# settings.json.
7+
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
indent_size = 2
12+
indent_style = tab
13+
insert_final_newline = true
14+
trim_trailing_whitespace = true
15+
16+
# [bat]
17+
[*.{bat,cmd}]
18+
end_of_line = crlf
19+
indent_size = 4
20+
indent_style = space
21+
22+
# [c]
23+
[*.{c,h}]
24+
indent_size = 4
25+
indent_style = space
26+
27+
# [cmake]
28+
[{CMakeLists.txt,*.cmake}]
29+
indent_size = 4
30+
indent_style = tab
31+
32+
# [cpp]
33+
[*.{cpp,cxx,hpp,hxx}]
34+
indent_size = 4
35+
indent_style = space
36+
37+
# [json]
38+
[*.json]
39+
indent_size = 2
40+
indent_style = space
41+
42+
# [markdown]
43+
[*.md]
44+
indent_size = 2
45+
indent_style = space
46+
47+
# [shellscript]
48+
[*.{bash,sh,zsh}]
49+
indent_size = 2
50+
indent_style = space
51+
52+
# [yaml]
53+
[*.{yaml,yml}]
54+
indent_size = 2
55+
indent_style = space

‎.gitattributes‎

Lines changed: 121 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,126 @@
1-
*.c linguist-language=C
2-
*.h linguist-language=C
1+
# .gitattributes — C / C++ (GitHub-hosted)
2+
#
3+
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp),
4+
# gitattributes/gitattributes C++.gitattributes + Common.gitattributes,
5+
# github-linguist overrides.
6+
#
7+
# Linguist language-bar policy (Synesis): classify public C API headers as C
8+
# and *.cmake as CMake scripts; keep helper scripts, IDE project files, and
9+
# CMakeLists.txt config out of the advertised language mix. Prefer
10+
# -linguist-detectable over linguist-detectable=false.
311

4-
*.cpp linguist-language=C++
5-
*.hpp linguist-language=C++
6-
*.cxx linguist-language=C++
7-
*.hxx linguist-language=C++
12+
# Default: detect text, normalize to LF in the repository
13+
* text=auto
814

9-
*.cmake linguist-language=CMake
15+
# --- Source ---
16+
*.c text diff=cpp
17+
*.c++ text diff=cpp
18+
*.cc text diff=cpp
19+
*.cpp text diff=cpp
20+
*.cxx text diff=cpp
21+
*.h text diff=cpp
22+
*.h++ text diff=cpp
23+
*.hh text diff=cpp
24+
*.hpp text diff=cpp
25+
*.hxx text diff=cpp
26+
*.inc text
27+
*.inl text
28+
*.ipp text
29+
*.tcc text
30+
*.tpp text
31+
32+
# --- Build / config ---
33+
*.am text
34+
*.cmake text
35+
*.m4 text
36+
*.mak text
37+
*.mk text
38+
*akefile text
39+
CMakeLists.txt text
40+
configure text eol=lf
41+
configure.ac text
42+
43+
# --- Scripts ---
44+
*.bash text eol=lf
45+
*.bat text eol=crlf
46+
*.cmd text eol=crlf
47+
*.ps1 text eol=crlf
48+
*.sh text eol=lf
49+
*.zsh text eol=lf
50+
51+
# --- Docs / meta ---
52+
*.adoc text
53+
*.markdown text diff=markdown
54+
*.md text diff=markdown
55+
*.txt text
56+
AUTHORS text
57+
CHANGELOG text
58+
CHANGES text
59+
CONTRIBUTING text
60+
COPYING text
61+
LICENSE text
62+
NEWS text
63+
README text
64+
TODO text
65+
.gitattributes text
66+
.gitignore text
1067

11-
*.cmd linguist-detectable=false
12-
*.html linguist-detectable=false
13-
*.sh linguist-detectable=false
14-
*.dsp linguist-detectable=false
15-
*.dsw linguist-detectable=false
16-
*.sln linguist-detectable=false
17-
*.vimrc linguist-detectable=false
18-
*.vcxproj linguist-detectable=false
68+
# --- Serialisation ---
69+
*.json text
70+
*.toml text
71+
*.xml text
72+
*.yaml text
73+
*.yml text
1974

20-
CMakeLists.txt linguist-language=CMake
21-
makefile linguist-detectable=false
75+
# --- Compiled / binary artefacts ---
76+
*.a binary
77+
*.dll binary
78+
*.dylib binary
79+
*.exe binary
80+
*.gch binary
81+
*.la binary
82+
*.lai binary
83+
*.lib binary
84+
*.lo binary
85+
*.o binary
86+
*.obj binary
87+
*.out binary
88+
*.pch binary
89+
*.slo binary
90+
*.so binary
91+
92+
# --- Archives / images (common) ---
93+
*.gif binary
94+
*.gz binary
95+
*.ico binary
96+
*.jpeg binary
97+
*.jpg binary
98+
*.png binary
99+
*.tar binary
100+
*.zip binary
101+
102+
# --- GitHub Linguist ---
103+
**/build/** linguist-generated
104+
**/cmake-build-*/** linguist-generated
105+
106+
# Classification (C-primary / C API with C++ tests; *.cmake as CMake scripts)
107+
*.c linguist-language=C
108+
*.cmake linguist-language=CMake
109+
*.cpp linguist-language=C++
110+
*.cxx linguist-language=C++
111+
*.h linguist-language=C
112+
*.hpp linguist-language=C++
113+
*.hxx linguist-language=C++
22114

115+
# Keep the bar on library languages (helpers / legacy IDE / docs /
116+
# CMakeLists.txt config; leave *.cmake detectable as CMake)
117+
*.cmd -linguist-detectable
118+
*.dsp -linguist-detectable
119+
*.dsw -linguist-detectable
120+
*.html -linguist-detectable
121+
*.sh -linguist-detectable
122+
*.sln -linguist-detectable
123+
*.vcxproj -linguist-detectable
124+
*.vimrc -linguist-detectable
125+
CMakeLists.txt -linguist-detectable
126+
makefile -linguist-detectable
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Install Synesis dependencies
2+
description: >-
3+
Clones, builds, and installs the named Synesis Information Systems
4+
dependencies into a single CMake prefix, and exports that prefix both as
5+
the SIS_DEPS environment variable and as the `prefix` output.
6+
7+
inputs:
8+
build-type:
9+
description: CMake build type, for single-configuration generators
10+
required: false
11+
default: Release
12+
c-compiler:
13+
description: C compiler name, or the selector `cl`
14+
required: true
15+
cpp-compiler:
16+
description: C++ compiler name; unused for the `cl` selector
17+
required: true
18+
dependencies:
19+
description: >-
20+
Whitespace-separated synesissoftware repository names, in dependency
21+
order. Each is configured against those already installed, so this
22+
list is deliberately NOT in lexicographic order.
23+
required: true
24+
install-prefix:
25+
description: Directory into which every dependency is installed
26+
required: false
27+
default: ''
28+
toolchain:
29+
description: >-
30+
Toolchain selector, for a toolchain that is not implied by the compiler
31+
names and needs its own generator; presently only `mingw`. Empty
32+
otherwise, in which case the compiler names alone select the toolchain.
33+
required: false
34+
default: ''
35+
36+
outputs:
37+
prefix:
38+
description: Directory into which every dependency was installed
39+
value: ${{ steps.install.outputs.prefix }}
40+
41+
runs:
42+
using: composite
43+
44+
steps:
45+
- id: install
46+
shell: bash
47+
run: |
48+
set -euo pipefail
49+
50+
PREFIX="${{ inputs.install-prefix }}"
51+
[ -n "$PREFIX" ] || PREFIX="${RUNNER_TEMP}/sis-deps"
52+
53+
mkdir -p "$PREFIX"
54+
55+
if [ "${{ inputs.toolchain }}" = "mingw" ]; then
56+
export PATH="/mingw64/bin:$PATH"
57+
fi
58+
59+
for dep in ${{ inputs.dependencies }}; do
60+
61+
echo "::group::Installing $dep"
62+
63+
SRC="${RUNNER_TEMP}/${dep}-src"
64+
BUILD="${RUNNER_TEMP}/${dep}-build"
65+
66+
git clone --depth 1 "https://github.com/synesissoftware/${dep}" "$SRC"
67+
68+
# NOTE: the generator and the build-type/compiler options are the
69+
# *only* things that may differ between these paths; every other
70+
# -D option is passed in all cases, so that no branch can silently
71+
# ignore one.
72+
if [ "${{ inputs.c-compiler }}" = "cl" ]; then
73+
cmake -S "$SRC" -B "$BUILD" \
74+
-DBUILD_EXAMPLES=OFF \
75+
-DBUILD_TESTING=OFF \
76+
-DCMAKE_DISABLE_FIND_PACKAGE_MFC=TRUE \
77+
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
78+
-DCMAKE_PREFIX_PATH="$PREFIX"
79+
cmake --build "$BUILD" --config "${{ inputs.build-type }}" --parallel
80+
cmake --install "$BUILD" --config "${{ inputs.build-type }}"
81+
elif [ "${{ inputs.toolchain }}" = "mingw" ]; then
82+
cmake -S "$SRC" -B "$BUILD" -G "MinGW Makefiles" \
83+
-DBUILD_EXAMPLES=OFF \
84+
-DBUILD_TESTING=OFF \
85+
-DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \
86+
-DCMAKE_C_COMPILER="${{ inputs.c-compiler }}" \
87+
-DCMAKE_CXX_COMPILER="${{ inputs.cpp-compiler }}" \
88+
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
89+
-DCMAKE_PREFIX_PATH="$PREFIX"
90+
cmake --build "$BUILD" --parallel 2
91+
cmake --install "$BUILD"
92+
else
93+
cmake -S "$SRC" -B "$BUILD" \
94+
-DBUILD_EXAMPLES=OFF \
95+
-DBUILD_TESTING=OFF \
96+
-DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \
97+
-DCMAKE_C_COMPILER="${{ inputs.c-compiler }}" \
98+
-DCMAKE_CXX_COMPILER="${{ inputs.cpp-compiler }}" \
99+
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
100+
-DCMAKE_PREFIX_PATH="$PREFIX"
101+
cmake --build "$BUILD" --parallel
102+
cmake --install "$BUILD"
103+
fi
104+
105+
echo "::endgroup::"
106+
done
107+
108+
echo "prefix=$PREFIX" >> "$GITHUB_OUTPUT"
109+
echo "SIS_DEPS=$PREFIX" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)