Initialize packit workflow
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
This commit is contained in:
parent
0d60d48a58
commit
e5717ac2a9
1
.distro/.fmf/version
Normal file
1
.distro/.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
4
.distro/.gitignore
vendored
Normal file
4
.distro/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/main.fmf
|
||||
/plans/main.fmf
|
||||
/tests/main.fmf
|
||||
*.tar.gz
|
||||
0
.distro/json-schema-validator.rpmlintrc
Normal file
0
.distro/json-schema-validator.rpmlintrc
Normal file
61
.distro/json-schema-validator.spec
Normal file
61
.distro/json-schema-validator.spec
Normal file
@ -0,0 +1,61 @@
|
||||
Name: json-schema-validator
|
||||
Summary: JSON schema validator for JSON for Modern C++
|
||||
Version: 0.0.0
|
||||
Release: %autorelease
|
||||
License: MIT
|
||||
URL: https://github.com/pboettch/json-schema-validator
|
||||
|
||||
Source: https://github.com/pboettch/json-schema-validator/archive/refs/tags/v%{version}.tar.gz
|
||||
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: json-devel
|
||||
|
||||
%description
|
||||
Json schema validator library for C++ projects using nlohmann/json
|
||||
|
||||
%package devel
|
||||
Summary: Development files for JSON schema validator
|
||||
Requires: json-schema-validator%{?_isa} = %{version}-%{release}
|
||||
Requires: json-devel
|
||||
|
||||
%description devel
|
||||
Json schema validator development files for C++ projects using nlohmann/json
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n json-schema-validator-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DJSON_VALIDATOR_SHARED_LIBS=ON \
|
||||
-DJSON_VALIDATOR_INSTALL=ON \
|
||||
-DJSON_VALIDATOR_BUILD_EXAMPLES=OFF \
|
||||
-DJSON_VALIDATOR_BUILD_TESTS=ON
|
||||
|
||||
%cmake_build
|
||||
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
|
||||
%check
|
||||
%ctest
|
||||
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_libdir}/libnlohmann_json_validator.so.*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libnlohmann_json_validator.so
|
||||
%{_includedir}/nlohmann/json-schema.hpp
|
||||
%{_libdir}/cmake/nlohmann_json_schema_validator
|
||||
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
3
.distro/packit.toml
Normal file
3
.distro/packit.toml
Normal file
@ -0,0 +1,3 @@
|
||||
Filters = [
|
||||
"unknown-key",
|
||||
]
|
||||
4
.distro/plans/main.fmf.dist-git
Normal file
4
.distro/plans/main.fmf.dist-git
Normal file
@ -0,0 +1,4 @@
|
||||
discover:
|
||||
how: fmf
|
||||
dist-git-source: true
|
||||
path: .distro
|
||||
14
.distro/plans/rpmlint.fmf
Normal file
14
.distro/plans/rpmlint.fmf
Normal file
@ -0,0 +1,14 @@
|
||||
summary:
|
||||
Perform rpmlint and rpminspect tests
|
||||
prepare:
|
||||
- name: Download the source rpm
|
||||
how: shell
|
||||
script: cd /tmp && curl -O ${PACKIT_SRPM_URL}
|
||||
- name: Download rpm packages
|
||||
how: shell
|
||||
script: cd /tmp && dnf download ${PACKIT_COPR_RPMS}
|
||||
discover+:
|
||||
how: fmf
|
||||
filter: "tag: rpmlint"
|
||||
execute:
|
||||
how: tmt
|
||||
7
.distro/plans/smoke.fmf
Normal file
7
.distro/plans/smoke.fmf
Normal file
@ -0,0 +1,7 @@
|
||||
summary:
|
||||
Basic smoke tests
|
||||
discover+:
|
||||
how: fmf
|
||||
filter: "tag: smoke"
|
||||
execute:
|
||||
how: tmt
|
||||
13
.distro/tests/rpmlint.fmf
Normal file
13
.distro/tests/rpmlint.fmf
Normal file
@ -0,0 +1,13 @@
|
||||
# Common test variables
|
||||
tag:
|
||||
- rpmlint
|
||||
tier: 0
|
||||
path: /
|
||||
|
||||
# Define tests
|
||||
/rpmlint:
|
||||
summary: Rpmlint spec and rpmfiles
|
||||
test: rpmlint -c packit.toml -r json-schema-validator.rpmlintrc ./*.spec /tmp/*.rpm
|
||||
/rpminspect-rpms:
|
||||
summary: Rpminspect the rpms
|
||||
test: ls /tmp/*.rpm | xargs -L1 rpminspect-fedora -E metadata,disttag
|
||||
9
.distro/tests/smoke.fmf
Normal file
9
.distro/tests/smoke.fmf
Normal file
@ -0,0 +1,9 @@
|
||||
# Common test variables
|
||||
tag:
|
||||
- smoke
|
||||
tier: 0
|
||||
path: /
|
||||
|
||||
# Define tests
|
||||
/version:
|
||||
test: echo "TODO: Write a minimum working example"
|
||||
79
.packit.yaml
Normal file
79
.packit.yaml
Normal file
@ -0,0 +1,79 @@
|
||||
specfile_path: .distro/json-schema-validator.spec
|
||||
files_to_sync:
|
||||
- src: .distro/json-schema-validator.spec
|
||||
dest: json-schema-validator.spec
|
||||
- .packit.yaml
|
||||
- src: .distro/json-schema-validator.rpmlintrc
|
||||
dest: json-schema-validator.rpmlintrc
|
||||
# tmt setup
|
||||
- src: .distro/.fmf/
|
||||
dest: .fmf/
|
||||
- src: .distro/plans/
|
||||
dest: plans/
|
||||
filters:
|
||||
- "- .distro/plans/main.fmf.dist-git"
|
||||
- "- .distro/plans/rpmlint.fmf"
|
||||
- src: .distro/plans/main.fmf.dist-git
|
||||
dest: plans/main.fmf
|
||||
upstream_package_name: json-schema-validator
|
||||
downstream_package_name: json-schema-validator
|
||||
update_release: false
|
||||
upstream_tag_template: v{version}
|
||||
|
||||
jobs:
|
||||
- job: copr_build
|
||||
trigger: pull_request
|
||||
owner: lecris
|
||||
project: json-schema-validator
|
||||
update_release: true
|
||||
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
|
||||
targets:
|
||||
- fedora-development
|
||||
- job: tests
|
||||
trigger: pull_request
|
||||
targets:
|
||||
- fedora-development
|
||||
fmf_path: .distro
|
||||
- job: copr_build
|
||||
trigger: commit
|
||||
branch: main
|
||||
owner: lecris
|
||||
project: nightly
|
||||
# TODO: Remove when upstream issue is resolved
|
||||
# https://github.com/packit/packit/issues/1924
|
||||
additional_repos:
|
||||
- copr://@scikit-build/release
|
||||
targets:
|
||||
- fedora-development-x86_64
|
||||
- fedora-latest-x86_64
|
||||
- fedora-development-aarch64
|
||||
- fedora-latest-aarch64
|
||||
- job: copr_build
|
||||
trigger: release
|
||||
owner: lecris
|
||||
project: release
|
||||
targets:
|
||||
- fedora-development-x86_64
|
||||
- fedora-latest-x86_64
|
||||
- fedora-development-aarch64
|
||||
- fedora-latest-aarch64
|
||||
- job: tests
|
||||
trigger: commit
|
||||
branch: main
|
||||
targets:
|
||||
- fedora-development
|
||||
- fedora-latest
|
||||
fmf_path: .distro
|
||||
- job: propose_downstream
|
||||
trigger: release
|
||||
dist_git_branches:
|
||||
- fedora-development
|
||||
- fedora-latest
|
||||
- job: koji_build
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
- job: bodhi_update
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-branched
|
||||
Loading…
Reference in New Issue
Block a user