Change libvips to be enabled by default (#34741)
This commit is contained in:
parent
4709121f72
commit
f7182ddc8b
3 changed files with 14 additions and 8 deletions
14
.github/workflows/test-ruby.yml
vendored
14
.github/workflows/test-ruby.yml
vendored
|
@ -143,7 +143,7 @@ jobs:
|
||||||
uses: ./.github/actions/setup-ruby
|
uses: ./.github/actions/setup-ruby
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
ruby-version: ${{ matrix.ruby-version}}
|
||||||
additional-system-dependencies: ffmpeg imagemagick libpam-dev
|
additional-system-dependencies: ffmpeg libpam-dev
|
||||||
|
|
||||||
- name: Load database schema
|
- name: Load database schema
|
||||||
run: |
|
run: |
|
||||||
|
@ -173,8 +173,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
test-libvips:
|
test-imagemagick:
|
||||||
name: Libvips tests
|
name: ImageMagick tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
needs:
|
needs:
|
||||||
|
@ -220,7 +220,7 @@ jobs:
|
||||||
CAS_ENABLED: true
|
CAS_ENABLED: true
|
||||||
BUNDLE_WITH: 'pam_authentication test'
|
BUNDLE_WITH: 'pam_authentication test'
|
||||||
GITHUB_RSPEC: ${{ matrix.ruby-version == '.ruby-version' && github.event.pull_request && 'true' }}
|
GITHUB_RSPEC: ${{ matrix.ruby-version == '.ruby-version' && github.event.pull_request && 'true' }}
|
||||||
MASTODON_USE_LIBVIPS: true
|
MASTODON_USE_LIBVIPS: false
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -245,7 +245,7 @@ jobs:
|
||||||
uses: ./.github/actions/setup-ruby
|
uses: ./.github/actions/setup-ruby
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
ruby-version: ${{ matrix.ruby-version}}
|
||||||
additional-system-dependencies: ffmpeg libpam-dev
|
additional-system-dependencies: ffmpeg imagemagick libpam-dev
|
||||||
|
|
||||||
- name: Load database schema
|
- name: Load database schema
|
||||||
run: './bin/rails db:create db:schema:load db:seed'
|
run: './bin/rails db:create db:schema:load db:seed'
|
||||||
|
@ -324,7 +324,7 @@ jobs:
|
||||||
uses: ./.github/actions/setup-ruby
|
uses: ./.github/actions/setup-ruby
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
ruby-version: ${{ matrix.ruby-version}}
|
||||||
additional-system-dependencies: ffmpeg imagemagick
|
additional-system-dependencies: ffmpeg
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
- name: Set up Javascript environment
|
||||||
uses: ./.github/actions/setup-javascript
|
uses: ./.github/actions/setup-javascript
|
||||||
|
@ -443,7 +443,7 @@ jobs:
|
||||||
uses: ./.github/actions/setup-ruby
|
uses: ./.github/actions/setup-ruby
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
ruby-version: ${{ matrix.ruby-version}}
|
||||||
additional-system-dependencies: ffmpeg imagemagick
|
additional-system-dependencies: ffmpeg
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
- name: Set up Javascript environment
|
||||||
uses: ./.github/actions/setup-javascript
|
uses: ./.github/actions/setup-javascript
|
||||||
|
|
|
@ -95,7 +95,7 @@ module Mastodon
|
||||||
require 'mastodon/redis_configuration'
|
require 'mastodon/redis_configuration'
|
||||||
::REDIS_CONFIGURATION = Mastodon::RedisConfiguration.new
|
::REDIS_CONFIGURATION = Mastodon::RedisConfiguration.new
|
||||||
|
|
||||||
config.x.use_vips = ENV['MASTODON_USE_LIBVIPS'] == 'true'
|
config.x.use_vips = ENV['MASTODON_USE_LIBVIPS'] != 'false'
|
||||||
|
|
||||||
if config.x.use_vips
|
if config.x.use_vips
|
||||||
require_relative '../lib/paperclip/vips_lazy_thumbnail'
|
require_relative '../lib/paperclip/vips_lazy_thumbnail'
|
||||||
|
|
|
@ -16,3 +16,9 @@ if ENV['REDIS_NAMESPACE']
|
||||||
|
|
||||||
abort message
|
abort message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ENV['MASTODON_USE_LIBVIPS'] == 'false'
|
||||||
|
warn <<~MESSAGE
|
||||||
|
WARNING: Mastodon support for ImageMagick is deprecated and will be removed in future versions. Please consider using libvips instead.
|
||||||
|
MESSAGE
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue