How To: Make libffi6 work with Github actions and Ubuntu 22.04 and Ubuntu 20.04
- A few days ago my Github Action for rt-kits-api3 broke because the default operating system for
ubuntu-latest
changed to22.04.1
from18.04
- The easy way to fix this was to change
ubuntu-latest
toubuntu-18.04
but that will break in April 2023. - The proper way to fix it for now until the ruby
ffi
gem is fixed to work withlibffi7
is to installlibffi6
(alongsidelibffi7
;libffi6
is not part of Ubuntu 22.04 and 20.04 by default) manually using the following yaml in the Github Actions file:
- name: Install libffi6
run: |-
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
sudo dpkg -i libffi6_3.2.1-8_amd64.deb
- There has to be a better way :-) but I couldn’t find one! Maybe upgrading to Ruby 3.x from 2.7.x would fix it?
- For full details, see: fix libffi7 issue before March 2023 when ubuntu 18.04 is deprecated #2
Previously
- March 13, 2022: Free computing e.g. at github actions isn’t free; free cloud computing considered harmful (because environment: see Steven Gonzalez Monserrate January 27, 2022: The Cloud Is Material: On the Environmental Impacts of Computation and Data Storage via The Staggering Ecological Impacts of Computation and the Cloud via Kottke
- March 14, 2021: On March 3, 2021 Github action in rt-kits-api3 to get Firefox support questions broke because ruby gem ffi-1.13.1 wasn’t found, fix:change Gemfile ffi version to 1.15.0
- October 18, 2020: Github Actions are super powerful and yaml is super confusing