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
|
||||
|
||||
Reference in New Issue
Block a user