Skip to content

Commit

Permalink
Add Linux aarch64 support (#3)
Browse files Browse the repository at this point in the history
* Enable linux aarch64

* Gradle snapshot build
  • Loading branch information
alanocallaghan authored Dec 6, 2024
1 parent 2fc38ff commit 304d32d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'io.github.qupath'
version = '4.0.0.3'
version = '4.0.0.6-SNAPSHOT'

publishing {
repositories {
Expand Down Expand Up @@ -37,6 +37,9 @@ publishing {
artifact (file("openslide-natives-linux-x86-64.jar")) {
classifier "linux-x86_64"
}
artifact (file("openslide-natives-linux-aarch64.jar")) {
classifier "linux-aarch64"
}
pom {
licenses {
license {
Expand Down
11 changes: 7 additions & 4 deletions download-artifacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
end
end.parse!

target_release = options[:version] || "v4.0.0.3"
target_release = options[:version] || "v4.0.0.6"
owner="openslide"
repo="openslide-bin"
`mkdir -p downloads artifacts`
Expand Down Expand Up @@ -68,7 +68,10 @@
end
end

["libopenslide.so", "libopenslide.dylib", "libopenslide*.dll"].each do |file|
loc = `find downloads -name "#{file}"`.chomp
`cp -L #{loc} artifacts`
platforms = ["linux-x86_64", "macos-arm64-x86_64", "windows-x64", "linux-aarch64"]
version = target_release.sub("v", "")
platforms.each do |platform|
`mkdir -p artifacts/#{platform}`
`cp -rL downloads/openslide-bin-#{version}-#{platform}/lib/* artifacts/#{platform}/`
`cp -rL downloads/openslide-bin-#{version}-#{platform}/bin/* artifacts/#{platform}/`
end
14 changes: 8 additions & 6 deletions process-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
mkdir -p build
pushd build

mkdir -p darwin-aarch64 darwin-x86-64 linux-x86-64 win32-x86-64 licenses
cp ../artifacts/libopenslide.so linux-x86-64
cp ../artifacts/libopenslide.dylib darwin-aarch64
cp ../artifacts/libopenslide.dylib darwin-x86-64
cp ../artifacts/libopenslide*.dll win32-x86-64/openslide.dll
mkdir -p darwin-aarch64 darwin-x86-64 linux-x86-64 win32-x86-64 linux-aarch64 licenses
cp ../artifacts/linux-x86_64/libopenslide.so linux-x86-64
cp ../artifacts/linux-aarch64/libopenslide.so linux-aarch64
cp ../artifacts/macos-arm64-x86_64/libopenslide.dylib darwin-aarch64
cp ../artifacts/macos-arm64-x86_64/libopenslide.dylib darwin-x86-64
cp ../artifacts/windows-x64/libopenslide*.dll win32-x86-64/openslide.dll
cp -r ../downloads/openslide-bin-*-linux-x86_64/licenses/* licenses
cp -r ../downloads/openslide-bin-*-macos-arm64-x86_64/licenses/* licenses
cp -r ../downloads/openslide-bin-*-windows-x64/licenses/* licenses

jar cvf openslide-natives-darwin-aarch64.jar darwin-aarch64 licenses
jar cvf openslide-natives-darwin-x86-64.jar darwin-x86-64 licenses
jar cvf openslide-natives-linux-x86-64.jar linux-x86-64 licenses
jar cvf openslide-natives-linux-aarch64.jar linux-aarch64 licenses
jar cvf openslide-natives-win32-x86-64.jar win32-x86-64 licenses
jar cvf openslide-natives.jar linux-x86-64 darwin-x86-64 darwin-aarch64 win32-x86-64 licenses
jar cvf openslide-natives.jar linux-x86-64 linux-aarch64 darwin-x86-64 darwin-aarch64 win32-x86-64 licenses

popd

0 comments on commit 304d32d

Please sign in to comment.