-
Notifications
You must be signed in to change notification settings - Fork 45
CI: add rpm build workflow #1244
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
Draft
junghans
wants to merge
2
commits into
arborx:master
Choose a base branch
from
junghans:rpmbuild
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| # Stolen from eigen spec | ||
| # The (empty) main package is arch, to have the package built and tests run | ||
| # on all arches, but the actual result package is the noarch -devel subpackge. | ||
| # Debuginfo packages are disabled to prevent rpmbuild from generating an empty | ||
| # debuginfo package for the empty main package. | ||
| %global debug_package %{nil} | ||
|
|
||
| Name: ArborX | ||
| Version: 9999 | ||
| %global sover 0 | ||
| Release: 1%{?dist} | ||
| Summary: Performance-portable geometric search library | ||
| # no support for 32-bit archs https://github.com/kokkos/kokkos/issues/2312 | ||
| # mpi is broken on s390x see: bug#2322073 | ||
| ExcludeArch: i686 armv7hl s390x | ||
|
|
||
| License: BSD-3-Clause | ||
| URL: https://github.com/arborx/%{name} | ||
| Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz | ||
|
|
||
| BuildRequires: gcc-c++ | ||
| BuildRequires: cmake >= 3.16 | ||
| BuildRequires: kokkos-devel | ||
| BuildRequires: openmpi-devel | ||
| BuildRequires: mpich-devel | ||
| BuildRequires: boost-devel | ||
| BuildRequires: google-benchmark-devel | ||
|
|
||
| %global arborx_desc \ | ||
| ArborX is an open-source library designed to provide performance portable \ | ||
| algorithms for geometric search, similarly to nanoflann and Boost Geometry. | ||
|
|
||
| %description | ||
| %{arborx_desc} | ||
|
|
||
| %package devel | ||
| Summary: Development package for %{name} packages | ||
| BuildArch: noarch | ||
| %description devel | ||
| %{arborx_desc} | ||
|
|
||
| This package contains the development files of %{name}. | ||
|
|
||
| %package openmpi-devel | ||
| Summary: openmpi development headers and libraries for %{name} | ||
| BuildArch: noarch | ||
| Requires: openmpi-devel | ||
|
|
||
| %description openmpi-devel | ||
| %{arborx_desc} | ||
|
|
||
| This package contains openmpi development files of %{name}. | ||
|
|
||
| %package mpich-devel | ||
| Summary: mpich development headers and libraries for %{name} | ||
| BuildArch: noarch | ||
| Requires: mpich-devel | ||
|
|
||
| %description mpich-devel | ||
| %{arborx_desc} | ||
|
|
||
| This package contains mpich development files of %{name}. | ||
|
|
||
| %prep | ||
| %autosetup -p1 -n %{name} | ||
|
|
||
| %build | ||
| # save memory | ||
| %global _smp_mflags -j1 | ||
| %global _vpath_builddir %{_target_platform}-${mpi:-serial} | ||
|
|
||
| . /etc/profile.d/modules.sh | ||
| for mpi in '' mpich openmpi; do | ||
junghans marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| test -n "${mpi}" && module load mpi/${mpi}-%{_arch} | ||
| %cmake \ | ||
| -DARBORX_ENABLE_TESTS=ON \ | ||
| -DARBORX_ENABLE_EXAMPLES=OFF \ | ||
| -DARBORX_ENABLE_BENCHMARKS=OFF \ | ||
| $(test -z "${mpi}" && echo -DARBORX_ENABLE_MPI=OFF || echo -DARBORX_ENABLE_MPI=ON) \ | ||
| -DCMAKE_INSTALL_DATADIR=${MPI_LIB:-%{_datadir}} \ | ||
| -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE:-%{_includedir}} \ | ||
| %{nil} | ||
| %cmake_build | ||
| test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} | ||
| done | ||
|
|
||
| %install | ||
| . /etc/profile.d/modules.sh | ||
| for mpi in '' mpich openmpi; do | ||
| test -n "${mpi}" && module load mpi/${mpi}-%{_arch} | ||
| %cmake_install | ||
| test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} | ||
| done | ||
|
|
||
| %check | ||
| . /etc/profile.d/modules.sh | ||
| for mpi in '' mpich openmpi; do | ||
| test -n "${mpi}" && module load mpi/${mpi}-%{_arch} | ||
| %ctest | ||
| test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} | ||
| done | ||
|
|
||
| %files devel | ||
| %doc README.md | ||
| %license LICENSE | ||
| %{_includedir}/%{name} | ||
| %{_datadir}/cmake/%{name} | ||
|
|
||
| %files openmpi-devel | ||
| %doc README.md | ||
| %license LICENSE | ||
| %{_includedir}/openmpi*/%{name} | ||
| %{_libdir}/openmpi*/lib/cmake/%{name} | ||
|
|
||
| %files mpich-devel | ||
| %doc README.md | ||
| %license LICENSE | ||
| %{_includedir}/mpich*/%{name} | ||
| %{_libdir}/mpich*/lib/cmake/%{name} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: rpmbuild | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - rpmbuild | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| rpmbuild: | ||
| continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} | ||
| strategy: | ||
| matrix: | ||
| config: | ||
| - {arch: 'arm64'} | ||
| - {arch: 'amd64'} | ||
| runs-on: ${{ matrix.config.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | ||
| container: fedora:latest | ||
| steps: | ||
| - name: Install fedpkg | ||
| run: dnf -y install fedpkg | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: ArborX | ||
| - name: Prepare rpmbuild | ||
| run: | | ||
| mkdir ArborX.rpm | ||
| tar -cvzf ArborX-9999.tar.gz ArborX/ | ||
| cp ArborX-9999.tar.gz ArborX/.github/workflows/ArborX.spec ArborX.rpm | ||
| - name: Install build deps | ||
| working-directory: ArborX.rpm | ||
| run: | | ||
| dnf -y builddep ArborX.spec | ||
| - name: Build rpm | ||
| working-directory: ArborX.rpm | ||
| run: | | ||
| fedpkg --verbose --debug local | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.