Skip to content

Commit 0cd69e1

Browse files
authored
ci: Fix Fedora CI (#464)
- Use fedora packages with `--no-index` and `--no-build-isolation` - Enabled missing tests - Placeholder for nanobind tests (Not yet packaged on fedora) --------- Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
1 parent c139af0 commit 0cd69e1

File tree

9 files changed

+62
-8
lines changed

9 files changed

+62
-8
lines changed

.packit.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,22 @@ jobs:
3232
update_release: true
3333
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
3434
targets:
35-
- fedora-development
36-
- fedora-latest
35+
# TODO: Switch to fedora-all once F37 support is dropped
36+
- fedora-development-x86_64
37+
- fedora-latest-x86_64
38+
- fedora-latest-stable-x86_64
39+
- fedora-development-aarch64
40+
- fedora-latest-aarch64
41+
- fedora-latest-stable-aarch64
3742
- job: tests
3843
trigger: pull_request
3944
targets:
4045
- fedora-development-x86_64
4146
- fedora-latest-x86_64
47+
- fedora-latest-stable-x86_64
4248
- fedora-development-aarch64
4349
- fedora-latest-aarch64
50+
- fedora-latest-stable-aarch64
4451
- job: copr_build
4552
trigger: commit
4653
branch: main
@@ -49,23 +56,31 @@ jobs:
4956
targets:
5057
- fedora-development-x86_64
5158
- fedora-latest-x86_64
59+
- fedora-latest-stable-x86_64
5260
- fedora-development-aarch64
5361
- fedora-latest-aarch64
62+
- fedora-latest-stable-aarch64
5463
- job: tests
5564
trigger: commit
5665
branch: main
5766
targets:
58-
- fedora-development
59-
- fedora-latest
67+
- fedora-development-x86_64
68+
- fedora-latest-x86_64
69+
- fedora-latest-stable-x86_64
70+
- fedora-development-aarch64
71+
- fedora-latest-aarch64
72+
- fedora-latest-stable-aarch64
6073
- job: copr_build
6174
trigger: release
6275
owner: "@scikit-build"
6376
project: release
6477
targets:
6578
- fedora-development-x86_64
6679
- fedora-latest-x86_64
80+
- fedora-latest-stable-x86_64
6781
- fedora-development-aarch64
6882
- fedora-latest-aarch64
83+
- fedora-latest-stable-aarch64
6984
- job: propose_downstream
7085
trigger: release
7186
dist_git_branches:

docs/examples/downstream/main.fmf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
environment:
2+
HAS_PYTEST: true
3+
require+:
4+
- python3-pytest
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
summary:
2+
Nanobind downstream example
3+
adjust:
4+
enabled: false
5+
because: Nanobind is not yet packaged on Fedora
6+
#require+:
7+
# - python3-nanobind
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
summary:
2+
Pybind downstream example
3+
require+:
4+
- gcc-c++
5+
- pybind11-devel
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
summary:
22
Cython example project
3+
require+:
4+
- python3-cython

docs/examples/getting_started/fortran/main.fmf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ summary:
22
F2PY example project
33
require+:
44
- gcc-gfortran
5+
- python3-numpy
6+
- python3-numpy-f2py
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
summary:
2+
Nanobind example project
3+
adjust:
4+
enabled: false
5+
because: Nanobind is not yet packaged on Fedora
6+
#require+:
7+
# - python3-nanobind

docs/examples/getting_started/pybind11/main.fmf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ summary:
22
Pybind example project
33
require+:
44
- gcc-c++
5+
- pybind11-devel

docs/examples/test.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,27 @@ source /usr/share/beakerlib/beakerlib.sh || exit 1
66
rlJournalStart
77
rlPhaseStartSetup
88
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
9-
rlRun "rsync -r ${TMT_SOURCE_DIR:-$TMT_TREE}$TMT_TEST_NAME/ $tmp" 0 "Copy example project"
10-
rlRun "rsync -r ${TMT_SOURCE_DIR:-$TMT_TREE}$TMT_TEST_NAME/../test.py $tmp" 0 "Copy test.py file"
9+
if [ -z ${TMT_SOURCE_DIR} ]; then
10+
tmt_root=${TMT_TREE}
11+
else
12+
tmt_root=${TMT_SOURCE_DIR}/scikit_build_core-*
13+
fi
14+
rlRun "rsync -r ${tmt_root}$TMT_TEST_NAME/ $tmp" 0 "Copy example project"
15+
if [ "${HAS_PYTEST}" != True ]; then
16+
rlRun "rsync -r ${tmt_root}/docs/examples/getting_started/test.py $tmp" 0 "Copy test.py file"
17+
fi
1118
rlRun "pushd $tmp"
1219
rlRun "tree" 0 "Show directory tree"
1320
rlRun "set -o pipefail"
1421
rlPhaseEnd
1522

1623
rlPhaseStartTest
17-
rlRun "pip install . --config-settings=cmake.verbose=true" 0 "Build the python project"
18-
rlRun "python3 test.py" 0 "Test project is installed correctly"
24+
rlRun "pip install --user . --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
25+
if [ "${HAS_PYTEST}" == True ]; then
26+
rlRun "pytest" 0 "Run built-in pytest"
27+
else
28+
rlRun "python3 test.py" 0 "Test project is installed correctly"
29+
fi
1930
rlPhaseEnd
2031

2132
rlPhaseStartCleanup

0 commit comments

Comments
 (0)