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/fedora: adapt workflow for RPM 4.20 in Fedora 41 (fixes #3183) #3192

Merged
merged 1 commit into from
Nov 8, 2024
Merged
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
ci/fedora: adapt workflow for RPM 4.20 in Fedora 41 (fixes #3183)
  • Loading branch information
robert-scheck committed Nov 7, 2024
commit 240fcfe98dee28463733c0523c3bfc3e88c73e08
27 changes: 17 additions & 10 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ jobs:
build:
needs: dependency
runs-on: ubuntu-latest
container: fedora:40
container: fedora

steps:
- uses: actions/checkout@v4
with:
path: placeholder-0-build

- name: "Install build-time requirements"
run: |
Expand Down Expand Up @@ -94,9 +96,9 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: re-fedora
path: re
path: re/placeholder-0-build

- name: "Write placeholer RPM spec file"
- name: "Write placeholder RPM spec file"
# Use same placeholder RPM spec file until re and baresip need different %build commands
run: |
cat > placeholder.spec <<EOF
Expand All @@ -120,9 +122,7 @@ jobs:
EOF

- name: "Write RPM macros configuration for re"
run: |
echo "%_builddir ${PWD}/re" > "${HOME}/.rpmmacros"
echo "%buildroot ${PWD}/re/%{_vendor}-%{_target_os}-install" >> "${HOME}/.rpmmacros"
run: echo "%_builddir ${PWD}/re" > "${HOME}/.rpmmacros"

- name: "RPM %build re"
run: rpmbuild -bc --short-circuit placeholder.spec
Expand All @@ -133,16 +133,23 @@ jobs:

- name: "Relocate re from RPM %{buildroot} to /"
run: |
cp -avT $(rpm --eval '%{buildroot}/') / # Work around '%{buildroot} can not be "/"' from RPM
cp -avT "${PWD}/re/placeholder-0-build/BUILDROOT/" / # Intermediate builddir since RPM 4.20
# isn't available externally, see https://github.com/rpm-software-management/rpm/issues/3147
rm -rf re # Baresip must not pick up this directory (or wrong rpaths are written to binaries)

- name: "Run ldconfig"
run: ldconfig

- name: "Write RPM macros configuration for baresip"
- name: "Add selftest to placeholder RPM spec file"
run: |
echo "%_builddir ${PWD}" > "${HOME}/.rpmmacros"
echo "%buildroot ${PWD}/%{_vendor}-%{_target_os}-install" >> "${HOME}/.rpmmacros"
cat >> placeholder.spec <<EOF
%check
cd %{__cmake_builddir}
./test/selftest -d ../test/data/ -v
EOF

- name: "Write RPM macros configuration for baresip"
run: echo "%_builddir ${PWD}" > "${HOME}/.rpmmacros"

- name: "RPM %build baresip"
run: rpmbuild -bc --short-circuit placeholder.spec
Expand Down
Loading