From 0000bc4b8e64331a6eef80e9769397e606f80821 Mon Sep 17 00:00:00 2001 From: Ugljesa Jovanovic Date: Thu, 11 Jun 2020 20:29:50 +0200 Subject: [PATCH] Disable macos and linux builds while we are setting up windows builds Add windows cache directories fix yml Fix YAML Get java first on windows build Try to replace mingw with msys in script Try windows build without the toolchain, since we are bringing our own taskkill was failing Different libtool package name Add autoconf to msys2 Install mingw-w64-x86_64-toolchain but with each package instead of a group which interrupts installation Msys2 cant find make, try using alias Make everything executable, add some debugging logs to windowsBuild Skip building, debug make Find all make files Another attempt Attempt different alias Try with symbolic link Attempt mingw64 Forgot to change folder Attempt N Set -e+e Try with cygwin mingw again Move Add more debug logs Add +e to see what fails now try direct make --- .travis.yml | 155 +++++++++++++++++------------- linuxBuild.sh | 0 linuxBuildAndPublish.sh | 0 macBuild-mac-ios.sh | 0 macBuild-pure.sh | 0 macBuild-tvos.sh | 0 macBuild-watchos.sh | 0 macBuild.sh | 0 macBuildAndPublish-mac-ios.sh | 0 macBuildAndPublish-pure.sh | 0 macBuildAndPublish-tvos.sh | 0 macBuildAndPublish-watchos.sh | 0 sodiumWrapper/configureMingw64.sh | 2 +- sodiumWrapper/makeMingwX86-64.sh | 5 +- windowsBuild.sh | 9 +- windowsBuildAndPublish.sh | 0 16 files changed, 99 insertions(+), 72 deletions(-) mode change 100644 => 100755 linuxBuild.sh mode change 100644 => 100755 linuxBuildAndPublish.sh mode change 100644 => 100755 macBuild-mac-ios.sh mode change 100644 => 100755 macBuild-pure.sh mode change 100644 => 100755 macBuild-tvos.sh mode change 100644 => 100755 macBuild-watchos.sh mode change 100644 => 100755 macBuild.sh mode change 100644 => 100755 macBuildAndPublish-mac-ios.sh mode change 100644 => 100755 macBuildAndPublish-pure.sh mode change 100644 => 100755 macBuildAndPublish-tvos.sh mode change 100644 => 100755 macBuildAndPublish-watchos.sh mode change 100644 => 100755 windowsBuild.sh mode change 100644 => 100755 windowsBuildAndPublish.sh diff --git a/.travis.yml b/.travis.yml index a1a7730..ff8d6b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,57 +16,57 @@ matrix: # - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./linuxBuild.sh; fi' # - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./linuxBuildAndPublish.sh; fi' # OSX macos/ios - - os: osx - name: osx-mac-ios - osx_image: xcode11.4 - language: java - jdk: openjdk12 - install: true - env: - KBUILD=linux - JAVA_OPTS=-Xmx2g - script: - - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-mac-ios.sh; fi' - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-mac-ios.sh; fi' - # OSX watchos - - os: osx - name: osx-watchos - osx_image: xcode11.4 - language: java - jdk: openjdk12 - install: true - env: - KBUILD=linux - JAVA_OPTS=-Xmx2g - script: - - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-watchos.sh; fi' - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-watchos.sh; fi' - # OSX tvos - - os: osx - name: osx-tvos - osx_image: xcode11.4 - language: java - jdk: openjdk12 - install: true - env: - KBUILD=linux - JAVA_OPTS=-Xmx2g - script: - - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-tvos.sh; fi' - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-tvos.sh; fi' - # OSX pure - - os: osx - name: osx-pure - osx_image: xcode11.4 - language: java - jdk: openjdk12 - install: true - env: - KBUILD=linux - JAVA_OPTS=-Xmx2g - script: - - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-pure.sh; fi' - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-pure.sh; fi' +# - os: osx +# name: osx-mac-ios +# osx_image: xcode11.4 +# language: java +# jdk: openjdk12 +# install: true +# env: +# KBUILD=linux +# JAVA_OPTS=-Xmx2g +# script: +# - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-mac-ios.sh; fi' +# - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-mac-ios.sh; fi' +# # OSX watchos +# - os: osx +# name: osx-watchos +# osx_image: xcode11.4 +# language: java +# jdk: openjdk12 +# install: true +# env: +# KBUILD=linux +# JAVA_OPTS=-Xmx2g +# script: +# - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-watchos.sh; fi' +# - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-watchos.sh; fi' +# # OSX tvos +# - os: osx +# name: osx-tvos +# osx_image: xcode11.4 +# language: java +# jdk: openjdk12 +# install: true +# env: +# KBUILD=linux +# JAVA_OPTS=-Xmx2g +# script: +# - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-tvos.sh; fi' +# - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-tvos.sh; fi' +# # OSX pure +# - os: osx +# name: osx-pure +# osx_image: xcode11.4 +# language: java +# jdk: openjdk12 +# install: true +# env: +# KBUILD=linux +# JAVA_OPTS=-Xmx2g +# script: +# - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild-pure.sh; fi' +# - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish-pure.sh; fi' - os: windows name: windows language: shell @@ -76,26 +76,49 @@ matrix: - JAVA_OPTS=-Xmx2g - JDK="adopt-openj9@1.11" before_install: - - [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64 - - choco uninstall -y mingw - - choco upgrade --no-progress -y msys2 - - export msys2='cmd //C RefreshEnv.cmd ' - - export msys2+='& set MSYS=winsymlinks:nativestrict ' - - export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start' - - export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --" - - export msys2+=" -msys2 -c "\"\$@"\" --" - - $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-libtool automake-wrapper - - taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967 - - export PATH=/C/tools/msys64/mingw64/bin:$PATH - - export MAKE=mingw32-make # so that Autotools can find it - curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh - source ~/.install-jdk-travis.sh + - |- + case $TRAVIS_OS_NAME in + windows) + [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64 + choco uninstall -y mingw + choco upgrade --no-progress -y msys2 bazel + export msys2='cmd //C RefreshEnv.cmd ' + export msys2+='& set MSYS=winsymlinks:nativestrict ' + export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start' + export shell="$msys2 -mingw64 -full-path -here -c \$\* --" + export msys2+=" -msys2 -c \$\* --" + $msys2 pacman --sync --noconfirm --needed \ + autoconf \ + automake \ + mingw-w64-x86_64-libtool \ + mingw-w64-x86_64-toolchain \ + perl \ + unzip + taskkill //IM gpg-agent.exe //F + export CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1 + export PATH=/C/tools/msys64/mingw64/bin:$PATH + export GNU_MAKE=mingw32-make + export MAKE=mingw32-make + export AR=gcc-ar + export RANLIB=gcc-ranlib + export COVERITY_SCAN_BRANCH_PATTERN=disable_coverity_scan + ;; + esac + - export GIT=git + - g++ --version + - $GNU_MAKE --version + - $GIT --version + install: true before_cache: - # https://unix.stackexchange.com/a/137322/107554 - $msys2 pacman --sync --clean --noconfirm script: - - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./windowsBuild.sh; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then $shell ./windowsBuild.sh; fi' - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./windowsBuildAndPublish.sh; fi' + - make -j4 -C libsodium clean + - make -j4 -C libsodium + - make -j4 -C libsodium install cache: directories: - $HOME/.m2/ @@ -103,6 +126,8 @@ cache: - $HOME/.gradle/wrapper/ - $HOME/.konan/cache - $HOME/.konan/dependencies + - $HOME/AppData/Local/Temp/chocolatey + - /C/tools/msys64 branches: only: - master diff --git a/linuxBuild.sh b/linuxBuild.sh old mode 100644 new mode 100755 diff --git a/linuxBuildAndPublish.sh b/linuxBuildAndPublish.sh old mode 100644 new mode 100755 diff --git a/macBuild-mac-ios.sh b/macBuild-mac-ios.sh old mode 100644 new mode 100755 diff --git a/macBuild-pure.sh b/macBuild-pure.sh old mode 100644 new mode 100755 diff --git a/macBuild-tvos.sh b/macBuild-tvos.sh old mode 100644 new mode 100755 diff --git a/macBuild-watchos.sh b/macBuild-watchos.sh old mode 100644 new mode 100755 diff --git a/macBuild.sh b/macBuild.sh old mode 100644 new mode 100755 diff --git a/macBuildAndPublish-mac-ios.sh b/macBuildAndPublish-mac-ios.sh old mode 100644 new mode 100755 diff --git a/macBuildAndPublish-pure.sh b/macBuildAndPublish-pure.sh old mode 100644 new mode 100755 diff --git a/macBuildAndPublish-tvos.sh b/macBuildAndPublish-tvos.sh old mode 100644 new mode 100755 diff --git a/macBuildAndPublish-watchos.sh b/macBuildAndPublish-watchos.sh old mode 100644 new mode 100755 diff --git a/sodiumWrapper/configureMingw64.sh b/sodiumWrapper/configureMingw64.sh index 2ac3710..d39417c 100755 --- a/sodiumWrapper/configureMingw64.sh +++ b/sodiumWrapper/configureMingw64.sh @@ -47,4 +47,4 @@ if [ -z "$SYSROOT" ]; then echo $CC fi -./configure --prefix=$PREFIX "$@" +./configure --disable-dependecy-tracking --prefix=$PREFIX "$@" diff --git a/sodiumWrapper/makeMingwX86-64.sh b/sodiumWrapper/makeMingwX86-64.sh index da61da3..9f17086 100755 --- a/sodiumWrapper/makeMingwX86-64.sh +++ b/sodiumWrapper/makeMingwX86-64.sh @@ -1,5 +1,4 @@ #!/bin/sh ./configureMingw64.sh -make -j32 -C libsodium clean -make -j32 -C libsodium -make -j32 -C libsodium install +echo "Configure done" + diff --git a/windowsBuild.sh b/windowsBuild.sh old mode 100644 new mode 100755 index afaadcf..f80432e --- a/windowsBuild.sh +++ b/windowsBuild.sh @@ -1,13 +1,16 @@ -set -e +set +daae #!/bin/sh #this will hopefully download all konan dependancies that we use in the build scripts + ./gradlew multiplatform-crypto-api:build cd sodiumWrapper +echo "Starting mingw libsodium build" ./makeMingwX86-64.sh +echo "completed libsodium build" #now we can do the delegated build cd .. -./gradlew multiplatform-crypto-delegated:build +#./gradlew multiplatform-crypto-delegated:build #and finally pure build -./gradlew multiplatform-crypto:build +#./gradlew multiplatform-crypto:build set +e diff --git a/windowsBuildAndPublish.sh b/windowsBuildAndPublish.sh old mode 100644 new mode 100755