Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #192 from firstlookmedia/187_linux_packaging
Browse files Browse the repository at this point in the history
Builds linux packages and push them to a repo in CircleCI
  • Loading branch information
micahflee authored Dec 2, 2019
2 parents b3f64ac + 7e07335 commit 91d6c8b
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 10 deletions.
227 changes: 218 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
workflows:
version: 2
test:
jobs:
- test
version: 2
version: 2.1

jobs:

test:
environment:
FLM_ENV: "test"
docker:
- image: circleci/python:3.7-buster
steps:
Expand All @@ -17,7 +12,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y gnupg2 python3-pyqt5 tor xvfb
- run:
name: start tor service
name: Start tor service
command: sudo service tor start
- checkout
- run:
Expand All @@ -26,3 +21,217 @@ jobs:
- run:
name: Run tests
command: pipenv run xvfb-run -s "-screen 0 1280x1024x24" python setup.py pytest

build-ubuntu-bionic:
docker:
- image: ubuntu:18.04
steps:
- run:
name: Install dependencies
command: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2
gem install --no-ri --no-rdoc rake
gem install --no-ri --no-rdoc package_cloud
- checkout
- run:
name: Create the .deb package
command: |
./install/build_deb.sh
dpkg -i deb_dist/gpgsync_*.deb
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/ubuntu/bionic deb_dist/gpgsync_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/ubuntu/bionic deb_dist/gpgsync_${VERSION}-1.dsc
build-ubuntu-disco:
docker:
- image: ubuntu:19.04
steps:
- run:
name: Install dependencies
command: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2
gem install --no-ri --no-rdoc rake
gem install --no-ri --no-rdoc package_cloud
- checkout
- run:
name: Create the .deb package
command: |
./install/build_deb.sh
dpkg -i deb_dist/gpgsync_*.deb
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/gpgsync_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/gpgsync_${VERSION}-1.dsc
build-ubuntu-eoan:
docker:
- image: ubuntu:19.10
steps:
- run:
name: Install dependencies
command: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2
gem install --no-ri --no-rdoc rake
gem install --no-ri --no-rdoc package_cloud
- checkout
- run:
name: Create the .deb package
command: |
./install/build_deb.sh
dpkg -i deb_dist/gpgsync_*.deb
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/gpgsync_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/gpgsync_${VERSION}-1.dsc
build-debian-buster:
docker:
- image: debian:buster
steps:
- run:
name: Install dependencies
command: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2
gem install --no-ri --no-rdoc rake
gem install --no-ri --no-rdoc package_cloud
- checkout
- run:
name: Create the .deb package
command: |
./install/build_deb.sh
dpkg -i deb_dist/gpgsync_*.deb
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/debian/buster deb_dist/gpgsync_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/debian/buster deb_dist/gpgsync_${VERSION}-1.dsc
build-debian-bullseye:
docker:
- image: debian:bullseye
steps:
- run:
name: Install dependencies
command: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2
gem install --no-ri --no-rdoc rake
gem install --no-ri --no-rdoc package_cloud
- checkout
- run:
name: Create the .deb package
command: |
./install/build_deb.sh
dpkg -i deb_dist/gpgsync_*.deb
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/debian/bullseye deb_dist/gpgsync_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/debian/bullseye deb_dist/gpgsync_${VERSION}-1.dsc
build-fedora-30:
docker:
- image: fedora:30
steps:
- run:
name: Install dependencies
command: |
dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-requests python3-pytest-runner python3-packaging python3-dateutil gnupg2
gem install package_cloud
- checkout
- run:
name: Create the .rpm package
command: |
./install/build_rpm.sh
dnf install -y dist/gpgsync-*-1.noarch.rpm
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/fedora/30 dist/gpgsync-${VERSION}-1.noarch.rpm
package_cloud push firstlookmedia/code/fedora/30 dist/gpgsync-${VERSION}-1.src.rpm
build-fedora-31:
docker:
- image: fedora:31
steps:
- run:
name: Install dependencies
command: |
dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-requests python3-pytest-runner python3-packaging python3-dateutil gnupg2
gem install package_cloud
- checkout
- run:
name: Create the .rpm package
command: |
./install/build_rpm.sh
dnf install -y dist/gpgsync-*-1.noarch.rpm
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version |cut -dv -f2)
package_cloud push firstlookmedia/code/fedora/31 dist/gpgsync-${VERSION}-1.noarch.rpm
package_cloud push firstlookmedia/code/fedora/31 dist/gpgsync-${VERSION}-1.src.rpm
workflows:
version: 2
test:
jobs:
- test
build-tags:
jobs:
- build-ubuntu-bionic:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-ubuntu-disco:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-ubuntu-eoan:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-debian-buster:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-debian-bullseye:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-fedora-30:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-fedora-31:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
3 changes: 3 additions & 0 deletions install/build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ VERSION=`cat share/version`
# clean up from last build
rm -r deb_dist >/dev/null 2>&1

# build source package
python3 setup.py --command-packages=stdeb.command sdist_dsc

# build binary package
python3 setup.py --command-packages=stdeb.command bdist_deb

Expand Down
2 changes: 1 addition & 1 deletion install/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ VERSION=${VERSION:1}
rm -r build dist >/dev/null 2>&1

# build binary package
python3 setup.py bdist_rpm --requires="python3-qt5, python3-requests, python3-nose, python3-packaging, python3-dateutil, gnupg2"
python3 setup.py bdist_rpm --requires="python3-qt5, python3-requests, python3-packaging, python3-dateutil, gnupg2"

# return install instructions if build succeeds
if [[ $? -eq 0 ]]; then
Expand Down

0 comments on commit 91d6c8b

Please sign in to comment.