ci(mac): Fix target arch for mac m1 #13
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macos-latest, macos-14] | |
java: ['17'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'liberica' | |
- name: Install MSYS2 on Windows | |
if: startsWith(matrix.os, 'windows') | |
uses: msys2/setup-msys2@v2 | |
with: | |
pacboy: lcms2:m libraw:m lensfun:m ntldd-git:m pkgconf:m | |
- name: Build on Windows | |
if: startsWith(matrix.os, 'windows') | |
shell: bash | |
run: | | |
export PATH=/msys64/usr/bin/:/msys32/usr/bin/:$PATH | |
export MSSDK_HOME=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Lib/10.0.22621.0 | |
ant -f windows/build.xml -lib lightcrafts/lib zip | |
ant -f windows/build.xml clean-native | |
MSYSTEM=MINGW32 TARGET_ARCH=i686 ant -f windows/build.xml -Dno-ivy=true -lib lightcrafts/lib zip | |
- name: Build on macOS | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig | |
brew install ant lensfun libjpeg-turbo libomp libraw libtiff libxml2 little-cms2 rsync | |
if [ "${{ matrix.os }}" == "macos-14" ]; then | |
export LIBOMP_PATH=/opt/homebrew/opt/libomp | |
TARGET_ARCH=arm64 ant -f macosx/build.xml zip | |
else | |
ant -f macosx/build.xml zip | |
fi | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LightZone-${{ matrix.os }} | |
path: | | |
windows/LightZone-windows*.zip | |
macosx/LightZone-macosx*.zip |