summaryrefslogtreecommitdiff
path: root/tomlplusplus/.github
diff options
context:
space:
mode:
Diffstat (limited to 'tomlplusplus/.github')
-rw-r--r--tomlplusplus/.github/FUNDING.yml1
-rw-r--r--tomlplusplus/.github/ISSUE_TEMPLATE/bug_report.md98
-rw-r--r--tomlplusplus/.github/ISSUE_TEMPLATE/config.yml1
-rw-r--r--tomlplusplus/.github/ISSUE_TEMPLATE/feature_request.md38
-rw-r--r--tomlplusplus/.github/ISSUE_TEMPLATE/spec_bug_report.md55
-rw-r--r--tomlplusplus/.github/pull_request_template.md38
-rw-r--r--tomlplusplus/.github/workflows/ci.yaml200
-rw-r--r--tomlplusplus/.github/workflows/cifuzz.yml39
-rw-r--r--tomlplusplus/.github/workflows/gh-pages.yaml48
9 files changed, 518 insertions, 0 deletions
diff --git a/tomlplusplus/.github/FUNDING.yml b/tomlplusplus/.github/FUNDING.yml
new file mode 100644
index 0000000000..c1c954eb2a
--- /dev/null
+++ b/tomlplusplus/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: marzer
diff --git a/tomlplusplus/.github/ISSUE_TEMPLATE/bug_report.md b/tomlplusplus/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000000..6b2709c26b
--- /dev/null
+++ b/tomlplusplus/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,98 @@
+---
+name: Bug report
+about: Regular ol' bugs.
+title: ''
+labels: [ "bug" ]
+assignees: marzer
+
+---
+
+<!--
+ Replace the HTML comments below with the requested information.
+
+ Please be as thorough as possible, and don't delete this template and roll your own.
+ I'm a human being with a busy life and concerns of my own - if you force me to jump through many
+ information-gathering hoops without first making an effort yourself, there's a high chance I'll
+ summarily close your issue as 'not a bug'.
+
+ 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
+**toml++ version and/or commit hash:**
+<!--
+ If you're using the single-header version of the library, the version number is right at the top of the file.
+ Otherwise you can find it by opening toml++/impl/version.h; it'll be represented by three defines -
+ TOML_LIB_MAJOR, TOML_LIB_MINOR and TOML_LIB_PATCH.
+
+ If you're not using any particular release and have just cloned the repository directly,
+ please also include the the commit hash.
+-->
+
+
+**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
+-->
+
+
+
+**Library configuration overrides:**
+<!--
+ If you've explicitly set any of the library configuration macros,
+ list them here (e.g. TOML_EXCEPTIONS=0, TOML_ENABLE_UNRELEASED_FEATURES=1, etc.)
+-->
+
+
+
+**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*
+-->
diff --git a/tomlplusplus/.github/ISSUE_TEMPLATE/config.yml b/tomlplusplus/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000000..3ba13e0cec
--- /dev/null
+++ b/tomlplusplus/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
diff --git a/tomlplusplus/.github/ISSUE_TEMPLATE/feature_request.md b/tomlplusplus/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000000..76688cdadc
--- /dev/null
+++ b/tomlplusplus/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,38 @@
+---
+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.
+-->
diff --git a/tomlplusplus/.github/ISSUE_TEMPLATE/spec_bug_report.md b/tomlplusplus/.github/ISSUE_TEMPLATE/spec_bug_report.md
new file mode 100644
index 0000000000..fbb3aeacd8
--- /dev/null
+++ b/tomlplusplus/.github/ISSUE_TEMPLATE/spec_bug_report.md
@@ -0,0 +1,55 @@
+---
+name: TOML spec conformance bug
+about: Bugs relating to the library's TOML spec conformance (or lack thereof).
+title: ''
+labels: [ "bug", "TOML spec" ]
+assignees: marzer
+
+---
+
+<!--
+ Replace the HTML/TOML comments below with the requested information.
+ Please don't delete this template and roll your own!
+
+ Thanks for contributing!
+-->
+
+
+## The non-conforming TOML snippet
+```toml
+
+# your TOML here
+
+```
+
+
+## What you expected
+<!--
+ e.g. a link to, or snippet from, the TOML spec, or some reasonable description thereof
+-->
+
+
+## What you got
+<!--
+ e.g toml-test output
+-->
+
+
+## Environment
+**toml++ version and/or commit hash:**
+<!--
+ If you're using the single-header version of the library, the version number is right at the top of the file.
+ Otherwise you can find it by opening toml++/impl/version.h; it'll be represented by three defines -
+ TOML_LIB_MAJOR, TOML_LIB_MINOR and TOML_LIB_PATCH.
+
+ If you're not using any particular release and are instead just living large at HEAD of master, the commit hash
+ would be super helpful too, though it's not critical.
+
+-->
+
+**Any other useful information:**
+<!--
+ Anything else you think will help me fix the issue. Since this report is for general spec conformance handling
+ you probably don't need to worry about compiler versions, compilation flags, et cetera, though include them if
+ you feel they're relevant.
+-->
diff --git a/tomlplusplus/.github/pull_request_template.md b/tomlplusplus/.github/pull_request_template.md
new file mode 100644
index 0000000000..4632299fe4
--- /dev/null
+++ b/tomlplusplus/.github/pull_request_template.md
@@ -0,0 +1,38 @@
+<!--
+ 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/master` (if necessary)
+- [ ] I've added new test cases to verify my change
+- [ ] I've regenerated toml.hpp ([how-to])
+- [ ] I've updated any affected documentation
+- [ ] I've rebuilt and run the tests with at least one of:
+ - [ ] Clang 8 or higher
+ - [ ] GCC 8 or higher
+ - [ ] MSVC 19.20 (Visual Studio 2019) or higher
+- [ ] I've added my name to the list of contributors in [README.md](https://github.com/marzer/tomlplusplus/blob/master/README.md)
+
+[CONTRIBUTING.md]: https://github.com/marzer/tomlplusplus/blob/master/CONTRIBUTING.md
+[how-to]: https://github.com/marzer/tomlplusplus/blob/master/CONTRIBUTING.md#regenerating-tomlhpp
+[README.md]: https://github.com/marzer/tomlplusplus/blob/master/README.md
diff --git a/tomlplusplus/.github/workflows/ci.yaml b/tomlplusplus/.github/workflows/ci.yaml
new file mode 100644
index 0000000000..cdf67a42a0
--- /dev/null
+++ b/tomlplusplus/.github/workflows/ci.yaml
@@ -0,0 +1,200 @@
+name: ci
+
+on:
+ push:
+ branches-ignore:
+ - "gh-pages"
+ paths:
+ - "**.h"
+ - "**.hpp"
+ - "**.cpp"
+ - "**.inl"
+ - "**.py"
+ - "**/meson.build"
+ - "**/workflows/**.yaml"
+ pull_request:
+ branches-ignore:
+ - "gh-pages"
+ paths:
+ - "**.h"
+ - "**.hpp"
+ - "**.cpp"
+ - "**.inl"
+ - "**.py"
+ - "**/meson.build"
+ - "**/workflows/**.yaml"
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+env:
+ clang_version: "14"
+ gcc_version: "11"
+
+jobs:
+ linux:
+ strategy:
+ fail-fast: false
+ matrix:
+ compiler:
+ - "clang"
+ - "gcc"
+ linker:
+ - "lld"
+ type:
+ - "debug"
+ - "release"
+
+ runs-on: ubuntu-latest
+
+ defaults:
+ run:
+ shell: bash
+
+ steps:
+ - name: Install base dependencies
+ run: |
+ sudo apt -y update
+ sudo apt -y install --no-install-recommends git ninja-build libstdc++-${{ env.gcc_version }}-dev locales-all
+
+ - uses: actions/checkout@v3
+
+ - name: Install python dependencies
+ run: |
+ pip3 install --user --no-cache-dir --upgrade meson
+ pip3 install --user --no-cache-dir --upgrade -r tools/requirements.txt
+
+ - name: Check toml.hpp
+ run: |
+ cd tools
+ python3 ci_single_header_check.py
+
+ - 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
+
+ - name: Configure locales
+ run: |
+ sudo locale-gen 'en_US.utf8' 'ja_JP.utf8' 'de_DE.utf8' 'it_IT.utf8' 'tr_TR.utf8' 'fi_FI.utf8' 'fr_FR.utf8' 'zh_CN.utf8'
+
+ - name: Configure Meson
+ run: |
+ CXX=c++ CXX_LD=${{ matrix.linker }} meson setup build --buildtype=${{ matrix.type }} -Ddevel=true -Db_lto=false
+
+ - name: Build
+ run: meson compile -C build
+
+ - name: Test
+ run: meson test -C build --verbose
+
+ windows:
+ strategy:
+ fail-fast: false
+ matrix:
+ type:
+ - "debug"
+ - "release"
+ permissive:
+ - false
+ - true
+ arch:
+ - name: "x64"
+ runner: "windows-2022"
+ - name: "arm64"
+ runner: "windows-11-arm"
+ runs-on: ${{ matrix.arch.runner }}
+
+ defaults:
+ run:
+ shell: cmd
+
+ steps:
+ - name: Install dependencies
+ run: |
+ python3 -m pip install -U pip
+ pip3 install meson ninja
+
+ - uses: actions/checkout@v3
+
+ - uses: ilammy/msvc-dev-cmd@v1
+ with:
+ arch: ${{ matrix.arch.name }}
+
+ - name: Configure Meson
+ run: meson setup build --vsenv --buildtype=${{ matrix.type }} -Ddevel=true -Db_lto=false -Dpermissive=${{ matrix.permissive }}
+
+ - name: Build
+ run: meson compile -C build
+
+ - name: Test
+ run: meson test -C build --verbose
+# tipi-build-linux:
+# name: tipi.build project build and dependency resolution
+# runs-on: ubuntu-latest
+# if: github.ref == 'refs/heads/master'
+# container: tipibuild/tipi-ubuntu
+#
+# env:
+# HOME: /root
+#
+# steps:
+# - uses: actions/checkout@v3
+# - run: mkdir -p ~/.tipi
+#
+# # checking if the tomlplusplus project builds and passes tests
+# - name: Build as project target linux-cxx17 (run tests 'odr_test_1' and 'main')
+# run: tipi . --dont-upgrade --verbose -t linux-cxx17 --test "odr_test_1|main"
+#
+# - name: Build as project target linux-cxx20 (run tests 'odr_test_1' and 'main')
+# run: tipi . --dont-upgrade --verbose -t linux-cxx20 --test "odr_test_1|main"
+#
+# - name: Cleanup project builds
+# run: rm -r ./build
+#
+# - name: "Get branch name and save to env"
+# env:
+# IS_PR: ${{ github.EVENT_NAME == 'pull_request' }}
+# run: |
+# if ${IS_PR}; then
+# BRANCH_NAME="${GITHUB_HEAD_REF}"
+# else
+# BRANCH_NAME="${GITHUB_REF##*/}"
+# fi
+# echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
+#
+# # trying if pulling the dependency with tipi works properly
+# - name: Build as dependency
+# run: |
+# cd examples/
+#
+# # create test directory and copy the simple_parser.cpp in there
+# mkdir test-as-dep
+# cp examples.h test-as-dep/.
+# cp simple_parser.cpp test-as-dep/.
+# cd test-as-dep/
+#
+# # create a deps file referencing the commit that triggered this build as dependency
+# mkdir .tipi
+# echo '{ "requires": { "${{ github.event.repository.full_name }}": { "@": "${{ env.BRANCH_NAME }}" } } }' > .tipi/deps
+#
+# # build
+# tipi . --dont-upgrade --verbose -t linux-cxx17
+# ./build/linux-cxx17/bin/simple_parser ../example.toml
diff --git a/tomlplusplus/.github/workflows/cifuzz.yml b/tomlplusplus/.github/workflows/cifuzz.yml
new file mode 100644
index 0000000000..eb245242a4
--- /dev/null
+++ b/tomlplusplus/.github/workflows/cifuzz.yml
@@ -0,0 +1,39 @@
+name: CIFuzz
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+permissions: {}
+jobs:
+ Fuzzing:
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write
+ steps:
+ - name: Build Fuzzers
+ id: build
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'tomlplusplus'
+ language: c++
+ - name: Run Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'tomlplusplus'
+ language: c++
+ fuzz-seconds: 800
+ output-sarif: true
+ - name: Upload Crash
+ uses: actions/upload-artifact@v4
+ if: failure() && steps.build.outcome == 'success'
+ with:
+ name: artifacts
+ path: ./out/artifacts
+ - name: Upload Sarif
+ if: always() && steps.build.outcome == 'success'
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ # Path to SARIF file relative to the root of the repository
+ sarif_file: cifuzz-sarif/results.sarif
+ checkout_path: cifuzz-sarif
diff --git a/tomlplusplus/.github/workflows/gh-pages.yaml b/tomlplusplus/.github/workflows/gh-pages.yaml
new file mode 100644
index 0000000000..2a1f3c6667
--- /dev/null
+++ b/tomlplusplus/.github/workflows/gh-pages.yaml
@@ -0,0 +1,48 @@
+name: gh-pages
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - "**.h"
+ - "**.hpp"
+ - "**.dox"
+ - "**.md"
+ - "docs/**"
+ - "**/gh-pages.yaml"
+ workflow_dispatch:
+
+jobs:
+ gh-pages:
+ runs-on: ubuntu-latest
+
+ defaults:
+ run:
+ shell: bash
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Install dependencies
+ run: |
+ sudo apt -y update
+ sudo apt -y install --no-install-recommends git doxygen
+ pip3 install --user --upgrade poxy
+
+ - name: Generate docs
+ run: |
+ git fetch origin master:refs/remotes/origin/master --tags --force
+ git remote set-head origin -a
+ git checkout master
+ git pull --force
+ cd docs
+ poxy --verbose --git-tags
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./docs/html