Skip to content

Commit

Permalink
prepping for first public release
Browse files Browse the repository at this point in the history
  • Loading branch information
marzer committed Jul 29, 2023
1 parent f31bcb3 commit d944055
Show file tree
Hide file tree
Showing 130 changed files with 25,787 additions and 12,326 deletions.
6 changes: 4 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- SOAGEN_ABSTRACT_INTERFACE
- SOAGEN_CALLCONV
- SOAGEN_EMPTY_BASES
- SOAGEN_NODISCARD_CLASS
- SOAGEN_ABSTRACT_INTERFACE
- SOAGEN_TRIVIAL_ABI
- SOAGEN_VECTORCALL
- SOAGEN_CALLCONV
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
Expand Down Expand Up @@ -171,6 +171,7 @@ StatementMacros:
- SOAGEN_CONSTRAINED_TEMPLATE
- SOAGEN_CPP20_CONSTEXPR
- SOAGEN_DECLSPEC
- SOAGEN_HIDDEN_BASE
- SOAGEN_HIDDEN_CONSTRAINT
- SOAGEN_INLINE_GETTER
- SOAGEN_MALLOC
Expand All @@ -184,6 +185,7 @@ StatementMacros:
- __pragma
TabWidth: 4
TypenameMacros:
- SOAGEN_ENABLE_IF_T
UseCRLF: false
UseTab: Always
WhitespaceSensitiveMacros:
Expand Down
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ tab_width = 4
end_of_line = lf
trim_trailing_whitespace = true
charset = utf-8
max_line_length = 120

[*.{gitattributes,yml,vcxproj,vcxproj.filters,sln,rc,clang-format}]
[*.{gitattributes,yml,vcxproj,vcxproj.filters,sln,rc,clang-format,py}]
indent_style = space

[{Doxyfile,Doxyfile-mcss}]
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: marzer
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
name: Bug report
about: Regular ol' bugs.
title: ""
labels: ["bug"]
assignees: marzer
---

<!--
Replace the HTML comments below with the requested information.
Please don't delete this template and roll your own!
Also please *don't* paste screenshots of logs, compiler messages, et cetera.
Paste their actual text.
I can't copy/paste/search text from an image.
Thanks for contributing!
-->

## Environment

**soagen version**

<!--
soagen --version
-or-
Look at the top of soagen.hpp
-->

**Compiler:**

<!--
The compiler & version, e.g. "Clang 9"
-->

**C++ standard mode:**

<!--
The C++ standard level you were targeting, e.g. 17, 20, 'latest'
-->

**Target arch:**

<!--
The architecture you were targeting, e.g. x86, x64, ARM
-->

**Preprocessor overrides:**

<!--
If you've explicitly redefined any of the SOAGEN_XXXXXXX macros yourself,
please detail what you've changed them to
-->

**Relevant compilation flags:**

<!--
Any relevant compilation flags that might help me reproduce your issue exactly (e.g. -fno-exceptions).
-->

## Describe the bug

<!--
A clear and concise description of the bug goes here.
Please include compiler error messages as appropriate.
*DON'T PASTE SCREENSHOTS*
-->

## Steps to reproduce (or a small repro code sample)

<!--
As above. If you feel that the information you've already given covers it sufficiently and you don't
need this section, you can delete it.
-->

## Additional information

<!--
Any post-scripts, addendums, or additional pieces of context, as necessary.
*DON'T PASTE SCREENSHOTS*
-->
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Feature request
about: Want to see something added or improved? Tell me all about it.
title: ""
labels: ["feature"]
assignees: marzer
---

<!--
Replace the HTML comments below with the requested information.
Please don't delete this template and roll your own!
Thanks for contributing!
-->

**Is your feature request related to a problem? Please describe.**

<!--
"I'd like a way to Fooify all Bars in one go. Currently I have to iterate through them and
do it individually myself, which is cumbersome.
-->

**Describe the solution you'd like**

<!--
A helper function like fooify_all_bars() would be great.
-->

**Additional context**

<!--
Add any other context or screenshots about the feature request here.
-->
33 changes: 33 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
Please replace the HTML comments below with the requested information.
Thanks for contributing!
-->

**What does this change do?**

<!--
Changes all Foos to Bars.
--->

**Is it related to an exisiting bug report or feature request?**

<!--
Fixes #69.
--->

**Pre-merge checklist**

<!--
Not all of these will necessarily apply, particularly if you're not making a code change (e.g. fixing documentation).
That's OK. Tick the ones that do by placing an x in them, e.g. [x]
--->

- [ ] I've read [CONTRIBUTING.md]
- [ ] I've rebased my changes against the current HEAD of `origin/main` (if necessary)
- [ ] I've added new test cases to verify my change (if applicable)
- [ ] I've updated any affected documentation
- [ ] I've tested my changes
- [ ] I've regenerated the single-header version of `soagen.hpp` ([how-to])

[CONTRIBUTING.md]: https://github.com/marzer/soagen/blob/master/CONTRIBUTING.md
[how-to]: https://github.com/marzer/soagen/blob/master/CONTRIBUTING.md#modifying-soagenhpp
125 changes: 125 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: ci

on:
push:
branches-ignore:
- "gh-pages"
paths:
- "**.hpp"
- "**.cpp"
- "**.inl"
- "**/meson.build"
- "**/workflows/**.yaml"
pull_request:
branches-ignore:
- "gh-pages"
paths:
- "**.hpp"
- "**.cpp"
- "**.inl"
- "**/meson.build"
- "**/workflows/**.yaml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
clang_version: "15"
gcc_version: "12"

jobs:
linux:
strategy:
matrix:
compiler:
- "clang"
- "gcc"
linker:
- "lld"
type:
- "debug"
- "release"

runs-on: ubuntu-22.04

defaults:
run:
shell: bash

steps:
- name: Install base dependencies
run: |
sudo apt -y update
sudo apt -y install --no-install-recommends git python3 python3-pip ninja-build libstdc++-${{ env.gcc_version }}-dev
sudo -H pip3 install --no-cache-dir --upgrade meson
- name: Install lld
if: ${{ startsWith(matrix.linker, 'lld') }}
run: |
sudo apt -y install --no-install-recommends lld-${{ env.clang_version }}
sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${{ env.clang_version }} 1000
- name: Install clang
if: ${{ startsWith(matrix.compiler, 'clang') }}
run: |
sudo apt -y install --no-install-recommends clang-${{ env.clang_version }}
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ env.clang_version }} 1000
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ env.clang_version }} 1000
- name: Install gcc
if: ${{ startsWith(matrix.compiler, 'gcc') }}
run: |
sudo apt -y install --no-install-recommends gcc-${{ env.gcc_version }} g++-${{ env.gcc_version }}
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${{ env.gcc_version }} 1000
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${{ env.gcc_version }} 1000
- uses: actions/checkout@v3
with:
submodules: true

- name: Configure Meson
run: |
if [ ${{ matrix.compiler }} = gcc ]; then pch=false; else pch=true; fi
CC=cc CXX=c++ CXX_LD=${{ matrix.linker }} meson setup build --buildtype=${{ matrix.type }} -Dpedantic=true -Dbuild_tests=true -Dbuild_examples=true -Db_pch=$pch
- name: Build
run: meson compile -C build --jobs -1

- name: Test
run: meson test -C build --verbose

windows:
strategy:
matrix:
type:
- "debug"
- "release"

runs-on: windows-2022

defaults:
run:
shell: cmd

steps:
- name: Install dependencies
run: |
python3 -m pip install -U pip==21.3.1
pip3 install --no-cache-dir --upgrade meson ninja
- uses: actions/checkout@v3
with:
submodules: true

- uses: ilammy/msvc-dev-cmd@v1

- name: Configure Meson
run: meson setup build --vsenv --buildtype=${{ matrix.type }} -Dpedantic=true -Dbuild_tests=true

- name: Build
run: meson compile -C build --jobs -1

- name: Test
run: meson test -C build --verbose
41 changes: 41 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: gh-pages

on:
push:
branches:
- main
paths:
- "**.hpp"
- "**.dox"
- "**.md"
- "docs/**"
- "**/gh-pages.yaml"
workflow_dispatch:

jobs:
gh-pages:
runs-on: ubuntu-latest

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install --no-install-recommends git python3 python3-pip doxygen
sudo -H pip3 install --upgrade poxy
- name: Generate docs
run: |
cd docs
poxy --verbose
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
soagen_bug_report.zip
docs/html
docs/xml
subprojects/*/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"endOfLine": "lf",
"printWidth" : 120
}
Loading

0 comments on commit d944055

Please sign in to comment.