Add packages to support deadsnakes Python install in jobs #67

Merged
dboreham merged 2 commits from dboreham/deadsnakes-fixes into main 2023-10-11 22:43:13 +00:00
Owner

When trying to get our CI jobs to run on ARM Linux I found that the stock python action uses a binary repository that has no builds for aarch64/Linux. The recommended workaround is to use a different action that instead pulls from a Debian package repository containing Python packages for various versions and architectures, called deadsnakes.

While in theory that would solve the problem, it turned out to create yet more problems. This PR addresses those by adding the sudo command to the runner container, and a package to supply the command used to add a new apt repo. In addition, because the Python package install in turn triggers the installation of the tzdata package that ends up looking for user input (and the use of sudo thwarts the usual workaround), this PR sets the container time zone. This has the side affect of skipping the user input step.

You might ask why we should install random stuff in our runner container like this, for a specific github action? Normally that wouldn't be appropriate, however since the deadsnakes action appears to be fairly widely used, my assumption is that the Ubuntu runners at GitHub must have these various pieces already installed. On that basis (parity with GitHub runner environment) I think it makes sense.

When trying to get our CI jobs to run on ARM Linux I found that the stock python action uses a binary repository that has no builds for aarch64/Linux. The recommended workaround is to use a [different action](https://github.com/deadsnakes/action) that instead pulls from a Debian package repository containing Python packages for various versions and architectures, called deadsnakes. While in theory that would solve the problem, it turned out to create yet more problems. This PR addresses those by adding the `sudo` command to the runner container, and a package to supply the command used to add a new apt repo. In addition, because the Python package install in turn triggers the installation of the tzdata package that ends up looking for user input (and the use of sudo thwarts the usual workaround), this PR sets the container time zone. This has the side affect of skipping the user input step. You might ask why we should install random stuff in our runner container like this, for a specific github action? Normally that wouldn't be appropriate, however since the deadsnakes action appears to be fairly widely used, my assumption is that the Ubuntu runners at GitHub must have these various pieces already installed. On that basis (parity with GitHub runner environment) I think it makes sense.
dboreham added 1 commit 2023-10-11 22:23:15 +00:00
dboreham added 1 commit 2023-10-11 22:25:18 +00:00
dboreham requested review from telackey 2023-10-11 22:26:01 +00:00
telackey approved these changes 2023-10-11 22:40:33 +00:00
dboreham merged commit 6288a384ce into main 2023-10-11 22:43:13 +00:00
dboreham deleted branch dboreham/deadsnakes-fixes 2023-10-11 22:43:19 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/hosting#67
No description provided.