Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Packit configuration update #799

Merged
merged 11 commits into from
Aug 30, 2024
7 changes: 7 additions & 0 deletions .distro/plans/main.fmf
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: scikit_build_core-*/
4 changes: 0 additions & 4 deletions .distro/plans/main.fmf.dist-git

This file was deleted.

14 changes: 0 additions & 14 deletions .distro/plans/rpminspect.fmf

This file was deleted.

5 changes: 0 additions & 5 deletions .distro/plans/rpmlint.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ discover:
ref: main
execute:
how: tmt

adjust:
when: distro < fedora-39
because: Rpmlint does not have spellcheck
enabled: false
16 changes: 15 additions & 1 deletion .distro/python-scikit-build-core.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Testing dependencies not satisfied on epel
# build, cattrs, hatch-fancy-pypi-readme, pytest-subprocess
%if 0%{?el10}
%bcond_with tests
%else
%bcond_without tests
%endif

%global debug_package %{nil}

Name: python-scikit-build-core
Expand Down Expand Up @@ -42,6 +50,9 @@ BuildArch: noarch
Summary: Metapackage for python3-scikit-build-core: pyproject extras
Requires: python3-scikit-build-core = %{?epoch:%{epoch}:}%{version}-%{release}
BuildArch: noarch
# Deprecated empty extras package
# Note: Cannot use Obsoletes + Provides here. python3dist() does not seem to be picked up
Provides: deprecated()
%description -n python3-scikit-build-core+pyproject
This is a metapackage bringing in pyproject extras requires for
python3-scikit-build-core.
Expand All @@ -55,7 +66,7 @@ It makes sure the dependencies are installed.


%generate_buildrequires
%pyproject_buildrequires -x test,test-meta,test-numpy,pyproject
%pyproject_buildrequires %{?with_tests:-x test,test-meta,test-numpy}


%build
Expand All @@ -68,8 +79,11 @@ It makes sure the dependencies are installed.


%check
%pyproject_check_import
%if %{with tests}
%pytest \
-m "not network"
%endif


%files -n python3-scikit-build-core -f %{pyproject_files}
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ ehthumbs.db
Thumbs.db

.idea/
# tmt setup
/.distro/main.fmf
/.distro/plans/main.fmf
/.distro/tests/main.fmf

/docs/**/build
.vscode/
70 changes: 28 additions & 42 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,67 +1,53 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/

specfile_path: .distro/python-scikit-build-core.spec

files_to_sync:
- src: .distro/python-scikit-build-core.spec
dest: python-scikit-build-core.spec
- .packit.yaml
- src: .distro/python-scikit-build-core.rpmlintrc
dest: python-scikit-build-core.rpmlintrc
# tmt setup
- src: .distro/.fmf/
dest: .fmf/
- src: .distro/plans/
dest: plans/
- src: .distro/
dest: ./
delete: true
filters:
- "- main.fmf.dist-git"
- "- rpminspect.fmf"
- "- rpmlint.fmf"
- src: .distro/tests/
dest: tests/
- src: .distro/plans/main.fmf.dist-git
dest: plans/main.fmf
upstream_package_name: scikit_build_core
- "protect .git*"
- "protect sources"
- "protect changelog"
- "- plans/rpmlint.fmf"
- .packit.yaml

upstream_package_name: scikit-build-core
specfile_path: .distro/python-scikit-build-core.spec
downstream_package_name: python-scikit-build-core
update_release: false
upstream_tag_template: v{version}

targets: &targets
- fedora-all-x86_64
- fedora-all-aarch64
- epel-10-x86_64
- epel-10-aarch64

jobs:
- &copr_build
job: copr_build
trigger: pull_request
- &tests
job: tests
trigger: pull_request
fmf_path: .distro
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- <<: *copr_build
trigger: release
owner: "@scikit-build"
project: release
targets: &targets
- fedora-all-x86_64
- fedora-all-aarch64
- &tests
job: tests
- <<: *tests
trigger: release
targets: *targets
fmf_path: .distro
- <<: *copr_build
trigger: commit
branch: main
owner: "@scikit-build"
project: nightly
- <<: *tests
trigger: commit
branch: main
- <<: *copr_build
trigger: pull_request
project: scikit-build-core
update_release: true
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
- <<: *tests
trigger: pull_request
- job: propose_downstream
trigger: release
dist_git_branches:
# TODO: Switch to fedora-development and fedora-latest
# There is an issue that the commits diverge on different PRs. In the meantime will create PRs on branched fedora
# manually
# https://github.com/packit/packit/issues/1724
- fedora-rawhide
- job: koji_build
trigger: commit
Expand Down
Loading