diff --git a/.travis.yml b/.travis.yml index f34515f..144f1c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,30 @@ matrix: include: - - os: linux - language: java - jdk: openjdk12 -# before_script: -# - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh -# - source install-jdk.sh --url 'https://api.adoptopenjdk.net/v2/binary/releases/openjdk12?openjdk_impl=hotspot&os=linux&arch=x64&release=latest&heap_size=normal&type=jdk' -# - java --version - env: - KBUILD=linux - JAVA_OPTS=-Xmx2g - #skip ./gradlew assemble that is normally invoked in installation step - install: - - sudo apt-get update - - sudo apt-get -y install automake - script: - - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./linuxBuild.sh; fi' - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./linuxBuildAndPublish.sh; fi' -# - os: osx -# osx_image: xcode11.4 +# - os: linux # language: java # jdk: openjdk12 -# ------------------------- -# before_script: -# - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh -# - source install-jdk.sh --url 'https://api.adoptopenjdk.net/v2/binary/releases/openjdk12?openjdk_impl=hotspot&os=linux&arch=x64&release=latest&heap_size=normal&type=jdk' -# - java --version -# ------------------------- +# # env: # KBUILD=linux # JAVA_OPTS=-Xmx2g +# #skip ./gradlew assemble that is normally invoked in installation step +# install: +# - sudo apt-get update +# - sudo apt-get -y install automake # script: -# - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild.sh; fi' -# - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish.sh; fi' +# - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./linuxBuild.sh; fi' +# - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./linuxBuildAndPublish.sh; fi' + - os: osx + 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.sh; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish.sh; fi' # - os: windows # language: shell # jdk: openjdk12 diff --git a/macBuild.sh b/macBuild.sh index 6c1fb2c..d68327a 100644 --- a/macBuild.sh +++ b/macBuild.sh @@ -1 +1,16 @@ -./gradlew build \ No newline at end of file +set -e +#!/bin/sh +#this will hopefully download all konan dependancies that we use in the build scripts +./gradlew multiplatform-crypto-api:build +#now let's build linux deps +cd sodiumWrapper +./makeMacosX86-64 +./makeIos.sh +./makeTvos.sh +./makeWatchos.sh +#now we can do the delegated build +cd .. +./gradlew multiplatform-crypto-delegated:build +#and finally pure build +./gradlew multiplatform-crypto:build +set +e \ No newline at end of file diff --git a/macBuildAndPublish.sh b/macBuildAndPublish.sh index 6f19584..778a78e 100644 --- a/macBuildAndPublish.sh +++ b/macBuildAndPublish.sh @@ -1 +1,17 @@ +set -e +#!/bin/sh +#this will hopefully download all konan dependancies that we use in the build scripts +./gradlew multiplatform-crypto-api:build +#now let's build linux deps +cd sodiumWrapper +./makeMacosX86-64 +./makeIos.sh +./makeTvos.sh +./makeWatchos.sh +#now we can do the delegated build +cd .. +./gradlew multiplatform-crypto-delegated:build +#and finally pure build +./gradlew multiplatform-crypto:build ./gradlew build publishIos64ArmPublicationToSnapshotRepository publishIosPublicationToSnapshotRepository publishMacosX64PublicationToSnapshotRepository publishIos32ArmPublicationToSnapshotRepository +set +e \ No newline at end of file