|
| 1 | +name: Compile bdk-jvm For All Targets |
| 2 | +on: [workflow_dispatch] |
| 3 | + |
| 4 | +permissions: {} |
| 5 | + |
| 6 | +jobs: |
| 7 | + build-macOS-native-libs: |
| 8 | + name: "Create M1 and x86_64 native binaries" |
| 9 | + runs-on: macos-14 |
| 10 | + steps: |
| 11 | + - name: "Checkout publishing branch" |
| 12 | + uses: actions/checkout@v4 |
| 13 | + with: |
| 14 | + submodules: recursive |
| 15 | + persist-credentials: false |
| 16 | + fetch-depth: 0 |
| 17 | + |
| 18 | + - name: "Set up JDK" |
| 19 | + uses: actions/setup-java@v4 |
| 20 | + with: |
| 21 | + distribution: temurin |
| 22 | + java-version: 17 |
| 23 | + |
| 24 | + - name: "Build bdk-jvm library" |
| 25 | + run: | |
| 26 | + bash ./scripts/build-macos-aarch64.sh |
| 27 | + bash ./scripts/build-macos-x86_64.sh |
| 28 | +
|
| 29 | + - name: "Upload macOS native libraries" |
| 30 | + uses: actions/upload-artifact@v4 |
| 31 | + with: |
| 32 | + name: artifact-macos |
| 33 | + path: /Users/runner/work/bdk-jvm/bdk-jvm/lib/src/main/resources/ |
| 34 | + |
| 35 | + build-windows-native-lib: |
| 36 | + name: "Create Windows native binaries" |
| 37 | + runs-on: windows-2022 |
| 38 | + steps: |
| 39 | + - name: "Checkout publishing branch" |
| 40 | + uses: actions/checkout@v4 |
| 41 | + with: |
| 42 | + submodules: recursive |
| 43 | + persist-credentials: false |
| 44 | + fetch-depth: 0 |
| 45 | + |
| 46 | + - name: "Set up JDK" |
| 47 | + uses: actions/setup-java@v4 |
| 48 | + with: |
| 49 | + distribution: temurin |
| 50 | + java-version: 17 |
| 51 | + |
| 52 | + - name: "Build bdk-jvm library" |
| 53 | + run: bash ./scripts/build-windows-x86_64.sh |
| 54 | + |
| 55 | + - name: "Upload Windows native libraries" |
| 56 | + uses: actions/upload-artifact@v4 |
| 57 | + with: |
| 58 | + name: artifact-windows |
| 59 | + path: D:\a\bdk-jvm\bdk-jvm\lib\src\main\resources\ |
| 60 | + |
| 61 | + build-full-library: |
| 62 | + name: Create full bdk-jvm library |
| 63 | + needs: [build-macOS-native-libs, build-windows-native-lib] |
| 64 | + runs-on: ubuntu-24.04 |
| 65 | + steps: |
| 66 | + - name: "Checkout publishing branch" |
| 67 | + uses: actions/checkout@v4 |
| 68 | + with: |
| 69 | + submodules: recursive |
| 70 | + persist-credentials: false |
| 71 | + fetch-depth: 0 |
| 72 | + |
| 73 | + - name: "Set up JDK" |
| 74 | + uses: actions/setup-java@v4 |
| 75 | + with: |
| 76 | + distribution: temurin |
| 77 | + java-version: 17 |
| 78 | + |
| 79 | + - name: "Build bdk-jvm library" |
| 80 | + run: bash ./scripts/build-linux-x86_64.sh |
| 81 | + |
| 82 | + - name: "Download macOS native binaries from previous job" |
| 83 | + uses: actions/download-artifact@v4 |
| 84 | + with: |
| 85 | + name: artifact-macos |
| 86 | + path: ./bdk-jvm/lib/src/main/resources/ |
| 87 | + |
| 88 | + - name: "Download Windows native libraries from previous job" |
| 89 | + uses: actions/download-artifact@v4 |
| 90 | + with: |
| 91 | + name: artifact-windows |
| 92 | + path: ./bdk-jvm/lib/src/main/resources/ |
| 93 | + |
| 94 | + - name: "Upload library code and binaries" |
| 95 | + uses: actions/upload-artifact@v4 |
| 96 | + with: |
| 97 | + name: artifact-full |
| 98 | + path: ./bdk-jvm/lib/ |
0 commit comments