on: push: jobs: build_and_test_cross_platform: # The host should always be linux runs-on: ubuntu-16.04 name: Build on ${{ matrix.distro }} ${{ matrix.arch }} # Run steps on a matrix of 2 arch/distro combinations strategy: fail-fast: false matrix: include: - arch: aarch64 distro: ubuntu16.04 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.8.0 with: access_token: ${{ github.token }} - uses: actions/checkout@v2 - uses: ./.github/actions/download-dl4j-test-resources-linux - uses: ./.github/actions/install-protobuf-linux - uses: ./.github/actions/install-cmake-linux - uses: uraimo/run-on-arch-action@v2.0.8 name: Build and test with ${{ matrix.arch }} ${{ matrix.distro }} id: build with: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} # Pass some environment variables to the container env: | # YAML, but pipe character is necessary DEBIAN_FRONTEND: noninteractive M2_HOME: /opt/maven # The shell to run commands with in the container shell: /bin/sh run: | echo "Running install on architecture ${{ matrix.arch }}" apt-get -yq update && apt-get install -y build-essential unzip libssl-dev echo "After install on architecture ${{ matrix.arch }}" export PATH="/opt/maven/bin:$PATH" echo "RUNNING ARCH ${{ matrix.arch }}" case "${{ matrix.arch }}" in armv7) export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-armhf/jre ;; aarch64) export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-arm64/jre" ;; ppc64le) export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-ppc64el/jre ;; esac mvn --version export PATH="/opt/cmake/bin:/opt/maven/bin:/opt/protobuf/bin:$PATH" cmake --version echo "Running build in ${pwd}" mvn -X -Possrh -pl :nd4j-tests -Djavacpp.platform=linux-x86_64 -Dlibnd4j.chip=cpu -Pcpu --batch-mode clean test -Dtest=org.nd4j.smoketests.SmokeTest