Skip to content

Commit

Permalink
ci: exclusive packit builds
Browse files Browse the repository at this point in the history
Use packit to build RPMs for both PRs and commits. When building a
commit, only build the main branch and build the RPM in the
@yggdrasil/latest COPR project. Drop the .copr/Makefile implementation.

Signed-off-by: Link Dupont <link@sub-pop.net>
  • Loading branch information
subpop committed Mar 22, 2024
1 parent 0043989 commit 3f51b9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 deletions.
20 changes: 0 additions & 20 deletions .copr/Makefile

This file was deleted.

20 changes: 11 additions & 9 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
upstream_package_name: yggdrasil
downstream_package_name: yggdrasil
specfile_path: out/yggdrasil.spec
specfile_path: builddir/dist/srpm/yggdrasil.spec

srpm_build_deps:
- bash-completion
- gawk
- git-core
- golang
- go-rpm-macros
- meson
- 'pkgconfig(dbus-1)'
- 'pkgconfig(systemd)'
- rpm-build

actions:
post-upstream-clone:
- mkdir out
- meson setup builddir -Dbuild_srpm=True -Dvendor=True -Dexamples=True
- meson compile srpm -C builddir
- bash -c 'mv builddir/dist/srpm/* out/'
- meson setup builddir -Dbuild_srpm=True -Dvendor=True -Dexamples=True --wipe
- meson compile tarball -C builddir
get-current-version:
- awk '/^Version:/ {print $2;}' out/yggdrasil.spec
- awk '/^Version:/ {print $2;}' builddir/dist/srpm/yggdrasil.spec
create-archive:
- bash -c 'echo out/yggdrasil-*.tar.*'
fix-spec-file:
- echo 'nothing to fix'
- bash -c 'echo builddir/dist/srpm/yggdrasil-*.tar.*'

jobs:
- job: copr_build
Expand All @@ -36,3 +33,8 @@ jobs:
- fedora-all
- rhel-8
- rhel-9
- job: copr_build
trigger: commit
branch: main
owner: "@yggdrasil"
project: latest

0 comments on commit 3f51b9c

Please sign in to comment.