Native jni build (#5)
* Each native library is in its own jar. Got rid of cross compilation. The project is `secp256k1` and not `secp256k1-kmp`. * Updated CI to use all 3 OS VMs Co-authored-by: Salomon BRYS <salomon@kodein.net>
This commit is contained in:
107
.github/workflows/release.yml
vendored
107
.github/workflows/release.yml
vendored
@@ -5,10 +5,12 @@ on:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
publish-ios:
|
||||
name: Publish iOS native
|
||||
runs-on: macOS-latest
|
||||
upload:
|
||||
name: Upload
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
@@ -20,54 +22,65 @@ jobs:
|
||||
path: ~/.konan
|
||||
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-konan-
|
||||
- name: Install automake
|
||||
- name: Cached Gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Install Automake
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: brew install automake
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
- name: Set up shell
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: echo ::add-path::C:\msys64\usr\bin\
|
||||
- name: Check JVM
|
||||
shell: bash
|
||||
run: ./gradlew jvmTest
|
||||
- name: Check Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: ./gradlew linuxTest
|
||||
- name: Check iOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
shell: bash
|
||||
run: ./gradlew iosX64Test
|
||||
- name: Check Android
|
||||
if: matrix.os == 'macOS-latest'
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: iosX64Test
|
||||
- name: Publish
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
api-level: 29
|
||||
ndk: 21.3.6528147
|
||||
cmake: 3.10.2.4988404
|
||||
script: ./gradlew connectedCheck
|
||||
- name: Publish Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: publishIosArm64PublicationToBintrayRepository publishIosX64PublicationToBintrayRepository
|
||||
|
||||
publish:
|
||||
name: Publish JVM & Linux native
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Cached Konan
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.konan
|
||||
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-konan-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: check
|
||||
- name: Publish
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
shell: bash
|
||||
run: ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository
|
||||
- name: Publish Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: publishAllPublicationsToBintrayRepository
|
||||
shell: bash
|
||||
run: ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository
|
||||
- name: Publish MacOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew publish
|
||||
- name: Discard
|
||||
if: ${{ failure() || cancelled() }}
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
run: ./gradlew postBintrayDiscard
|
||||
|
||||
95
.github/workflows/snapshot.yml
vendored
95
.github/workflows/snapshot.yml
vendored
@@ -13,9 +13,12 @@ on:
|
||||
|
||||
jobs:
|
||||
|
||||
publish-ios:
|
||||
name: Publish iOS native
|
||||
runs-on: macOS-latest
|
||||
upload:
|
||||
name: Upload
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
@@ -27,54 +30,90 @@ jobs:
|
||||
path: ~/.konan
|
||||
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-konan-
|
||||
- name: Install automake
|
||||
run: brew install automake
|
||||
- name: Cached Gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
- name: Install Automake
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: brew install automake
|
||||
- name: Set up shell
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: echo ::add-path::C:\msys64\usr\bin\
|
||||
- name: Check JVM
|
||||
shell: bash
|
||||
run: ./gradlew jvmTest
|
||||
- name: Check Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: ./gradlew linuxTest
|
||||
- name: Check iOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
shell: bash
|
||||
run: ./gradlew iosX64Test
|
||||
- name: Check Android
|
||||
if: matrix.os == 'macOS-latest'
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: iosX64Test
|
||||
- name: Publish
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
api-level: 29
|
||||
ndk: 21.3.6528147
|
||||
cmake: 3.10.2.4988404
|
||||
script: ./gradlew connectedCheck
|
||||
- name: Publish Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: publishIosArm64PublicationToBintrayRepository publishIosX64PublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} -PgitSha=${{ github.sha }}
|
||||
shell: bash
|
||||
run: ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Publish Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Publish MacOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew publish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Discard
|
||||
if: ${{ failure() || cancelled() }}
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
run: ./gradlew postBintrayDiscard -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
|
||||
publish:
|
||||
name: Publish JVM & Linux native
|
||||
name: Publish
|
||||
needs: upload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Cached Konan
|
||||
- name: Cached Gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.konan
|
||||
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-konan-
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: check
|
||||
- name: Publish
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
arguments: publishAllPublicationsToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} -PgitSha=${{ github.sha }}
|
||||
run: ./gradlew postBintrayPublish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
|
||||
65
.github/workflows/test.yml
vendored
65
.github/workflows/test.yml
vendored
@@ -19,10 +19,12 @@ on:
|
||||
- '!.github/workflows/test.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
linux:
|
||||
name: JNI & Linux
|
||||
runs-on: ubuntu-latest
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
@@ -34,53 +36,38 @@ jobs:
|
||||
path: ~/.konan
|
||||
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-konan-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Check JNI
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
dependencies-cache-enabled: false
|
||||
arguments: jvmTest -PnoCrossCompile=true
|
||||
- name: Check Linux
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
dependencies-cache-enabled: false
|
||||
arguments: linuxTest -PnoCrossCompile=true
|
||||
|
||||
macos:
|
||||
name: iOS & Android
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Cached Konan
|
||||
- name: Cached Gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.konan
|
||||
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-konan-
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Install Automake
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: brew install automake
|
||||
- name: Set up shell
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: echo ::add-path::C:\msys64\usr\bin\
|
||||
- name: Check JVM
|
||||
shell: bash
|
||||
run: ./gradlew jvmTest
|
||||
- name: Check Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: ./gradlew linuxTest
|
||||
- name: Check iOS
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
wrapper-cache-enabled: false # https://github.com/eskatos/gradle-command-action/issues/24
|
||||
dependencies-cache-enabled: false
|
||||
arguments: iosX64Test -PnoCrossCompile=true
|
||||
if: matrix.os == 'macOS-latest'
|
||||
shell: bash
|
||||
run: ./gradlew iosX64Test
|
||||
- name: Check Android
|
||||
if: matrix.os == 'macOS-latest'
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: 29
|
||||
ndk: 21.3.6528147
|
||||
cmake: 3.10.2.4988404
|
||||
script: ./gradlew connectedCheck -PnoCrossCompile=true
|
||||
script: ./gradlew connectedCheck
|
||||
|
||||
Reference in New Issue
Block a user