-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8e47e16
Showing
7 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: CI CMake | ||
on: | ||
- workflow_call | ||
- workflow_dispatch | ||
jobs: | ||
ci-cmake: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
name: [ | ||
linux-x86-64, | ||
win32-x86-64, | ||
darwin-x86-64, | ||
darwin-aarch64 | ||
] | ||
include: | ||
- name: linux-x86-64 | ||
os: ubuntu-latest | ||
compiler: gcc | ||
artifact: blosc/libblosc.so | ||
|
||
- name: win32-x86-64 | ||
os: windows-latest | ||
compiler: cl | ||
cmake-args: -A x64 | ||
artifact: blosc/Release/blosc.dll | ||
|
||
- name: darwin-x86-64 | ||
os: macOS-12 | ||
compiler: gcc | ||
artifact: blosc/libblosc.dylib | ||
|
||
- name: darwin-aarch64 | ||
os: macOS-14 | ||
compiler: gcc | ||
artifact: blosc/libblosc.dylib | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: Blosc/c-blosc | ||
ref: v1.21.5 | ||
|
||
- name: Generate project files | ||
run: | | ||
cmake . ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE='Release' -DBUILD_SHARED_LIBS=OFF -DBUILD_FUZZERS=ON | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
CI: true | ||
|
||
- name: Compile source code | ||
run: | | ||
cmake --build . --config 'Release' | ||
- name: Upload artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.name }} | ||
path: ${{ matrix.artifact }} | ||
|
||
jar: | ||
needs: ci-cmake | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Blosc/c-blosc | ||
path: c-blosc | ||
|
||
- name: Install java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
- name: List files | ||
run: | | ||
ls -lah | ||
tree . | ||
- name: Build JARs | ||
run: | | ||
jar cvf blosc-darwin-aarch64.jar darwin-aarch64 c-blosc/LICENSE.txt c-blosc/LICENSES | ||
jar cvf blosc-darwin-x86-64.jar darwin-x86-64 c-blosc/LICENSE.txt c-blosc/LICENSES | ||
jar cvf blosc-linux-x86-64.jar linux-x86-64 c-blosc/LICENSE.txt c-blosc/LICENSES | ||
jar cvf blosc-win32-x86-64.jar win32-x86-64 c-blosc/LICENSE.txt c-blosc/LICENSES | ||
jar cvf blosc.jar linux-x86-64 darwin-x86-64 darwin-aarch64 win32-x86-64 c-blosc/LICENSE.txt c-blosc/LICENSES | ||
- name: Upload artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: blosc*.jar | ||
name: blosc-jars |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish release to SciJava Maven | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
jars: | ||
name: Build jars | ||
uses: ./.github/workflows/jars.yml | ||
|
||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | ||
|
||
- name: Publish snapshot | ||
uses: gradle/[email protected] | ||
with: | ||
arguments: publish -P release=true | ||
env: | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASS: ${{ secrets.MAVEN_PASS }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish snapshot to SciJava Maven | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
jars: | ||
name: Build jars | ||
uses: ./.github/workflows/jars.yml | ||
|
||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Publish snapshot | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publish | ||
env: | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASS: ${{ secrets.MAVEN_PASS }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bench/bench | ||
build/ | ||
|
||
*.sw? | ||
.gradle |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Native library JARs of [c-blosc](https://github.com/Blosc/c-blosc) | ||
|
||
This is a small repo to make native library JARs of c-blosc and publish them to SciJava Maven. | ||
|
||
All of the useful stuff happens under `.github`. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
plugins { | ||
id 'maven-publish' | ||
} | ||
|
||
group = 'io.github.qupath' | ||
version = '1.21.5-SNAPSHOT' | ||
|
||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "SciJava" | ||
def releasesRepoUrl = uri("https://maven.scijava.org/content/repositories/releases") | ||
def snapshotsRepoUrl = uri("https://maven.scijava.org/content/repositories/snapshots") | ||
// Use gradle -Prelease publish | ||
url = project.hasProperty('release') ? releasesRepoUrl : snapshotsRepoUrl | ||
credentials { | ||
username = System.getenv("MAVEN_USER") | ||
password = System.getenv("MAVEN_PASS") | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
maven(MavenPublication) { | ||
groupId group | ||
version version | ||
artifact (file("blosc-natives.jar")) | ||
artifact (file("blosc-natives-darwin-aarch64.jar")) { | ||
classifier "darwin-aarch64" | ||
} | ||
artifact (file("blosc-natives-darwin-x86-64.jar")) { | ||
classifier "darwin-x86_64" | ||
} | ||
artifact (file("blosc-natives-win32-x86-64.jar")) { | ||
classifier "win32-x86_64" | ||
} | ||
artifact (file("blosc-natives-linux-x86-64.jar")) { | ||
classifier "linux-x86_64" | ||
} | ||
pom { | ||
licenses { | ||
license { | ||
name = 'LGPL' | ||
url = 'https://www.gnu.org/licenses/lgpl-3.0.en.html' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = "blosc" |