-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (55 loc) · 1.52 KB
/
java.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build Java library
on:
pull_request:
branches:
- master
push:
branches:
- develop
jobs:
build_native:
name: Build depends native library
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Build project using cargo
run: cargo build --release
working-directory: schnorr-musig-c
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: schnorr-musig-c-lib
path: schnorr-musig-c/target/release/*musig_c.*
test:
name: Test java project
runs-on: ubuntu-latest
needs: build_native
steps:
- uses: actions/checkout@v2
- name: Load native libraries
uses: actions/download-artifact@v2
with:
name: schnorr-musig-c-lib
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- run: mkdir -p ./src/main/resources/natives/linux_64 && cp ./libmusig_c.so ./src/main/resources/natives/linux_64
- name: Test with Gradle
run: gradle clean test