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: Add more integration tests in Fedora #800

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .distro/plans/examples.fmf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
summary:
Documentation examples
summary: Documentation examples
discover+:
how: fmf
filter: "tag: examples"
path: docs
execute:
how: tmt
10 changes: 10 additions & 0 deletions .distro/plans/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
discover:
how: fmf
path: .

adjust+:
# Cannot use initiator: fedora-ci reliably yet
when: initiator is not defined or initiator != packit
discover+:
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.

5 changes: 5 additions & 0 deletions .distro/plans/pytest.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
summary: Upstream pytest
discover+:
filter: "tag: pytest"
execute:
how: tmt
3 changes: 1 addition & 2 deletions .distro/plans/smoke.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
summary:
Basic smoke tests
summary: Basic smoke tests
discover:
how: fmf
filter: "tag: smoke"
Expand Down
File renamed without changes.
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/
47 changes: 16 additions & 31 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
# 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/rpminspect.fmf"
- "- 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

jobs:
- &copr_build
job: copr_build
trigger: release
owner: "@scikit-build"
project: release
targets: &targets
- fedora-all-x86_64
- fedora-all-aarch64
- &tests
job: tests
trigger: release
targets: *targets
fmf_path: .distro
- <<: *copr_build
trigger: commit
Expand All @@ -50,9 +38,6 @@ jobs:
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
Expand Down
1 change: 1 addition & 0 deletions docs/examples/downstream/main.fmf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
summary: Downstream example
environment:
HAS_PYTEST: true
require+:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/downstream/nanobind_example/main.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
summary:
Nanobind downstream example
summary+: " (nanobind)"
adjust:
enabled: false
because: Nanobind is not yet packaged on Fedora
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/downstream/pybind11_example/main.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
summary:
Pybind downstream example
summary+: " (pybind11)"
require+:
- gcc-c++
- pybind11-devel
3 changes: 1 addition & 2 deletions docs/examples/getting_started/abi3/main.fmf
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
summary:
Abi3 example project
summary+: " (Abi3)"
3 changes: 1 addition & 2 deletions docs/examples/getting_started/c/main.fmf
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
summary:
C example project
summary+: " (C)"
3 changes: 1 addition & 2 deletions docs/examples/getting_started/cython/main.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
summary:
Cython example project
summary+: " (cython)"
require+:
- python3-cython
3 changes: 1 addition & 2 deletions docs/examples/getting_started/fortran/main.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
summary:
F2PY example project
summary+: " (F2PY)"
require+:
- gcc-gfortran
- python3-numpy
Expand Down
1 change: 1 addition & 0 deletions docs/examples/getting_started/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summary: Getting started
3 changes: 1 addition & 2 deletions docs/examples/getting_started/nanobind/main.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
summary:
Nanobind example project
summary+: " (nanobind)"
adjust:
enabled: false
because: Nanobind is not yet packaged on Fedora
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/getting_started/pybind11/main.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
summary:
Pybind example project
summary+: " (pybind11)"
require+:
- gcc-c++
- pybind11-devel
3 changes: 1 addition & 2 deletions docs/examples/getting_started/swig/main.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
summary:
Swig example project
summary+: " (Swig)"
require+:
- swig
2 changes: 1 addition & 1 deletion docs/examples/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ require:
- tree
framework: beakerlib
path: /
test: ./examples/test.sh
test: ./docs/examples/test.sh
2 changes: 1 addition & 1 deletion docs/examples/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rlJournalStart
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "rsync -r .$TMT_TEST_NAME/ $tmp" 0 "Copy example project"
if [ "${HAS_PYTEST}" != True ]; then
rlRun "rsync -r ./examples/getting_started/test.py $tmp" 0 "Copy test.py file"
rlRun "rsync -r ./docs/examples/getting_started/test.py $tmp" 0 "Copy test.py file"
fi
rlRun "pushd $tmp"
rlRun "tree" 0 "Show directory tree"
Expand Down
31 changes: 31 additions & 0 deletions tests/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
tag: [ pytest ]
require:
- pipx
- cmake
path: /
test: |
set -x

pipx run uv pip compile --no-deps \
-o requirements.txt \
--extra test \
./pyproject.toml

# Install requirements from Fedora
dnf install -y $(sed -nr "s/(.*)==.*/python3dist\(\1\)/p" requirements.txt)

/all:
summary: All pytest
test+: |
python3 -m pytest

/freethreading:
summary: All tests under freethreading
require+:
- python3-freethreading
test+: |
python3t -m pytest
adjust:
when: distro != fedora-rawhide
because: Python3.13 was introduced in F41
enabled: false
Loading