Skip to content

Commit

Permalink
build_sample depends on build_jar, build_native_sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Montura committed Jan 29, 2024
1 parent c0390d1 commit 23a98ba
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,44 @@ jobs:
path: release
overwrite: true

build_native:
needs: build_jar
build_native_sdk:
name: Build dxfeed-jni-native-sdk shared native library on ${{ matrix.OS_NAME }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
OS_NAME: win-x64
script_name: cmd.exe /c build_release.cmd
working_directory: src\main\c\jni-lib
- os: ubuntu-latest
OS_NAME: linux-x64
script_name: sh build_release.sh
working_directory: src/main/c/jni-lib
- os: macos-latest
OS_NAME: osx-x64
script_name: sh build_release.sh
working_directory: src/main/c/jni-lib

steps:
- name: Checkout
uses: actions/checkout@master

- name: Build DxFeedJniNativeSdk
run: ${{ matrix.script_name }}
working-directory: ${{ matrix.working_directory }}

- run: mkdir staging && cp ${{ matrix.working_directory }}/build/DxFeedJniNativeSdk.* staging
- uses: actions/upload-artifact@v4
with:
name: DxFeedJniNativeSdk-${{ matrix.OS_NAME }}
path: staging
overwrite: true

build_sample:
needs: [build_jar, build_native_sdk]
name: Build DxFeedConnect sample on ${{ matrix.OS_NAME }}
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ${{ matrix.working_directory }}
Expand Down Expand Up @@ -69,7 +103,11 @@ jobs:
- run: mkdir build && cp ${{ github.workspace }}/dxfeed-jni-native-sdk-jar/dxfeed-jni-native-sdk-0.1.0.jar ./build
- run: ls -la ./build

- name: Build DxFeedJniNativeSdk
- run: ls -la ${{ github.workspace }}/DxFeedJniNativeSdk-${{ matrix.OS_NAME }}
- run: cp ${{ github.workspace }}/DxFeedJniNativeSdk-${{ matrix.OS_NAME }}/DxFeedJniNativeSdk.* ./build
- run: ls -la ./build

- name: Build DxFeedConnect
run: ${{ matrix.script_name }}
working-directory: ${{ matrix.working_directory }}

Expand All @@ -78,7 +116,7 @@ jobs:
- run: mkdir release
- run: cp ./build/${{ matrix.exec_name }} ./release
- run: cp ./build/DxFeedJniNativeSdk.* ./release
- run: cp ./build/dxfeed-jni-native ./release
- run: cp ./build/dxfeed-jni-native-sdk-0.1.0.jar ./release
- run: ls -la ./release

- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 23a98ba

Please sign in to comment.