diff --git a/.github/actions/download-dl4j-test-resources-linux/action.yml b/.github/actions/download-dl4j-test-resources-linux/action.yml new file mode 100644 index 000000000..81d8266b7 --- /dev/null +++ b/.github/actions/download-dl4j-test-resources-linux/action.yml @@ -0,0 +1,11 @@ +name: Download dl4j test resources +runs: + using: composite + steps: + - name: Initial install + shell: bash + run: | + wget https://github.com/KonduitAI/dl4j-test-resources/archive/master.zip && unzip master.zip + cd dl4j-test-resources-master + mvn clean install -DskipTests + echo "Extracted test resources" \ No newline at end of file diff --git a/.github/actions/download-dl4j-test-resources-windows/action.yml b/.github/actions/download-dl4j-test-resources-windows/action.yml new file mode 100644 index 000000000..5683619e3 --- /dev/null +++ b/.github/actions/download-dl4j-test-resources-windows/action.yml @@ -0,0 +1,12 @@ +name: Download dl4j test resources +runs: + using: composite + steps: + - name: Initial install + shell: cmd + run: | + set "PATH=C:\msys64\usr\bin;%PATH%" + wget https://github.com/KonduitAI/dl4j-test-resources/archive/master.zip && unzip master.zip + cd dl4j-test-resources-master + mvn clean install -DskipTests + echo "Extracted test resources" \ No newline at end of file diff --git a/.github/actions/install-arm-cross-compile/action.yml b/.github/actions/install-arm-cross-compile/action.yml new file mode 100644 index 000000000..dcf52c4ab --- /dev/null +++ b/.github/actions/install-arm-cross-compile/action.yml @@ -0,0 +1,12 @@ +name: Download dl4j test resources +runs: + using: composite + steps: + - name: Initial install + shell: bash + run: | + sudo apt install git gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc \ + gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf crossbuild-essential-arm64 + mkdir -p /opt/raspberrypi && \ + cd /opt/raspberrypi && \ + git clone git://github.com/raspberrypi/tools.git diff --git a/.github/actions/install-protobuf-linux/action.yml b/.github/actions/install-protobuf-linux/action.yml new file mode 100644 index 000000000..f48a953b1 --- /dev/null +++ b/.github/actions/install-protobuf-linux/action.yml @@ -0,0 +1,16 @@ +name: Install protobuf linux +runs: + using: composite + steps: + - name: Install protobuf linux + shell: bash + run: | + curl -fsSL https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz \ + | tar xz && \ + cd protobuf-3.5.1 && \ + ./configure --prefix=/opt/protobuf && \ + make -j2 && \ + make install && \ + cd .. && \ + rm -rf protobuf-3.5.1 + echo "/opt/protobuf/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/.github/actions/msys2-base-setup/action.yml b/.github/actions/msys2-base-setup/action.yml new file mode 100644 index 000000000..272478d81 --- /dev/null +++ b/.github/actions/msys2-base-setup/action.yml @@ -0,0 +1,10 @@ +name: Setup for msys2 +runs: + using: composite + steps: + - name: Initial install + shell: cmd + run: | + C:\msys64\usr\bin\bash -lc "pacman -S --needed --noconfirm base-devel git tar pkg-config unzip p7zip zip autoconf autoconf-archive automake make patch gnupg" + C:\msys64\usr\bin\bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-nasm mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-gcc mingw-w64-i686-gcc mingw-w64-x86_64-gcc-fortran mingw-w64-i686-gcc-fortran mingw-w64-x86_64-libwinpthread-git mingw-w64-i686-libwinpthread-git mingw-w64-x86_64-SDL mingw-w64-i686-SDL mingw-w64-x86_64-ragel" + echo "C:\msys64\usr\bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/.github/actions/publish-gh-packages/action.yml b/.github/actions/publish-gh-packages/action.yml new file mode 100644 index 000000000..cb6f1424c --- /dev/null +++ b/.github/actions/publish-gh-packages/action.yml @@ -0,0 +1,9 @@ +name: Publish to github packages +runs: + using: composite + steps: + - name: Publish to GitHub Packages + run: mvn -Pgithub --batch-mode deploy + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build-android-x86_64.yml b/.github/workflows/build-android-x86_64.yml new file mode 100644 index 000000000..b7ed65a4d --- /dev/null +++ b/.github/workflows/build-android-x86_64.yml @@ -0,0 +1,39 @@ +on: + push: +jobs: + android-x86_64: + runs-on: ubuntu-18.04 + steps: + - uses: AutoModality/action-clean@v1 + - uses: ./.github/actions/install-protobuf-linux + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: nttld/setup-ndk@v1 + with: + ndk-version: r18b + - uses: actions/checkout@v2 + - name: Set up Java for publishing to GitHub Packages + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build on linux-x86_64 + env: + ANDROID_NDK: "/opt/hostedcache/ndk/r18b/x64" + OPENBLAS_PATH: "/opt/openblas/" + LIBND4J_HOME: "${GITHUB_WORKSPACE}/libnd4j" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + 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 + mvn -X -Dorg.bytedeco.javacpp.logger.debug=true -Pgithub -pl ":nd4j-native,:libnd4j" --also-make \ + -Djavacpp.platform=android-x86_64 \ + -Dlibnd4j.platform=android-x86_64 -Dlibnd4j.chip=cpu \ + --batch-mode clean deploy -DskipTests + + diff --git a/.github/workflows/build-deploy-android-arm32.yml b/.github/workflows/build-deploy-android-arm32.yml new file mode 100644 index 000000000..9cd45c767 --- /dev/null +++ b/.github/workflows/build-deploy-android-arm32.yml @@ -0,0 +1,43 @@ +on: + push: +jobs: + #Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads. + android-arm32: + runs-on: ubuntu-18.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: actions/checkout@v2 + - uses: ./.github/actions/install-protobuf-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 android-arm32 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEPLOY: 1 + BUILD_USING_MAVEN: 1 + TARGET_OS: android + CURRENT_TARGET: arm32 + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + mvn --version + cmake --version + protoc --version + ${GITHUB_WORKSPACE}/libnd4j/pi_build.sh + + diff --git a/.github/workflows/build-deploy-android-arm64.yml b/.github/workflows/build-deploy-android-arm64.yml new file mode 100644 index 000000000..794a1c3ad --- /dev/null +++ b/.github/workflows/build-deploy-android-arm64.yml @@ -0,0 +1,43 @@ +on: + push: +jobs: + #Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads. + android-arm64: + runs-on: self-hosted + steps: + - uses: AutoModality/action-clean@v1 + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - uses: ./.github/actions/install-protobuf-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 android-arm64 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEPLOY: 1 + BUILD_USING_MAVEN: 1 + TARGET_OS: android + CURRENT_TARGET: arm64 + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + mvn --version + cmake --version + protoc --version + ${GITHUB_WORKSPACE}/libnd4j/pi_build.sh + + diff --git a/.github/workflows/build-deploy-linux-arm32.yml b/.github/workflows/build-deploy-linux-arm32.yml new file mode 100644 index 000000000..b51bf385b --- /dev/null +++ b/.github/workflows/build-deploy-linux-arm32.yml @@ -0,0 +1,43 @@ +on: + push: +jobs: + #Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads. + linux-arm32: + runs-on: ubuntu-18.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: actions/checkout@v2 + - uses: ./.github/actions/install-protobuf-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-arm32 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEPLOY: 1 + BUILD_USING_MAVEN: 1 + TARGET_OS: linux + CURRENT_TARGET: arm32 + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + mvn --version + cmake --version + protoc --version + ${GITHUB_WORKSPACE}/libnd4j/pi_build.sh + + diff --git a/.github/workflows/build-deploy-linux-arm64.yml b/.github/workflows/build-deploy-linux-arm64.yml new file mode 100644 index 000000000..ff9ef5ae3 --- /dev/null +++ b/.github/workflows/build-deploy-linux-arm64.yml @@ -0,0 +1,40 @@ +on: + push: +jobs: + #Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads. + linux-arm64: + runs-on: ubuntu-18.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: actions/checkout@v2 + - uses: ./.github/actions/install-protobuf-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-arm64 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEPLOY: 1 + BUILD_USING_MAVEN: 1 + TARGET_OS: linux + CURRENT_TARGET: arm64 + PUBLISH_TO: ossrh + run: | + mvn --version + cmake --version + protoc --version + ${GITHUB_WORKSPACE}/libnd4j/pi_build.sh + + diff --git a/.github/workflows/build-deploy-linux-cuda-11.0.yml b/.github/workflows/build-deploy-linux-cuda-11.0.yml new file mode 100644 index 000000000..5e2effd39 --- /dev/null +++ b/.github/workflows/build-deploy-linux-cuda-11.0.yml @@ -0,0 +1,54 @@ +on: + push: +jobs: + + linux-x86_64-cuda_11-0: + runs-on: ubuntu-18.04 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 512 + swap-size-mb: 8192 + remove-dotnet: 'true' + remove-haskell: 'true' + - uses: actions/checkout@v2 + - uses: konduitai/cuda-install/.github/actions/install-cuda-ubuntu@master + env: + cuda: 11.0.167 + GCC: 9 + - uses: ./.github/actions/install-protobuf-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 cuda + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + export PATH="/usr/local/cuda-11.0/bin:$PATH" + mvn --version + cmake --version + protoc --version + nvcc --version + sudo apt-get autoremove + sudo apt-get clean + mvn -Possrh -Djavacpp.platform=linux-x86_64 -Dlibnd4j.compute="5.0 5.2 5.3 6.0 6.2 8.0" -Dlibnd4j.chip=cuda -pl ":nd4j-cuda-11.0,:deeplearning4j-cuda-11.0,:libnd4j" --also-make -Pcuda clean --batch-mode deploy -DskipTests + + diff --git a/.github/workflows/build-deploy-linux-cuda-11.2.yml b/.github/workflows/build-deploy-linux-cuda-11.2.yml new file mode 100644 index 000000000..a1b11d9d7 --- /dev/null +++ b/.github/workflows/build-deploy-linux-cuda-11.2.yml @@ -0,0 +1,51 @@ +on: + push: +jobs: + linux-x86_64-cuda-11-2: + runs-on: ubuntu-18.04 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 512 + swap-size-mb: 8192 + remove-dotnet: 'true' + remove-haskell: 'true' + - uses: actions/checkout@v2 + - uses: konduitai/cuda-install/.github/actions/install-cuda-ubuntu@master + env: + cuda: 11.2.1_461 + GCC: 9 + - uses: ./.github/actions/install-protobuf-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: Run cuda compilation on linux-x86_64 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + export PATH="/usr/local/cuda-11.2/bin:$PATH" + nvcc --version + mvn --version + cmake --version + protoc --version + sudo apt-get autoremove + sudo apt-get clean + bash ./change-cuda-versions.sh 11.2 + mvn -Possrh -Djavacpp.platform=linux-x86_64 -Dlibnd4j.compute="5.0 5.2 5.3 6.0 6.2 8.0" -pl ":nd4j-cuda-11.2,:deeplearning4j-cuda-11.2,:libnd4j" --also-make -Dlibnd4j.chip=cuda --batch-mode deploy -DskipTests diff --git a/.github/workflows/build-deploy-linux-jetsonnano-selfhosted.yml b/.github/workflows/build-deploy-linux-jetsonnano-selfhosted.yml new file mode 100644 index 000000000..ef0b02ca0 --- /dev/null +++ b/.github/workflows/build-deploy-linux-jetsonnano-selfhosted.yml @@ -0,0 +1,50 @@ +on: + push: +jobs: + #Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads. + linux-arm64: + runs-on: self-hosted + steps: + - uses: AutoModality/action-clean@v1 + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - name: Set up Java for publishing to GitHub Packages + uses: actions/setup-java@v1 + with: + java-version: 1.8 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build on linux-x86_64 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEPLOY: 1 + BUILD_USING_MAVEN: 1 + TARGET_OS: linux + CURRENT_TARGET: arm64 + CROSS_ROOT: ${GITHUB_WORKSPACE}/rootfs-nano + CROSS_COMPILE: ${GITHUB_WORKSPACE}/toolchain/gcc-4.8.5-aarch64/bin + CC: ${CROSS_COMPILE}/aarch64-unknown-linux-gnu-gcc + CXX: ${CROSS_COMPILE}/aarch64-unknown-linux-gnu-g++ + LD: ${CROSS_COMPILE}/aarch64-unknown-linux-gnu-ld + AR: ${CROSS_COMPILE}/aarch64-unknown-linux-gnu-ar + AS: ${CROSS_COMPILE}/aarch64-unknown-linux-gnu-as + RANLIB: ${CROSS_COMPILE}/aarch64-unknown-linux-gnu-ranlib + NVCC: ${GITHUB_WORKSPACE}/cuda-10.2/bin/nvcc + + run: | + wget https://developer.nvidia.com/embedded/dlc/l4t-gcc-toolchain-64-bit-28-3 + tar xpvf l4t-gcc-toolchain-64-bit-28-3 + mv install gcc-4.8.5-aarch64 + ${GITHUB_WORKSPACE}/change-cuda-versions.sh 10.2 + wget https://github.com/KonduitAI/deeplearning4j/releases/download/cuda-10.2/cuda-10.2.tar + tar xvf cuda-10.2.tar + mvn --version + cmake --version + protoc --version + ${GITHUB_WORKSPACE}/libnd4j/pi_build.sh + + diff --git a/.github/workflows/build-deploy-linux-x86_64.yml b/.github/workflows/build-deploy-linux-x86_64.yml new file mode 100644 index 000000000..e53fcd174 --- /dev/null +++ b/.github/workflows/build-deploy-linux-x86_64.yml @@ -0,0 +1,40 @@ +on: + push: +jobs: + #Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads. + linux-x86_64: + runs-on: ubuntu-18.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/install-protobuf-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 + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + mvn --version + cmake --version + protoc --version + sudo apt-get autoremove + sudo apt-get clean + mvn -X -Possrh -Djavacpp.platform=linux-x86_64 -Dlibnd4j.chip=cpu -Pcpu --batch-mode deploy -DskipTests + + diff --git a/.github/workflows/build-deploy-mac-arm64.yml b/.github/workflows/build-deploy-mac-arm64.yml new file mode 100644 index 000000000..bb1b81888 --- /dev/null +++ b/.github/workflows/build-deploy-mac-arm64.yml @@ -0,0 +1,33 @@ +on: + push: +jobs: + mac-x86_64: + runs-on: macos-10.15 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - 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 and install + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + brew install unzip ccache gcc swig autoconf-archive automake cmake libomp libtool libusb ant maven nasm xz pkg-config sdl gpg1 bison flex perl ragel binutils gradle gmp isl libmpc mpfr wget python + mvn -Possrh -Djavacpp.platform=macosx-arm64 -Djavacpp.platform=macosx-arm64 -pl ":nd4j-native,:libnd4j" --also-make -Dlibnd4j.platform=macosx-x86_64 -Dlibnd4j.chip=cpu clean --batch-mode deploy -DskipTests + + diff --git a/.github/workflows/build-deploy-mac.yml b/.github/workflows/build-deploy-mac.yml new file mode 100644 index 000000000..e1fc56bd9 --- /dev/null +++ b/.github/workflows/build-deploy-mac.yml @@ -0,0 +1,33 @@ +on: + push: +jobs: + mac-x86_64: + runs-on: macos-10.15 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - 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 and install + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + brew install unzip ccache gcc swig autoconf-archive automake cmake libomp libtool libusb ant maven nasm xz pkg-config sdl gpg1 bison flex perl ragel binutils gradle gmp isl libmpc mpfr wget python + mvn -Possrh -Djavacpp.platform=macosx-x86_64 -Djavacpp.platform=macosx-x86_64 -pl ":nd4j-native,:libnd4j" --also-make -Dlibnd4j.platform=macosx-x86_64 -Dlibnd4j.chip=cpu clean --batch-mode deploy -DskipTests + + diff --git a/.github/workflows/build-deploy-windows-cuda-11.0.yml b/.github/workflows/build-deploy-windows-cuda-11.0.yml new file mode 100644 index 000000000..117d6e161 --- /dev/null +++ b/.github/workflows/build-deploy-windows-cuda-11.0.yml @@ -0,0 +1,45 @@ +on: + push: +jobs: + windows-x86_64-cuda-11-0: + runs-on: windows-2019 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - name: Use existing msys2 to setup environment + uses: ./.github/actions/msys2-base-setup + - uses: konduitai/cuda-install/.github/actions/install-cuda-windows@master + env: + cuda: 11.0.167 + - 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: Run windows build + shell: cmd + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + set MSYSTEM=MINGW64 + set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0" + which cmake + dir "%CUDA_PATH%" + dir "%CUDA_PATH%\lib" + set "PATH=C:\msys64\usr\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\lib\x64;%PATH%" + echo "Running cuda build" + mvn -Possrh -Djavacpp.platform=windows-x86_64 -Dlibnd4j.compute="5.0 5.2 5.3 6.0 6.2 8.0" -Djavacpp.platform=windows-x86_64 -pl ":nd4j-cuda-11.0,:deeplearning4j-cuda-11.0,:libnd4j" --also-make -Dlibnd4j.platform=windows-x86_64 -Pcuda -Dlibnd4j.chip=cuda -Pcuda clean --batch-mode deploy -DskipTests + + diff --git a/.github/workflows/build-deploy-windows-cuda-11.2.yml b/.github/workflows/build-deploy-windows-cuda-11.2.yml new file mode 100644 index 000000000..d46cb094f --- /dev/null +++ b/.github/workflows/build-deploy-windows-cuda-11.2.yml @@ -0,0 +1,47 @@ +on: + push: +jobs: + windows-x86_64-cuda-11-2: + runs-on: windows-2019 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - name: Use existing msys2 to setup environment + uses: ./.github/actions/msys2-base-setup + - uses: konduitai/cuda-install/.github/actions/install-cuda-windows@master + env: + cuda: 11.2.1 + - 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: Run cuda build + shell: cmd + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + set MSYSTEM=MINGW64 + set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2" + dir "%CUDA_PATH%" + dir "%CUDA_PATH%\lib" + which cmake + set "PATH=C:\msys64\usr\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\lib\x64;%PATH%" + echo "Running cuda build" + bash ./change-cuda-versions.sh 11.2 + sudo apt-get autoremove + sudo apt-get clean + mvn -Possrh -Djavacpp.platform=linux-x86_64 -Dlibnd4j.compute="5.0 5.2 5.3 6.0 6.2 8.0" -Djavacpp.platform=windows-x86_64 -pl ":nd4j-cuda-11.2,:libnd4j,:deeplearning4j-cuda-11.2" --also-make -Dlibnd4j.platform=windows-x86_64 -Pcuda -Dlibnd4j.chip=cuda -Pcuda clean --batch-mode deploy -DskipTests + diff --git a/.github/workflows/build-deploy-windows.yml b/.github/workflows/build-deploy-windows.yml new file mode 100644 index 000000000..e55099e66 --- /dev/null +++ b/.github/workflows/build-deploy-windows.yml @@ -0,0 +1,34 @@ +on: + push: +jobs: + + windows-x86_64: + runs-on: windows-2019 + 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/msys2-base-setup + - 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: Run windows cpu build + shell: cmd + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_TO: ossrh + MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }} + run: | + set MSYSTEM=MINGW64 + set "PATH=C:\msys64\usr\bin;%PATH%" + mvn -Possrh -Djavacpp.platform=windows-x86_64 -pl ":nd4j-native,:libnd4j" --also-make -Dlibnd4j.platform=windows-x86_64 -Dlibnd4j.chip=cpu deploy -DskipTests