Try to fix MacOS build #159
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |