Skip to content

Commit

Permalink
Update ci.yml to use Ubuntu 24 (which comes with newer version of vip…
Browse files Browse the repository at this point in the history
…s, so we don't need to build it ourselves anymore)
  • Loading branch information
elohanlon committed Dec 23, 2024
1 parent e11236e commit 6f5d15c
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:

jobs:
ci-rails-app:
runs-on: ubuntu-latest
# Ubuntu 24 has vips 8.15, but Ubuntu 22 only has vips 8.12.
# We want at least version 8.15 because >= 8.15 supports the revalidate feature.
runs-on: ubuntu-24.04
strategy:
matrix:
ruby-version: ['3.2.2']
node: ['20']
# Vips 8.14 does not support the revalidate feature, but 8.15 does
vips-version: ['8.15.0']
env:
RAILS_ENV: test
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
Expand Down Expand Up @@ -42,46 +42,6 @@ jobs:
cd $TIKA_DOWNLOAD_DIR
wget "https://archive.apache.org/dist/tika/${TIKA_VERSION}/tika-app-${TIKA_VERSION}.jar"
mv tika-app-${TIKA_VERSION}.jar tika-app.jar
- name: Build libvips (so we can use version ${{ matrix.vips-version }}, since only 8.12 is available on Ubuntu 22)
if: matrix.vips-version != 'apt-default-vips'
run: |
# Instructions below are based on:
# https://www.libvips.org/install.html
# and
# https://github.com/libvips/libvips/wiki/Build-for-Ubuntu
#
# Unstall any already-installed version of vips
sudo apt-get remove libvips42
# Install meson build system
sudo apt-get install -y meson
# Download build dependencies
sudo apt-get install -y build-essential pkg-config libglib2.0-dev libexpat1-dev
# Download various libraries that we want for vips features
sudo apt-get install -y \
libfftw3-dev libexif-dev libjpeg-turbo8-dev \
libpng-dev libwebp-dev libtiff5-dev \
libheif-dev libexpat1-dev libcfitsio-dev \
libmatio-dev libnifti-dev libhwy-dev \
liblcms2-dev libpoppler-glib-dev librsvg2-dev \
libopenexr-dev libpango1.0-dev libarchive-dev \
libopenslide-dev libffi-dev libopenjp2-7-dev \
libimagequant-dev libcgif-dev \
liborc-0.4-dev # FIXME: Remove once libhwy 1.0.5 is available.
# Download and compile selected version of vips
cd /tmp
wget https://github.com/libvips/libvips/releases/download/v${{ matrix.vips-version }}/vips-${{ matrix.vips-version }}.tar.xz
tar xf vips-${{ matrix.vips-version }}.tar.xz
cd vips-${{ matrix.vips-version }}
meson build --libdir=lib --buildtype=release -Dintrospection=disabled
cd build
ninja
ninja test
sudo ninja install
vips --version
- name: Add --no-document option to .gemrc file to speed up bundle install
run: "echo 'gem: --no-document' > ~/.gemrc"
- name: Set up Ruby
Expand Down

0 comments on commit 6f5d15c

Please sign in to comment.