-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (51 loc) · 1.67 KB
/
libjpegturbo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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.20", "1.21" ]
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