cavis/.github/workflows/build-android-x86_64.yml

69 lines
2.6 KiB
YAML

on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
# Wait for up to a minute for previous run to complete, abort if not done by then
pre-ci:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: 'Block Concurrent Executions'
uses: softprops/turnstyle@v1
with:
poll-interval-seconds: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
android-x86_64:
needs: pre-ci
runs-on: ubuntu-16.04
steps:
- uses: AutoModality/action-clean@v1
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r18b
- uses: actions/checkout@v2
- uses: ./.github/actions/update-deps-linux
- uses: ./.github/actions/install-protobuf-linux
- uses: ./.github/actions/install-cmake-linux
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.SONATYPE_GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build on linux-x86_64
env:
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
LIBND4J_HOME: ${GITHUB_WORKSPACE}/libnd4j
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }}
OPENBLAS_PATH: ${HOME}/.javacpp/cache/openblas-0.3.13-1.5.5-android-x86_64.jar/lib/
DEPLOY_TO: ossrh
run: |
echo "Verifying programs on path. Path is $PATH"
echo "Path post update is $PATH. Maven is at `which mvn` cmake is at `which cmake` protoc is at `which protoc`"
mvn --version
cmake --version
protoc --version
clang --version
export LIBND4J_HOME=${GITHUB_WORKSPACE}/libnd4j
export OPENBLAS_PATH=${HOME}/.javacpp/cache/openblas-0.3.13-1.5.5-android-x86_64.jar/lib/
mvn -X -Dorg.bytedeco.javacpp.logger.debug=true -Possrh -pl ":nd4j-native,:libnd4j" --also-make \
-Djavacpp.platform=android-x86_64 \
-DskipTestResourceEnforcement=true \
-Dlibnd4j.platform=android-x86_64 -Dlibnd4j.chip=cpu \
--batch-mode clean deploy -DskipTests