Skip to content

fix workflow

fix workflow #41

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14, macos-12]
include:
- suffix: so
os: ubuntu-latest
platform: unix
arch: x86_64
install_tools_command: sudo apt-get update && sudo apt-get install gcc make autoconf automake libtool
- suffix: dylib
os: macos-12
platform: mac
arch: x86_64
install_tools_command: brew install gcc make autoconf automake libtool
- suffix: dylib
os: macos-14
platform: mac
arch: aarm64
install_tools_command: brew install gcc make autoconf automake libtool
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install tools
run: ${{ matrix.install_tools_command }}
- name: Build WebP lib
working-directory: ./libwebp
run: |
./autogen.sh
./configure \
--disable-static \
--disable-png \
--disable-jpeg \
--disable-tiff \
--disable-gif \
--disable-wic \
--disable-libwebpdecoder \
--disable-libwebpextras \
--disable-libwebpmux \
--disable-libwebpdemux \
--disable-sdl \
--prefix=/tmp/webp-java-imageio/
make
make install
- name: Copy WebP
run: |
mkdir -p ./target/classes/lib/${{ matrix.platform }}/${{ matrix.arch }}
cp /tmp/webp-java-imageio/lib/libsharpyuv.${{ matrix.suffix }} ./target/classes/lib/${{ matrix.platform }}/${{ matrix.arch }}
cp /tmp/webp-java-imageio/lib/libwebp.${{ matrix.suffix }} ./target/classes/lib/${{ matrix.platform }}/${{ matrix.arch }}
- name: Setup JAVA
uses: actions/setup-java@v4
with:
java-version: '24'
distribution: temurin
check-latest: true
# server-id: ossrh
# server-username: MAVEN_USERNAME
# server-password: MAVEN_PASSWORD
cache: 'maven'
# gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
# gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Build JAVA
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: mvn --no-transfer-progress --batch-mode install
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: ./target/*.jar
name: webp-imageio_${{ matrix.platform }}_${{ matrix.arch }}