-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9b9cb9c
Showing
50 changed files
with
1,809 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Initial release |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
IncludeBlocks: Preserve | ||
QualifierAlignment: Right | ||
IndentPPDirectives: BeforeHash | ||
BreakAfterAttributes: Always | ||
AllowShortFunctionsOnASingleLine: Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
%if 0%{?epel} == 9 | ||
# %%ctest macro does not recognize -L | ||
%bcond_with test | ||
%else | ||
%bcond_without test | ||
%endif | ||
|
||
Name: json-type | ||
Summary: C++ types for JSON-like datastructure | ||
Version: 0.0.0 | ||
Release: %autorelease | ||
License: MIT | ||
URL: https://github.com/LecrisUT/JsonType | ||
|
||
Source: %{url}/archive/refs/tags/v%{version}.tar.gz | ||
|
||
BuildRequires: ninja-build | ||
BuildRequires: cmake | ||
BuildRequires: gcc-c++ | ||
BuildRequires: cmake(Catch2) | ||
|
||
|
||
%global _description %{expand: | ||
Minimalistic project wrapping C++ container library to provide generic | ||
datastructure compatible with JSON, YAML, TOML. | ||
|
||
This project provides only the Json-like type structure and manipulations. | ||
Parsing, formatting, validation, are outside the scope of this project. | ||
} | ||
|
||
%description %{_description} | ||
|
||
This package contains the runctime library. | ||
|
||
%package devel | ||
Summary: %{summary} | ||
Requires: json-type%{?_isa} = %{version}-%{release} | ||
|
||
%description devel %{_description} | ||
|
||
This package contains the development files. | ||
|
||
|
||
%prep | ||
%autosetup -n JsonType-%{version} | ||
|
||
|
||
%build | ||
%cmake | ||
%cmake_build | ||
|
||
|
||
%install | ||
%cmake_install | ||
|
||
|
||
%check | ||
%if %{with test} | ||
%ctest -L "(unit|integration)" | ||
%endif | ||
|
||
|
||
%files | ||
%doc README.md | ||
%license LICENSE | ||
%{_libdir}/libjson_type.so.* | ||
|
||
%files devel | ||
%{_libdir}/libjson_type.so | ||
%{_includedir}/json_type.hpp | ||
%{_libdir}/cmake/JsonType | ||
|
||
|
||
%changelog | ||
%autochangelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
summary: Test the bundled ctests | ||
|
||
prepare: | ||
- how: install | ||
package: | ||
- cmake | ||
- rsync | ||
- gcc-c++ | ||
- git | ||
- cmake(Catch2) | ||
|
||
discover+: | ||
how: fmf | ||
path: test | ||
execute: | ||
how: tmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
adjust+: | ||
# Cannot use initiator: fedora-ci reliably yet | ||
when: initiator is not defined or initiator != packit | ||
discover+: | ||
how: fmf | ||
dist-git-source: true | ||
dist-git-extract: json-type-*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plan: | ||
import: | ||
url: https://github.com/packit/tmt-plans | ||
ref: main | ||
name: /plans/rpminspect | ||
environment: | ||
# upstream is excluded here because it triggers "Unexpected changed source archive content" | ||
# This happens when the released version already contains the package version: | ||
# https://github.com/packit/tmt-plans/issues/13 | ||
RPMINSPECT_EXCLUDE: metadata,upstream | ||
adjust: | ||
when: distro >= fedora-41 | ||
because: Recently rpminspect fails to get the distro-tag | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prepare: | ||
- how: shell | ||
script: cp ./*.rpmlintrc $TMT_PLAN_DATA/ | ||
discover: | ||
how: fmf | ||
filter: "tag: rpmlint" | ||
url: https://github.com/packit/tmt-plans | ||
ref: main | ||
execute: | ||
how: tmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"packageRules": [ | ||
{ | ||
"groupName": "CI and devDependencies", | ||
"matchManagers": ["github-actions", "pre-commit", "pep621"] | ||
} | ||
], | ||
"separateMajorMinor": false, | ||
"extends": [ | ||
"config:recommended", | ||
":dependencyDashboard", | ||
"schedule:weekly", | ||
":enablePreCommit", | ||
":semanticCommitTypeAll(chore)" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI | ||
run-name: > | ||
CI (${{ github.event_name }}) | ||
${{ github.event_name == 'pull_request' && format('PR#{0}', github.event.number) || '' }} | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
schedule: | ||
- cron: 0 0 * * 3 | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
uses: ./.github/workflows/step_pre-commit.yaml | ||
|
||
tests: | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_test.yaml | ||
with: | ||
mask-experimental: ${{ github.event_name == 'push' }} | ||
|
||
docs: | ||
name: 📘 docs | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_docs.yaml | ||
|
||
coverage: | ||
name: 👀 coverage | ||
needs: [ tests ] | ||
uses: ./.github/workflows/step_coverage.yaml | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
if: github.event_name != 'schedule' | ||
|
||
static-analysis: | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_static-analysis.yaml | ||
secrets: | ||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | ||
if: github.event_name != 'schedule' | ||
|
||
pass: | ||
name: ✅ Pass | ||
needs: [ pre-commit, tests, coverage, docs, static-analysis ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check all CI jobs | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
allowed-skips: coverage, static-analysis | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: 🔨 Prepare release | ||
run-name: 🔨 Prepare release from ${{ inputs.tag || github.ref_name }} | ||
|
||
on: | ||
push: | ||
branches: [ main, v.* ] | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
required: true | ||
type: string | ||
description: Version tag to create | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tibdex/github-app-token@v2 | ||
id: token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
- id: version | ||
name: Find version | ||
run: | | ||
pip install hatch | ||
# Get verison from workflow tag or hatch version | ||
if [[ -n "${{ inputs.tag }}" ]]; then | ||
raw_version="${{ inputs.tag }}" | ||
else | ||
raw_version=$(hatch version) | ||
fi | ||
echo "raw_version=$raw_version" >> "$GITHUB_OUTPUT" | ||
# Remove any dev suffixes | ||
version=$(echo $raw_version | sed -r -e "s/([0-9\.]*).*/\1/" -e 's/.$//') | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
- id: changelog | ||
name: Build the changelog | ||
run: | | ||
pip install towncrier | ||
{ | ||
echo "content<<EOF" | ||
towncrier build --version "${{ steps.version.outputs.version }}" --draft 2>/dev/null | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" | ||
towncrier build --version "${{ steps.version.outputs.version }}" --yes | ||
- uses: peter-evans/create-pull-request@v6 | ||
with: | ||
title: "🚀 Release ${{ steps.version.outputs.version }}" | ||
commit-message: "🚀 Release ${{ steps.version.outputs.version }}" | ||
token: ${{ steps.token.outputs.token }} | ||
add-paths: | | ||
Changelog.md | ||
.changelog.d/* | ||
branch: "prepare_release/v${{ steps.version.outputs.version }}" | ||
body: | | ||
${{ steps.changelog.outputs.content }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 🚀 Release | ||
run-name: 🚀 Release (${{ github.ref_name }}) | ||
|
||
on: | ||
pull_request: | ||
branches: [ "prepare_release/v*" ] | ||
types: [ closed ] | ||
|
||
jobs: | ||
release: | ||
name: 🚀 Create release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: version | ||
run: | | ||
version=$(echo "${{ github.ref_name }}" | sed -r "s/prepare_release\/v(.*)/\1/") | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
name: JsonType ${{ steps.version.outputs.version }} | ||
tag_name: "v${{ steps.version.outputs.version }}" | ||
body: | | ||
${{ github.event.pull_request.body }} | ||
if: github.event.pull_request.merged == true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 👀 coverage | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
CODECOV_TOKEN: | ||
description: Codecov token of the main repository | ||
required: false | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ctest: | ||
name: ctest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: lukka/get-cmake@latest | ||
- uses: lukka/run-cmake@v10.7 | ||
with: | ||
workflowPreset: coverage | ||
- uses: threeal/gcovr-action@xml-out | ||
with: | ||
xml-out: coverage.xml | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
plugin: noop | ||
files: coverage.xml | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 📘 docs | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
sphinx: | ||
name: Sphinx (${{ matrix.builder }}) | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
builder: [ linkcheck, html ] | ||
include: | ||
# Run default html builder with warnings as error | ||
- builder: html | ||
args: -W | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Install the project and docs dependencies | ||
run: pip install .[docs] | ||
- name: Run sphinx builder ${{ matrix.builder }} | ||
run: sphinx-build -b ${{ matrix.builder }} ${{ matrix.args }} ./docs ./docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: pre-commit | ||
run-name: Run pre-commits | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pre-commit: | ||
name: pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/action@v3.0.1 |
Oops, something went wrong.