diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml deleted file mode 100644 index 62639153..00000000 --- a/.github/workflows/package.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Package - -on: - push: - pull_request: - -jobs: - build-srpm: - runs-on: ubuntu-latest - container: registry.fedoraproject.org/fedora:rawhide - steps: - - run: dnf install --assumeyes bash-completion git go meson 'pkgconfig(dbus-1)' 'pkgconfig(systemd)' rpm-build - - uses: actions/checkout@v4 - - run: git config --system --add safe.directory $GITHUB_WORKSPACE - - run: meson setup $GITHUB_WORKSPACE/builddir -Dbuild_srpm=True - - run: meson compile srpm -C $GITHUB_WORKSPACE/builddir - - uses: actions/upload-artifact@v3 - with: - name: yggdrasil-${{ github.sha }} - path: ${{ github.workspace }}/builddir/dist/srpm/*.src.rpm - build-rpm: - needs: build-srpm - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - registry: - - "registry.fedoraproject.org" - image: - - "fedora" - version: - - "rawhide" - - "latest" - container: - image: ${{ matrix.registry }}/${{ matrix.image }}:${{ matrix.version }} - options: "--privileged --cap-add=SYS_ADMIN" - steps: - - run: dnf install --assumeyes git mock - - uses: actions/download-artifact@v3 - with: - name: yggdrasil-${{ github.sha }} - - run: mock --verbose --enable-network --rebuild --resultdir $GITHUB_WORKSPACE $GITHUB_WORKSPACE/*.src.rpm - - uses: actions/upload-artifact@v3 - with: - name: yggdrasil-${{ matrix.image }}-${{ matrix.version }} - path: ${{ github.workspace }}/*.rpm diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 00000000..4dd4c5c6 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,38 @@ +upstream_package_name: yggdrasil +downstream_package_name: yggdrasil +specfile_path: out/yggdrasil.spec + +srpm_build_deps: + - bash-completion + - gawk + - git-core + - golang + - 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/' + get-current-version: + - awk '/^Version:/ {print $2;}' out/yggdrasil.spec + create-archive: + - bash -c 'echo out/yggdrasil-*.tar.*' + fix-spec-file: + - echo 'nothing to fix' + +jobs: + - job: copr_build + trigger: pull_request + additional_repos: + - "copr://@yggdrasil/latest" + targets: + - centos-stream-8 + - centos-stream-9 + - fedora-all + - rhel-8 + - rhel-9