Skip to content

Merge pull request #196 from klippa-app/feature/up-minimum-go-version #204

Merge pull request #196 from klippa-app/feature/up-minimum-go-version

Merge pull request #196 from klippa-app/feature/up-minimum-go-version #204

Workflow file for this run

name: lib-jpeg-turbo
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
jobs:
test-libjpegturbo:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go: [ "1.21", "1.22", "1.23" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Set up libturbojpeg library (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install libturbojpeg libturbojpeg-dev
- name: Set up jpeg-turbo library (MacOS)
if: matrix.os == 'macos-latest'
run: |
brew install jpeg-turbo
- name: Set up jpeg-turbo library (Windows)
if: matrix.os == 'windows-latest'
run: |
curl -L https://master.dl.sourceforge.net/project/libjpeg-turbo/3.0.0/libjpeg-turbo-3.0.0-gcc64.exe -o libjpeg-turbo-3.0.0-gcc64.exe
./libjpeg-turbo-3.0.0-gcc64.exe /S
$Folder = 'C:\libjpeg-turbo-gcc64\lib\pkgconfig'
while (!(Test-Path -Path $Folder)) {
"libjpeg-turbo does not exist yet!"
Start-Sleep -s 5
}
- name: Test package (non-Windows)
if: matrix.os != 'windows-latest'
run: |
go test ./internal/image/image_jpeg -tags pdfium_use_turbojpeg -v
- name: Test package (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:PKG_CONFIG_PATH = 'C:\libjpeg-turbo-gcc64\lib\pkgconfig'
go test ./internal/image/image_jpeg -tags pdfium_use_turbojpeg -v