Skip to content

Commit

Permalink
Update the Github actions. (#125)
Browse files Browse the repository at this point in the history
* Update the Github actions.

Add in tests for Python 3.12, and switch to Ubuntu 22.04
for running the tests.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Mar 24, 2024
1 parent 9ac6571 commit f670030
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
jobs:
unit_tests:
name: Unit Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout
Expand All @@ -36,10 +36,13 @@ jobs:
- name: Install pip dependencies
run: python -m pip install flake8 pytest

- name: Run flake8
run: flake8 --ignore=E501,E266 pycdlib tools/*

- name: Build patched cdrkit
run: |
pushd vendor
tar -xvf cdrkit-1.1.11-fedora29-patched.tar.gz
tar -xvf cdrkit-1.1.11-fedora40-patched.tar.gz
pushd cdrkit-1.1.11
mkdir build
pushd build
Expand All @@ -49,9 +52,6 @@ jobs:
popd
popd
- name: Run flake8
run: flake8 --ignore=E501,E266 pycdlib tools/*

- name: Patch pycdlib-genisoimage for python version
run: sed -i -e '0,/python3/s//python/' tools/pycdlib-genisoimage

Expand Down
15 changes: 14 additions & 1 deletion vendor/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
This directory contains vendored files stored in
Git-LFS (https://git-lfs.github.com/). In particular:

- cdrkit-1.1.11-fedora40-patched.tar.gz
A vendored version of cdrkit (and more specifically, genisoimage) used to
run the tests. We vendor this because the different versions of genisoimage
actually put things in different places on the ISO, and this messes with the
tests checking where things are in the ISO. This doesn't mean that pycdlib
can only open ISOs from genisoimage; it just means the tests expect that
particular layout. This file was created by downloading the cdrkit source
RPM from koji (https://kojipkgs.fedoraproject.org//packages/cdrkit/1.1.11/54.fc40/src/cdrkit-1.1.11-54.fc40.src.rpm,
though that URI may not exist anymore). The package was then installed
(rpm -ivh /path/to/*.src.rpm), and then the original source tarball with
patches was prepared (rpmbuild -bp cdrkit.spec). The "icedax" directory was
then removed, as it is not required and needs additional dependencies. It was
then tarred back up.

- cdrkit-1.1.11-fedora29-patched.tar.gz
A vendored version of cdrkit (and more specifically, genisoimage) used to
run the tests. We vendor this because the different versions of genisoimage
Expand All @@ -14,4 +28,3 @@ Git-LFS (https://git-lfs.github.com/). In particular:
exploded (tar -xvf ~/rpmbuild/cdrkit-1.1.11.tar.gz), and then the patches
from the source RPM were applied in order. The "icedax" directory was also
removed from CMakeLists.txt After all of that, it was tarred back up.

3 changes: 3 additions & 0 deletions vendor/cdrkit-1.1.11-fedora40-patched.tar.gz
Git LFS file not shown

0 comments on commit f670030

Please sign in to comment.