Skip to content

Commit c9bf4ce

Browse files
authored
ci: Add more integration tests in Fedora (#800)
Re-run the `pytest` in Fedora. This picks up on the latest `gcc` from `rawhide` and so on. --------- Signed-off-by: Cristian Le <[email protected]> Signed-off-by: Cristian Le <[email protected]>
1 parent eb57817 commit c9bf4ce

File tree

20 files changed

+97
-25
lines changed

20 files changed

+97
-25
lines changed

.distro/plans/examples.fmf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
summary: Documentation examples
22
discover+:
3-
how: fmf
43
filter: "tag: examples"
5-
path: docs
64
execute:
75
how: tmt

.distro/plans/main.fmf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
discover:
2+
how: fmf
3+
path: .
4+
15
adjust+:
26
# Cannot use initiator: fedora-ci reliably yet
37
when: initiator is not defined or initiator != packit
48
discover+:
5-
how: fmf
69
dist-git-source: true
710
dist-git-extract: scikit_build_core-*/
File renamed without changes.

.packit.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,39 @@ _:
2727
- &build-in-scikit-build
2828
<<: *build-in-packit
2929
owner: "@scikit-build"
30-
- &tests
30+
- &tests-downstream
3131
job: tests
3232
fmf_path: .distro
33+
identifier: downstream
34+
- &tests-upstream
35+
job: tests
36+
skip_build: true
37+
identifier: upstream
38+
targets:
39+
- fedora-development
3340

3441
jobs:
3542
# Upstream jobs
3643
- <<: *build-in-scikit-build
3744
trigger: release
3845
project: release
39-
- <<: *tests
46+
- <<: *tests-downstream
4047
trigger: release
4148
- <<: *build-in-scikit-build
4249
trigger: commit
4350
branch: main
4451
project: nightly
45-
- <<: *tests
52+
- <<: *tests-downstream
53+
trigger: commit
54+
branch: main
55+
- <<: *tests-upstream
4656
trigger: commit
4757
branch: main
4858
- <<: *build-in-packit
4959
trigger: pull_request
50-
- <<: *tests
60+
- <<: *tests-downstream
61+
trigger: pull_request
62+
- <<: *tests-upstream
5163
trigger: pull_request
5264
# Downstream jobs
5365
- job: propose_downstream

docs/examples/downstream/main.fmf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
summary: Downstream example
12
environment:
23
HAS_PYTEST: true
34
require+:
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
summary: Nanobind downstream example
1+
summary+: " (nanobind)"
2+
require+:
3+
# TODO: These don't make sense to be packaged in a different package
4+
- python3-nanobind-devel
25
adjust:
6+
when: distro < fedora-41 or distro == centos-stream
37
enabled: false
4-
because: Nanobind is not yet packaged on Fedora
5-
#require+:
6-
# - python3dist(nanobind)
8+
because: They have not packaged nanobind there
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
summary: Pybind downstream example
1+
summary+: " (pybind11)"
22
require+:
33
- gcc-c++
44
- python3dist(pybind11)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
summary: Abi3 example project
1+
summary+: " (Abi3)"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
summary: C example project
1+
summary+: " (C)"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
summary: Cython example project
1+
summary+: " (cython)"
22
require+:
33
- python3dist(cython)

docs/examples/getting_started/fortran/main.fmf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
summary: F2PY example project
1+
summary+: " (F2PY)"
22
require+:
33
- gcc-gfortran
44
- python3dist(numpy)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
summary: Getting started
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
summary: Nanobind example project
1+
summary+: " (nanobind)"
2+
require+:
3+
# TODO: These don't make sense to be packaged in a different package
4+
- python3-nanobind-devel
25
adjust:
6+
when: distro < fedora-41 or distro == centos-stream
37
enabled: false
4-
because: Nanobind is not yet packaged on Fedora
5-
#require+:
6-
# - python3dist(nanobind)
8+
because: They have not packaged nanobind there
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
summary: Pybind example project
1+
summary+: " (pybind11)"
22
require+:
33
- gcc-c++
44
- python3dist(pybind11)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
summary: Swig example project
1+
summary+: " (Swig)"
22
require+:
33
- swig

docs/examples/main.fmf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ require:
88
- tree
99
framework: beakerlib
1010
path: /
11-
test: ./examples/test.sh
11+
test: ./docs/examples/test.sh

docs/examples/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rlJournalStart
88
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
99
rlRun "rsync -r .$TMT_TEST_NAME/ $tmp" 0 "Copy example project"
1010
if [ "${HAS_PYTEST}" != True ]; then
11-
rlRun "rsync -r ./examples/getting_started/test.py $tmp" 0 "Copy test.py file"
11+
rlRun "rsync -r ./docs/examples/getting_started/test.py $tmp" 0 "Copy test.py file"
1212
fi
1313
rlRun "pushd $tmp"
1414
rlRun "tree" 0 "Show directory tree"
@@ -18,7 +18,7 @@ rlJournalStart
1818
rlPhaseEnd
1919

2020
rlPhaseStartTest
21-
rlRun "pip install . -v --config-settings=build.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
21+
rlRun "pip install . -v --no-index --no-build-isolation" 0 "Build the python project"
2222
if [ "${HAS_PYTEST}" == True ]; then
2323
rlRun "python3 -m pytest" 0 "Run built-in pytest"
2424
else

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ filterwarnings = [
139139
"error",
140140
"ignore:Config variable '.*' is unset, Python ABI tag may be incorrect:RuntimeWarning",
141141
"default:pkg_resources is deprecated as an API:DeprecationWarning:wheel", # Caused by wheel<0.41 in tests
142+
"default:The 'wheel' package is no longer the canonical location:DeprecationWarning", # Caused by wheel also
142143
"default:onerror argument is deprecated, use onexc instead:DeprecationWarning:wheel", # Caused by wheel<0.41 & Python 3.12
143144
"default:The distutils package is deprecated and slated for removal:DeprecationWarning", # Caused by setuptools sometimes
144145
"default:The distutils.sysconfig module is deprecated, use sysconfig instead:DeprecationWarning", # Caused by setuptools sometimes

tests/main.fmf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/pytest:
2+
summary: Run pytest tests
3+
tag: [ pytest ]
4+
# TODO: filter only for network marked tests
5+
/all:
6+
summary: All pytest
7+
# TODO: Find a better way to deal with lack of git data
8+
path: /
9+
test: |
10+
# Fake a git archive
11+
cat << EOF > .git_archival.txt
12+
node: 47431d4eefbac9c3a7c49e62c73e624b932023eb
13+
node-date: 2025-02-27T16:18:39-05:00
14+
describe-name: v0.11.0
15+
EOF
16+
# Actually run pytest
17+
python3 -m pytest

tests/plans.fmf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/:
2+
inherit: false
3+
4+
/pytest:
5+
summary: Run all pytest
6+
prepare:
7+
- name: Install test packages
8+
how: install
9+
package:
10+
# Pip install everything
11+
- python3-pip
12+
# Test everything we got
13+
- gcc-c++
14+
- gfortran
15+
- cmake
16+
- ninja-build
17+
# For FindPython
18+
- python3-devel
19+
# There are tests that use FetchContent git
20+
- git
21+
- name: Prepare environment
22+
how: shell
23+
script: |
24+
# Fake a git archive
25+
cat << EOF > .git_archival.txt
26+
node: 47431d4eefbac9c3a7c49e62c73e624b932023eb
27+
node-date: 2025-02-27T16:18:39-05:00
28+
describe-name: v0.11.0
29+
EOF
30+
pip install --user .[test]
31+
discover:
32+
how: fmf
33+
filter: "tag: pytest"
34+
execute:
35+
how: tmt

0 commit comments

Comments
 (0)