travis: test rpm generation
Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
ef31294505
commit
faaa5ffa10
2 changed files with 23 additions and 0 deletions
|
|
@ -7,6 +7,13 @@ jobs:
|
|||
- name: pylint
|
||||
install: pip install pylint
|
||||
script: pylint osbuild osbuild-run assemblers/* stages/*
|
||||
- name: rpm
|
||||
before_install:
|
||||
- sudo apt-get install -y rpm python3-setuptools
|
||||
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python-srpm
|
||||
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python
|
||||
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python3
|
||||
script: make rpm-nodeps
|
||||
- name: pipeline-noop
|
||||
before_install: sudo apt-get install -y systemd-container
|
||||
script: sudo env "PATH=$PATH" python3 -m osbuild --libdir . --output . samples/noop.json
|
||||
|
|
|
|||
16
Makefile
16
Makefile
|
|
@ -31,6 +31,22 @@ rpm: $(PACKAGE_NAME).spec tarball
|
|||
rm -r "`pwd`/rpmbuild"
|
||||
rm -r "`pwd`/build"
|
||||
|
||||
rpm-nodeps: $(PACKAGE_NAME).spec tarball
|
||||
- rm -r "`pwd`/output"
|
||||
mkdir -p "`pwd`/output"
|
||||
mkdir -p "`pwd`/rpmbuild"
|
||||
/usr/bin/rpmbuild -bb \
|
||||
--nodeps \
|
||||
--define "_sourcedir `pwd`" \
|
||||
--define "_specdir `pwd`" \
|
||||
--define "_builddir `pwd`/rpmbuild" \
|
||||
--define "_srcrpmdir `pwd`" \
|
||||
--define "_rpmdir `pwd`/output" \
|
||||
--define "_buildrootdir `pwd`/build" \
|
||||
$(PACKAGE_NAME).spec
|
||||
rm -r "`pwd`/rpmbuild"
|
||||
rm -r "`pwd`/build"
|
||||
|
||||
copy-rpms-to-test: rpm
|
||||
- rm test/testing-rpms/*.rpm
|
||||
find `pwd`/output -name '*.rpm' -printf '%f\n' -exec cp {} test/testing-rpms/ \;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue