From f934acc9ff68be346bd6126e5c816256ed780757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 19:10:40 -0700 Subject: [PATCH 01/10] Add an Earthfile for use with earthly. is an open source (MPL-2.0) project for defining and executing builds using containers. It meets a lot of the same needs as the Vagrant boxes that are in this project using containers rather than VMs. The advantage of pairing this with GitHub Actions is that it allows maintainers and contributors to reproduce test results locally which is very difficult when using GitHub Actions natively. stdeb interacts with a lot of system-level utilities so having convenient testing across multiple supported distributions is highly valuable. --- build.earth | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 build.earth diff --git a/build.earth b/build.earth new file mode 100644 index 0000000..37cdecb --- /dev/null +++ b/build.earth @@ -0,0 +1,51 @@ +VERSION 0.8 + +BUILD: + FUNCTION + ENV DEBIAN_FRONTEND=noninteractive + # Build deps + RUN apt-get update; apt-get install -y debhelper dh-python python3-all python3-pip + # Install deps + RUN apt-get update; apt-get install -y python3-requests apt-file + # Test deps + RUN apt-get update; apt-get install -y libpq-dev python3-all-dev + + COPY . /src/stdeb + WORKDIR /src/stdeb + RUN python3 setup.py --command-packages=stdeb.command bdist_deb + RUN for f in deb_dist/*.deb; do echo; echo $f; dpkg --contents $f; done + +INSTALL: + FUNCTION + # Install stdeb + RUN dpkg -i deb_dist/*.deb + +lint: + FROM docker.io/library/python:3.10-alpine + COPY . /src/stdeb + WORKDIR /src/stdeb + RUN python3 -m pip install -r requirements.txt + RUN ruff format --check || true + RUN ruff check || true + +build: + ARG OS=debian:bookworm + FROM $OS + DO +BUILD + +test: + FROM +build + DO +INSTALL + RUN env PYEXE=/usr/bin/python3 bash -x ./test.sh + +test-pypi-install: + FROM +build + DO +INSTALL + RUN bash -x ./test-pypi-install.sh + +test-2and3: + FROM +build + DO +INSTALL + # Not all platforms provide python2 + RUN apt-get update; apt-get install -y python-all-dev || true + RUN bash -x ./test2and3.sh From 80df49246cffa53a87e04ad36045f6cca2753b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 17:15:16 -0700 Subject: [PATCH 02/10] Initial attempt at GitHub Actions based CI using Earthly Since we have the earthly configuration for local testing, we may as well use it for GitHub Actions as well. Use the matrix support to pass the OS build argument to Earthly. Keep platforms that aren't working yet disabled. --- .github/workflows/ci.yaml | 46 +++++++++++++++++++++++++++++++++++++++ requirements.txt | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100644 requirements.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..fbd7e89 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,46 @@ +--- +name: CI +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + lint: + strategy: + fail-fast: false + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Set up Earthly + uses: earthly/actions-setup@v1 + - name: Lint + run: | + earthly --ci +lint + build: + strategy: + fail-fast: false + matrix: + os: + - "ubuntu:focal" + - "debian:bullseye" + - "ubuntu:jammy" + - "debian:bookworm" + # TODO(astraw/stdeb#195) + # - "ubuntu:noble" + # - "debian:trixie" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Set up Earthly + uses: earthly/actions-setup@v1 + - name: Run tests + run: | + earthly --ci +test --OS=${{matrix.os}} + - name: Run pypi-install tests -- + run: | + earthly --ci +test-pypi-install --OS=${{matrix.os}} + - name: Run 2and3 tests + run: | + earthly --ci +test-2and3 --OS=${{matrix.os}} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..39df351 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +ruff + From 747ff5caa154e925c85b50a39aa5462e7f250c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Mon, 8 Jul 2024 16:46:37 -0700 Subject: [PATCH 03/10] Update test scripts. * Use python3 for running packaging tests. * Update version of psycopg2 used for tests. I got build failures on bullseye with the earlier version but success with this last one (the psycopg project apparently returned to the psycopg module for v3). --- test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.sh b/test.sh index f58b78e..64dbde7 100755 --- a/test.sh +++ b/test.sh @@ -54,7 +54,7 @@ SOURCE_TARBALL=${SOURCE_TARBALL_DIR}.tar.gz DEBSOURCE=reindent-${SOURCE_RELEASE} elif [ $i -eq "3" ]; then SOURCE_PACKAGE=psycopg2 -SOURCE_RELEASE=2.7 +SOURCE_RELEASE=2.9.9 SOURCE_TARBALL_DIR=${SOURCE_PACKAGE}-${SOURCE_RELEASE} SOURCE_TARBALL=${SOURCE_TARBALL_DIR}.tar.gz DEBSOURCE=${SOURCE_TARBALL_DIR} @@ -95,9 +95,9 @@ rm -rf deb_dist # ============================================================== tar xzf $SOURCE_TARBALL cd $SOURCE_TARBALL_DIR -which python -python -c "import sys; print('sys.version',sys.version)" -python setup.py --command-packages=stdeb.command sdist_dsc +which python3 +python3 -c "import sys; print('sys.version',sys.version)" +python3 setup.py --command-packages=stdeb.command sdist_dsc cd deb_dist/$DEBSOURCE dpkg-buildpackage -rfakeroot -uc -us cd ../.. From cd4c3bc92dbb6bd61aad1dba76ca3089bfa22f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Mon, 8 Jul 2024 19:25:49 -0700 Subject: [PATCH 04/10] Add ruff configuration file. Right now this only sets a preferred line-length limit. It's possible this will be folded into a pyproject.toml as part of other updates to the project. --- ruff.toml | 1 + 1 file changed, 1 insertion(+) create mode 100644 ruff.toml diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..f11cf63 --- /dev/null +++ b/ruff.toml @@ -0,0 +1 @@ +line-length = 120 From 300807362337da0cc3ebf6043d058847c279840e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 17:21:12 -0700 Subject: [PATCH 05/10] Update README badge. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 61ad5e8..69e0abb 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -.. image:: https://travis-ci.org/astraw/stdeb.png?branch=master - :target: https://travis-ci.org/astraw/stdeb +.. image:: https://github.com/astraw/stdeb/actions/workflows/ci.yaml/badge.svg + :target: https://github.com/astraw/stdeb/actions/workflows/ci.yaml stdeb - Python to Debian source package conversion utility ========================================================== From bd733ba9450977d155992f28eab1ca91b93aa7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Tue, 9 Jul 2024 16:53:39 -0700 Subject: [PATCH 06/10] Remove old test configuration files. Travis CI has long since stopped providing value to open source projects and I believe that the Earthly builds cover the same local testing niche as the Vagrant files, which I was not able to successful update. If another maintainer or contributor wants to restore the Vagrant support I will help as I can, but I don't have a working vagrant provider locally. --- .travis.yml | 28 ---------------------- MANIFEST.in | 2 -- README.rst | 2 +- Vagrantfile.debian-10-bookworm.rb | 37 ----------------------------- Vagrantfile.debian-7-wheezy.rb | 37 ----------------------------- Vagrantfile.ubuntu-12.04-precise.rb | 37 ----------------------------- Vagrantfile.ubuntu-14.04-trusty.rb | 37 ----------------------------- 7 files changed, 1 insertion(+), 179 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Vagrantfile.debian-10-bookworm.rb delete mode 100644 Vagrantfile.debian-7-wheezy.rb delete mode 100644 Vagrantfile.ubuntu-12.04-precise.rb delete mode 100644 Vagrantfile.ubuntu-14.04-trusty.rb diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b9c2752..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -# http://travis-ci.org/#!/astraw/stdeb -language: python -arch: - - amd64 - - ppc64le -python: - - "2.7_with_system_site_packages" - - "3.5_with_system_site_packages" -before_install: - - sudo apt-get update - - sudo apt-get install fakeroot python-all-dev python3-all-dev debhelper python-setuptools python3-setuptools apt-file python-requests - - wget http://debs.strawlab.org/precise/python3-requests_2.3.0-0ads1_all.deb -O python3-requests_2.3.0-0ads1_all.deb - - sudo dpkg -i python3-requests_2.3.0-0ads1_all.deb -install: - - which python - - which pip - - pip --version - - python -c "import sys; print(sys.version)" - # Build a .deb file and then install it. - - python setup.py --command-packages=stdeb.command bdist_deb - - for f in deb_dist/*.deb; do echo; echo $f; dpkg --contents $f; done - - sudo dpkg -i deb_dist/*.deb -script: - - sudo env "PATH=$PATH" bash -x ./test.sh - - sudo env "PATH=$PATH" bash -x ./test-pypi-install.sh - - sudo env "PATH=$PATH" bash -x ./test2and3.sh - - pip install flake8 - - flake8 --extend-ignore D scripts/* stdeb/ test_data/ `python -c "import sys;sys.stdout.write('--extend-exclude py3_module.py') if sys.version_info[0] == 2 else sys"` diff --git a/MANIFEST.in b/MANIFEST.in index 3c086a4..39d4c42 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,4 @@ include *.sh include stdeb.cfg include MANIFEST.in include .gitignore -include .travis.yml -include Vagrantfile* recursive-include test_data * diff --git a/README.rst b/README.rst index 69e0abb..f76bae3 100644 --- a/README.rst +++ b/README.rst @@ -883,7 +883,7 @@ Additional Credits * kzwin for interop with virtualenv * GitHub_ for hosting services. * WebFaction_ (aka `python-hosting`_) for previous hosting services. -* TravisCI_ for continuous integration +* TravisCI_ for previous continuous integration support .. _GitHub: http://github.com/ .. _WebFaction: http://webfaction.com/ diff --git a/Vagrantfile.debian-10-bookworm.rb b/Vagrantfile.debian-10-bookworm.rb deleted file mode 100644 index eddd188..0000000 --- a/Vagrantfile.debian-10-bookworm.rb +++ /dev/null @@ -1,37 +0,0 @@ -# encoding: utf-8 - -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant::Config.run do |config| - config.vm.box_url = "https://downloads.sourceforge.net/project/vagrantboxjessie/debian80.box" - config.vm.box = "debian80" - - # install prerequisites for stdeb and tests - config.vm.provision :shell, :inline => "apt-get update" - config.vm.provision :shell, :inline => <<-SH - export DEBIAN_FRONTEND=noninteractive - apt-get install --yes build-essential debhelper python-all-dev python-setuptools apt-file python-requests python3-all-dev python3-setuptools libpq-dev - wget http://debs.strawlab.org/precise/python3-requests_2.3.0-0ads1_all.deb -O python3-requests_2.3.0-0ads1_all.deb - dpkg -i python3-requests_2.3.0-0ads1_all.deb -SH - - # We need to copy files to a new dir to prevent vagrant filesystem issues. - config.vm.provision :shell, :inline => "cp -a /vagrant /tmp/vagrant_copy" - - # Install stdeb - config.vm.provision :shell, :inline => "rm -rf /tmp/vagrant_copy/deb_dist" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True --with-python3=True --no-python3-scripts=True install_deb" - - # Run tests. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test-pypi-install.sh" - - # Run tests on Python 3. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test-pypi-install.sh" - - # Run more tests - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test2and3.sh" - -end diff --git a/Vagrantfile.debian-7-wheezy.rb b/Vagrantfile.debian-7-wheezy.rb deleted file mode 100644 index a1f105f..0000000 --- a/Vagrantfile.debian-7-wheezy.rb +++ /dev/null @@ -1,37 +0,0 @@ -# encoding: utf-8 - -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant::Config.run do |config| - config.vm.box_url = "https://dl.dropboxusercontent.com/s/3jz559mjz2aw4gs/debian-wheezy-64-vanilla.box" - config.vm.box = "debian-wheezy-64-vanilla" - - # install prerequisites for stdeb and tests - config.vm.provision :shell, :inline => "apt-get update" - config.vm.provision :shell, :inline => <<-SH - export DEBIAN_FRONTEND=noninteractive - apt-get install --yes debhelper python-all-dev python-setuptools apt-file python-requests python3-all-dev python3-setuptools libpq-dev - wget http://debs.strawlab.org/precise/python3-requests_2.3.0-0ads1_all.deb -O python3-requests_2.3.0-0ads1_all.deb - dpkg -i python3-requests_2.3.0-0ads1_all.deb -SH - - # We need to copy files to a new dir to prevent vagrant filesystem issues. - config.vm.provision :shell, :inline => "cp -a /vagrant /tmp/vagrant_copy" - - # Install stdeb - config.vm.provision :shell, :inline => "rm -rf /tmp/vagrant_copy/deb_dist" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True --with-python3=True --no-python3-scripts=True install_deb" - - # Run tests. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test-pypi-install.sh" - - # Run tests on Python 3. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test-pypi-install.sh" - - # Run more tests - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test2and3.sh" - -end diff --git a/Vagrantfile.ubuntu-12.04-precise.rb b/Vagrantfile.ubuntu-12.04-precise.rb deleted file mode 100644 index d25f0b7..0000000 --- a/Vagrantfile.ubuntu-12.04-precise.rb +++ /dev/null @@ -1,37 +0,0 @@ -# encoding: utf-8 - -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant::Config.run do |config| - config.vm.box = "precise64" - config.vm.box_url = "http://files.vagrantup.com/precise64.box" - - # install prerequisites for stdeb and tests - config.vm.provision :shell, :inline => "apt-get update" - config.vm.provision :shell, :inline => <<-SH - export DEBIAN_FRONTEND=noninteractive - apt-get install --yes debhelper python-all-dev python-setuptools apt-file python-requests python3-all-dev python3-setuptools libpq-dev - wget http://debs.strawlab.org/precise/python3-requests_2.3.0-0ads1_all.deb -O python3-requests_2.3.0-0ads1_all.deb - dpkg -i python3-requests_2.3.0-0ads1_all.deb -SH - - # We need to copy files to a new dir to prevent vagrant filesystem issues. - config.vm.provision :shell, :inline => "cp -a /vagrant /tmp/vagrant_copy" - - # Install stdeb - config.vm.provision :shell, :inline => "rm -rf /tmp/vagrant_copy/deb_dist" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True --with-python3=True --no-python3-scripts=True install_deb" - - # Run tests. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test-pypi-install.sh" - - # Run tests on Python 3. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test-pypi-install.sh" - - # Run more tests - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test2and3.sh" - -end diff --git a/Vagrantfile.ubuntu-14.04-trusty.rb b/Vagrantfile.ubuntu-14.04-trusty.rb deleted file mode 100644 index 7d297a7..0000000 --- a/Vagrantfile.ubuntu-14.04-trusty.rb +++ /dev/null @@ -1,37 +0,0 @@ -# encoding: utf-8 - -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant::Config.run do |config| - config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" - config.vm.box = "trusty-server-cloudimg-amd64-vagrant-disk1" - - # install prerequisites for stdeb and tests - config.vm.provision :shell, :inline => "apt-get update" - config.vm.provision :shell, :inline => <<-SH - export DEBIAN_FRONTEND=noninteractive - apt-get install --yes debhelper python-all-dev python-setuptools apt-file python-requests python3-all-dev python3-setuptools libpq-dev - wget http://debs.strawlab.org/precise/python3-requests_2.3.0-0ads1_all.deb -O python3-requests_2.3.0-0ads1_all.deb - dpkg -i python3-requests_2.3.0-0ads1_all.deb -SH - - # We need to copy files to a new dir to prevent vagrant filesystem issues. - config.vm.provision :shell, :inline => "cp -a /vagrant /tmp/vagrant_copy" - - # Install stdeb - config.vm.provision :shell, :inline => "rm -rf /tmp/vagrant_copy/deb_dist" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True --with-python3=True --no-python3-scripts=True install_deb" - - # Run tests. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test-pypi-install.sh" - - # Run tests on Python 3. - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test.sh" - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && PYEXE=/usr/bin/python3 ./test-pypi-install.sh" - - # Run more tests - config.vm.provision :shell, :inline => "cd /tmp/vagrant_copy && ./test2and3.sh" - -end From 1c52e88526ae9af31f0112377b485fe41f549a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 10 Jul 2024 14:03:04 -0700 Subject: [PATCH 07/10] Split a function for copying sources. Avoid copying in .git and other unecessary files by specifying source files explicitly. To make this slightly less unfun factor it into a function. --- build.earth | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build.earth b/build.earth index 37cdecb..e2823b1 100644 --- a/build.earth +++ b/build.earth @@ -1,5 +1,14 @@ VERSION 0.8 + +SRC: + FUNCTION + COPY --dir scripts stdeb test_data \ + test*.sh *.txt *.py *.cfg *.toml *.rst \ + MANIFEST.in \ + /src/stdeb + WORKDIR /src/stdeb + BUILD: FUNCTION ENV DEBIAN_FRONTEND=noninteractive @@ -10,8 +19,7 @@ BUILD: # Test deps RUN apt-get update; apt-get install -y libpq-dev python3-all-dev - COPY . /src/stdeb - WORKDIR /src/stdeb + DO +SRC RUN python3 setup.py --command-packages=stdeb.command bdist_deb RUN for f in deb_dist/*.deb; do echo; echo $f; dpkg --contents $f; done @@ -22,8 +30,7 @@ INSTALL: lint: FROM docker.io/library/python:3.10-alpine - COPY . /src/stdeb - WORKDIR /src/stdeb + DO +SRC RUN python3 -m pip install -r requirements.txt RUN ruff format --check || true RUN ruff check || true From 5ce765f7d66d2e40c2deec0de4defe53aa1ba4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 13 Nov 2024 14:55:56 -0800 Subject: [PATCH 08/10] Only run 2and3 tests on platforms that have Python 2 and 3. With the addition of #203, a missing Python 2 binary will raise an error instead of assuming that the binary is called `python`. As a result, this test script now fails on platforms where no Python 2 installation is available. --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fbd7e89..39036c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,5 +42,7 @@ jobs: run: | earthly --ci +test-pypi-install --OS=${{matrix.os}} - name: Run 2and3 tests + # This test can only be run on platforms that have Python 2 and Python 3 packages. + if: ${{contains(["ubuntu:focal", "debian:bullseye", "ubuntu:jammy"], matrix.os)}} run: | earthly --ci +test-2and3 --OS=${{matrix.os}} From 9e7333abb9c1870edc16bf58bfab44c42ceacf48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 13 Nov 2024 15:02:43 -0800 Subject: [PATCH 09/10] Wrap array in fromJSON. --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 39036c2..37528a7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,6 +43,6 @@ jobs: earthly --ci +test-pypi-install --OS=${{matrix.os}} - name: Run 2and3 tests # This test can only be run on platforms that have Python 2 and Python 3 packages. - if: ${{contains(["ubuntu:focal", "debian:bullseye", "ubuntu:jammy"], matrix.os)}} + if: ${{contains(fromJSON('["ubuntu:focal", "debian:bullseye", "ubuntu:jammy"]'), matrix.os)}} run: | earthly --ci +test-2and3 --OS=${{matrix.os}} From 4edf6f3d1e1fcb0cecdf2787e22c1225f619785c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Thu, 14 Nov 2024 11:25:53 -0800 Subject: [PATCH 10/10] Install all dependencies in a single apt-get install command. --- build.earth | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build.earth b/build.earth index e2823b1..4818261 100644 --- a/build.earth +++ b/build.earth @@ -12,12 +12,13 @@ SRC: BUILD: FUNCTION ENV DEBIAN_FRONTEND=noninteractive - # Build deps - RUN apt-get update; apt-get install -y debhelper dh-python python3-all python3-pip - # Install deps - RUN apt-get update; apt-get install -y python3-requests apt-file - # Test deps - RUN apt-get update; apt-get install -y libpq-dev python3-all-dev + RUN apt-get update; apt-get install -y \ + # Build deps \ + debhelper dh-python python3-all python3-pip \ + # Install deps \ + python3-requests apt-file \ + # Test deps \ + libpq-dev python3-all-dev DO +SRC RUN python3 setup.py --command-packages=stdeb.command bdist_deb