Merge upstream #106
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
on: push | |
jobs: | |
check: | |
name: Package openslide JAR | |
strategy: | |
matrix: | |
platform: [ ubuntu-latest ] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Download artifact | |
id: download-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
repo: alanocallaghan/openslide-crossplatform-builds | |
workflow: main.yml | |
name: openslide-build-.* | |
name_is_regexp: true | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
- name: Download mac-arm64 CircleCI artifact | |
shell: bash | |
run: | | |
./circleci-download-latest.rb -u alanocallaghan -r openslide-crossplatform-builds -b main | |
mv openslide-mac-arm64-main.tar.gz openslide-build-main/openslide-build-main/ | |
- name: Unpack and organise natives | |
shell: bash | |
run: | | |
mv openslide-build-main/openslide-build-main/* ./ | |
mkdir -p darwin-aarch64 darwin-x86-64 linux-x86-64 win32-x86-64 | |
# mac arm | |
tar xvf openslide-mac-arm64-main.tar.gz openslide-mac-arm64-main/lib/libopenslide.dylib --strip-components=2 | |
mv libopenslide.dylib darwin-aarch64/ | |
# linux | |
tar xvf openslide-linux-x86_64-main.tar.gz openslide-linux-x86_64-main/lib/libopenslide.so.0.4.1 --strip-components=2 | |
mv libopenslide.so.0.4.1 linux-x86-64/libopenslide.so | |
# max x86_64 | |
tar xvf openslide-mac-x86_64-main.tar.gz openslide-mac-x86_64-main/lib/libopenslide.dylib --strip-components=2 | |
mv libopenslide.dylib darwin-x86-64/ | |
# windows | |
unzip -p openslide-win-x86_64-main.zip openslide-win-x86_64-main/bin/libopenslide-0.dll > openslide.dll | |
unzip -p openslide-win-x86_64-main.zip openslide-win-x86_64-main/bin/libssp-0.dll > ssp.dll | |
unzip -p openslide-win-x86_64-main.zip openslide-win-x86_64-main/bin/libwinpthread-1.dll > winpthread.dll | |
chmod 755 openslide.dll ssp.dll winpthread.dll | |
mv openslide.dll ssp.dll winpthread.dll win32-x86-64/ | |
unzip openslide-build-main.zip | |
mv openslide-build-main openslide-sources | |
rm openslide-win-x86_64-main.zip openslide-mac-x86_64-main.tar.gz openslide-mac-arm64-main.tar.gz openslide-linux-x86_64-main.tar.gz openslide-build-main.zip | |
- name: Make jar | |
shell: bash | |
run: | | |
jar cvf openslide-natives-darwin-aarch64.jar darwin-aarch64 | |
jar cvf openslide-natives-darwin-x86-64.jar darwin-x86-64 | |
jar cvf openslide-natives-linux-x86-64.jar linux-x86-64 | |
jar cvf openslide-natives-win32-x86-64.jar win32-x86-64 | |
mkdir -p openslide-natives | |
mv *.jar openslide-natives | |
- name: Upload jar | |
uses: actions/upload-artifact@v1 | |
with: | |
name: openslide-natives | |
path: openslide-natives | |
- name: Upload sources | |
uses: actions/upload-artifact@v1 | |
with: | |
name: openslide-sources | |
path: openslide-sources |