Rational ci (#3)

* Only test when pushing on master OR when there's a PR

* Added the bintray badge as well as the repository informations to README.

* Do not re-launch CI when updating documentation, auto-publish when pushing a snapshot.

* Update README.md

Co-authored-by: Salomon BRYS <salomon@kodein.net>
This commit is contained in:
Salomon BRYS 2020-07-06 11:37:10 +02:00 committed by GitHub
parent e2e250fb16
commit 316e585e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 4 deletions

View File

@ -4,6 +4,12 @@ on:
push: push:
branches: branches:
- 'snapshot/*' - 'snapshot/*'
paths-ignore:
- '**.md'
- '**.adoc'
- '**/.gitignore'
- './github/**'
- '!./github/workflow/snapshot.yml'
jobs: jobs:

View File

@ -2,8 +2,15 @@ name: Check
on: on:
push: push:
branches-ignore: branches:
- 'snapshot/*' - 'master'
pull_request:
paths-ignore:
- '**.md'
- '**.adoc'
- '**/.gitignore'
- './github/**'
- '!./github/workflow/test.yml'
jobs: jobs:

View File

@ -4,6 +4,19 @@ Kotlin/Multiplatform wrapper for Bitcoin Core's secp256k1 library. Targets: JVM,
## Installation ## Installation
[ ![Download](https://api.bintray.com/packages/acinq/libs/secp256k1-kmp/images/download.svg) ](https://bintray.com/acinq/libs/secp256k1-kmp/0.1.0-1.4-M2/link)
First, you need to add the ACINQ libraries repository:
```kotlin
// build.gradle.kts
repositories {
maven(url = "https://dl.bintray.com/acinq/libs")
}
```
Then, the actual dependency depends on your targeted platform(s):
### Multiplatform ### Multiplatform
Add the `secp256k1` dependency to the common sourceSet, and the JNI dependencies to JVM and Android sourcesets: Add the `secp256k1` dependency to the common sourceSet, and the JNI dependencies to JVM and Android sourcesets:
@ -44,7 +57,7 @@ kotlin {
Native targets include libsecp256k1, called through KMP's c-interop, simply add the `fr.acinq.secp256k1:secp256k1` dependency. Native targets include libsecp256k1, called through KMP's c-interop, simply add the `fr.acinq.secp256k1:secp256k1` dependency.
### JVM target & Android ### JVM targets & Android
The JVM library uses JNI bindings for libsecp256k1, which is much faster than BouncyCastle. It will extract and load native bindings for your operating system in a temporary directory. The JVM library uses JNI bindings for libsecp256k1, which is much faster than BouncyCastle. It will extract and load native bindings for your operating system in a temporary directory.

View File

@ -117,10 +117,11 @@ allprojects {
if (bintrayUsername == null || bintrayApiKey == null) logger.warn("Skipping bintray configuration as bintrayUsername or bintrayApiKey is not defined") if (bintrayUsername == null || bintrayApiKey == null) logger.warn("Skipping bintray configuration as bintrayUsername or bintrayApiKey is not defined")
else { else {
val btRepo = if (snapshotNumber != null) "snapshots" else "libs" val btRepo = if (snapshotNumber != null) "snapshots" else "libs"
val btPublish = if (snapshotNumber != null) "1" else "0"
repositories { repositories {
maven { maven {
name = "bintray" name = "bintray"
setUrl("https://api.bintray.com/maven/acinq/$btRepo/${rootProject.name}/;publish=0") setUrl("https://api.bintray.com/maven/acinq/$btRepo/${rootProject.name}/;publish=$btPublish")
credentials { credentials {
username = bintrayUsername username = bintrayUsername
password = bintrayApiKey password = bintrayApiKey