-
Notifications
You must be signed in to change notification settings - Fork 221
GitHub Actions Debian Builds #1812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 33 commits
5001e06
95b9d2f
ce470f3
5f7a379
1516247
e48696c
e06c239
e251bab
c374bc8
74a73e7
de1febd
478c16c
21d4321
7d2fc11
98420b6
77b73c0
7028dc9
cdbacd8
c5dbb4a
9d8fd10
c293c89
f435c41
82906ac
69f2914
7bebcac
49841fe
f1fc4cf
cfe0772
a44c1de
586258e
7bb6cb8
b194a1b
4bc3826
bacbcc6
0b1d815
1fa474b
ae3e9ef
4385e6e
0157b0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # This action originally modeled off of the Debian build action: | ||
| # https://salsa.debian.org/wouter/ola/-/blob/a38a396f6994b2b1af8efec9e208aee4e67f77aa/.gitlab-ci.yml | ||
|
|
||
| name: debian | ||
| on: [push, pull_request] | ||
| jobs: | ||
| debian-build: | ||
| name: 'Debian Build ${{ matrix.image_tag }} amd64' | ||
peternewman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| runs-on: ubuntu-latest | ||
kripton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| image_tag: [bullseye, bookworm, sid] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm no Debian naming expert, I guess we want to use static names so people know what they want, although if we used dynamic ones we'd always be testing the bleeding edge in testing.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think we want to use the static names because every little while everything shifts (i.e.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we could cheat it and either build testing too, or ideally check if testing was an alias for one of those other names. Or just remember to check/add occasionally which is probably easier! Actually presumably the oldest (bullseye?) will fail to build when they shuffle them all on, as its repo may go away?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The repo won't disappear right away (it becomes "oldstable" I believe). I'm mainly thinking ahead to possibly having a nightly APT repo where we wouldn't want to break packages. It also makes it easier to go back in time if you are unfortunately stuck with managing an old machine (i.e. you can still find the last build of an old release even if not built currently anymore). I think we can just do our best to add new releases and remove the old ones when they shuffle down. I can possibly add a check for it in a later PR (just have a Python script read the CI yaml). Personally I install Debian about once every other month so I am happy to submit update PRs for the time being.
peternewman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| container: debian:${{ matrix.image_tag }} | ||
| steps: | ||
| - name: Get number of CPU cores | ||
| run: echo "NUM_CPU_CORES=$(grep -c processor /proc/cpuinfo)" >> $GITHUB_OUTPUT | ||
| id: num-cpu-cores | ||
| - name: Update package database | ||
| run: apt-get update -y | ||
| # See comments beginning at | ||
| # https://github.com/actions/runner/issues/763#issuecomment-1435474884 | ||
| # Without Git, actions/checkout@v3 will resort to REST and will not | ||
| # create a .git folder or .git.config. The Problem Matcher looks for | ||
| # .git/config to find where the root of the repo is, so it must be | ||
| # present. | ||
| - name: Install Git | ||
| run: apt-get -y install git | ||
| - uses: actions/checkout@v3 | ||
| - name: Install build tools | ||
| run: apt-get -y install devscripts adduser fakeroot sudo | ||
| - name: Install build dependencies | ||
| run: mk-build-deps -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends" -i -r | ||
| - name: Set up build user | ||
| run: | | ||
| adduser --disabled-password --gecos "" builduser | ||
| chown -R builduser:builduser . | ||
| chown builduser:builduser .. | ||
| - name: Build | ||
| run: sudo -u builduser dpkg-buildpackage -b -rfakeroot -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} | ||
| - name: Move built files | ||
| if: always() | ||
| run: | | ||
| mkdir built | ||
| dcmd mv ../*ges built/ | ||
| - name: Display structure of built files | ||
| if: always() | ||
| run: ls -alR | ||
| working-directory: built | ||
| - name: SHA256 built files | ||
| if: always() | ||
| shell: bash | ||
| run: find . -type f -exec sha256sum {} \; | ||
| working-directory: built | ||
| - uses: actions/upload-artifact@v3 | ||
| if: always() | ||
| with: | ||
| name: ola-built-debian-${{ matrix.image_tag }}-amd64 | ||
peternewman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| path: ./built | ||
| debian-test: | ||
| name: 'Debian Test ${{ matrix.image_tag }} amd64' | ||
peternewman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| needs: debian-build | ||
| if: "always()" # Run if some builds fail but ensure they all complete first | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if you've changed this, but on a previous test say bookworm had failed, but it still tried to run all the tests. We can't easily make them run as three two step actions, rather than three actions linked to another three actions can we? Can we if the previous matrix step status? Possibly one for a later PR...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No, the real limitation is that GitHub Actions has no way to properly define matrix dependencies, only whole-job dependencies. What we can do is probably a better check than |
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| image_tag: [bullseye, bookworm, sid] | ||
| container: debian:${{ matrix.image_tag }} | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: ola-built-debian-${{ matrix.image_tag }}-amd64 | ||
peternewman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| path: built | ||
| - name: Display structure of artifact files | ||
| run: ls -alR | ||
| working-directory: built | ||
| - name: Update package database | ||
| run: apt-get update -y | ||
| - name: Install test tools | ||
| run: apt-get -y install autopkgtest | ||
| - name: Test | ||
| run: autopkgtest --output-dir=test-output built/*ges -- null | ||
| - uses: actions/upload-artifact@v3 | ||
| if: always() # Always upload the test output, even on failed tests | ||
| with: | ||
| name: ola-test-output-debian-${{ matrix.image_tag }}-amd64 | ||
peternewman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| path: test-output | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,13 @@ | ||
| ola (0.10.10-1) UNRELEASED; urgency=medium | ||
DaAwesomeP marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| * Fix ola-rdm-tests Debian package by patching python shebangs to python3 | ||
| with dh_python3. | ||
| * Reorder build command line in autopkgtest; Closes: Debian #913704. | ||
| * This change pulled from Debian by Perry Naseck <[email protected]> | ||
| https://salsa.debian.org/wouter/ola/-/commit/223f9ddaf9d4001dfc908734f0641315edbf9ea2 | ||
|
|
||
| -- Wouter Verhelst <[email protected]> Wed, 14 Nov 2018 23:44:42 +0100 | ||
|
|
||
| ola (0.10.9-1) unstable; urgency=low | ||
|
|
||
| * New upstream release | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ Source: ola | |
| Priority: optional | ||
| Maintainer: Wouter Verhelst <[email protected]> | ||
| Uploaders: RenZO <[email protected]> | ||
| Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, bash-completion, libcppunit-dev, bison, flex, pkg-config, uuid-dev, python, python-protobuf, libprotobuf-dev, protobuf-compiler, libprotoc-dev, libusb-1.0-0-dev, libftdi1-dev, liblo-dev, libmicrohttpd-dev, libncurses5-dev, libavahi-client-dev, python-numpy | ||
| Build-Depends: debhelper (>= 13), autotools-dev, dh-autoreconf, dh-python, bash-completion, libcppunit-dev, bison, flex, pkg-config, uuid-dev, python3, python3-protobuf, libprotobuf-dev, protobuf-compiler, libprotoc-dev, libusb-1.0-0-dev, libftdi1-dev, liblo-dev, libmicrohttpd-dev, libncurses5-dev, libavahi-client-dev, python3-numpy | ||
| Standards-Version: 3.9.8 | ||
| Section: libs | ||
| Vcs-Git: https://github.com/OpenLightingProject/ola.git | ||
|
|
@@ -28,7 +28,7 @@ Description: Open Lighting Architecture - development libraries | |
| Package: ola-python | ||
| Section: libs | ||
| Architecture: all | ||
| Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ${python:Depends}, ${misc:Depends}, python-protobuf | ||
| Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ${python3:Depends}, ${misc:Depends}, python3-protobuf | ||
| Description: Open Lighting Architecture - Python Classes | ||
| The DMX512 standard for Digital MultipleX is used for digital | ||
| communication networks commonly used to control stage lighting and | ||
|
|
@@ -42,7 +42,7 @@ Description: Open Lighting Architecture - Python Classes | |
| Package: ola-rdm-tests | ||
| Section: libs | ||
| Architecture: all | ||
| Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ola-python (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, python-numpy, libjs-jquery, libjs-jquery-ui, lsb-base | ||
| Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ola-python (= ${source:Version}), ${python3:Depends}, ${misc:Depends}, python3-numpy, libjs-jquery, libjs-jquery-ui, lsb-base | ||
peternewman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Suggests: bash-completion | ||
| Description: Open Lighting Architecture - RDM Responder Tests | ||
| The DMX512 standard for Digital MultipleX is used for digital | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| usr/lib/python*/dist-packages/ola/*.py | ||
| usr/lib/python*/dist-packages/ola/rpc/*.py | ||
| usr/lib/python*/*-packages/ola/*.py | ||
| usr/lib/python*/*-packages/ola/rpc/*.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| usr/bin/*.py | ||
| usr/lib/python*/dist-packages/ola/testing/*.py | ||
| usr/lib/python*/dist-packages/ola/testing/rdm/*.py | ||
| usr/lib/python*/*-packages/ola/testing/*.py | ||
| usr/lib/python*/*-packages/ola/testing/rdm/*.py | ||
| usr/share/man/man1/rdm_* | ||
| usr/share/ola/rdm-server/* | ||
| usr/share/ola/rdm-server/images/* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,14 +11,21 @@ | |
| export VERBOSE=1 | ||
|
|
||
| %: | ||
| dh $@ --parallel --with autotools_dev,autoreconf,bash_completion,python2 | ||
| dh $@ --parallel --with autotools_dev,autoreconf,bash_completion,python3 | ||
|
|
||
| override_dh_auto_configure: | ||
| dh_auto_configure -- --enable-python-libs --enable-rdm-tests | ||
| dh_auto_configure -- --enable-python-libs --enable-rdm-tests CXXFLAGS='-Wno-error=deprecated-declarations -Wno-error=unused-parameter' pythondir='/usr/lib/python3/dist-packages' | ||
|
|
||
| override_dh_installinit: | ||
| dh_installinit -p ola --name=olad | ||
| dh_installinit -p ola-rdm-tests --name=rdm_test_server | ||
|
|
||
| override_dh_makeshlibs: | ||
| dh_makeshlibs -V | ||
|
|
||
| override_dh_clean: | ||
| find . -type d -name '__pycache__' -print0 | xargs -0 rm -rf | ||
|
||
| dh_clean -a | ||
|
|
||
| override_dh_python3: | ||
| dh_python3 --shebang=/usr/bin/python3 | ||
Uh oh!
There was an error while loading. Please reload this page.