From 947faacae15c502ddaa5afdc2f9ae1071299e73f Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 16:21:02 +0100 Subject: [PATCH 01/33] Clean up deployment artifacts - Ship macOS VMs in a DMG file (#170) - Clean up build junk that came with Windows VMs (#171) --- .bintray.json | 2 +- .travis_build.sh | 67 ++++++++++++++---------------------- .travis_deploy.sh | 7 +++- deploy/generate-artifacts.sh | 36 +++++++++++++++++++ 4 files changed, 68 insertions(+), 44 deletions(-) create mode 100755 deploy/generate-artifacts.sh diff --git a/.bintray.json b/.bintray.json index ffca481178..d812aa0512 100644 --- a/.bintray.json +++ b/.bintray.json @@ -9,7 +9,7 @@ "desc": "Automatic build" }, "files": [ - {"includePattern": "./(cog_.*\\.(?:gz|zip))", "uploadPattern": "$1"} + {"includePattern": "./products/(cog_.*\\.(?:gz|zip|dmg))", "uploadPattern": "$1"} ], "publish": true } diff --git a/.travis_build.sh b/.travis_build.sh index fdf6499692..1fd54230f9 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -4,7 +4,6 @@ set -e source ./.travis_helpers.sh if [[ "${APPVEYOR}" ]]; then - TRAVIS_BUILD_DIR="$(pwd)" TRAVIS_TAG="${APPVEYOR_REPO_TAG}" PLATFORM="windows" @@ -25,22 +24,22 @@ fi [[ -z "${FLAVOR}" ]] && exit 3 if [[ "${ARCH}" == "linux32ARM"* ]]; then - # we're in chroot at this point + # we're in chroot at this point export LC_ALL=C export LC_CTYPE=C export LANG=C export LANGUAGE=C - TRAVIS_BUILD_DIR="$(pwd)" fi -echo "`cat platforms/Cross/vm/sqSCCSVersion.h | .git_filters/RevDateURL.smudge`" > platforms/Cross/vm/sqSCCSVersion.h -echo "`cat platforms/Cross/plugins/sqPluginsSCCSVersion.h | .git_filters/RevDateURL.smudge`" > platforms/Cross/plugins/sqPluginsSCCSVersion.h +echo "$(cat platforms/Cross/vm/sqSCCSVersion.h | .git_filters/RevDateURL.smudge)" > platforms/Cross/vm/sqSCCSVersion.h +echo "$(cat platforms/Cross/plugins/sqPluginsSCCSVersion.h | .git_filters/RevDateURL.smudge)" > platforms/Cross/plugins/sqPluginsSCCSVersion.h REV=$(grep -m1 "SvnRawRevisionString" platforms/Cross/vm/sqSCCSVersion.h | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') # echo $PATH -output_file="${TRAVIS_BUILD_DIR}/cog_${ARCH}_${FLAVOR}_${REV}" +readonly BUILD_DIRECTORY="./build.${ARCH}/${FLAVOR}"; +readonly PRODUCTS_DIR="./products" export COGVREV="$(git describe --tags --always)" export COGVDATE="$(git show -s --format=%cd HEAD)" @@ -51,6 +50,8 @@ build_linux_in() { local build_dir=$1 local fold_name=$2 + [[ ! -d "${build_dir}" ]] && exit 10 + pushd "${build_dir}" travis_fold start "${fold_name}" "Building OpenSmalltalk VM in ${build_dir}..." echo n | bash -e ./mvm @@ -59,67 +60,49 @@ build_linux_in() { popd } -tar_linux_product() { - local file_path=$1 - pushd "./products" - tar czf "${file_path}.tar.gz" "./" - popd -} - build_linux() { # build will include both, threaded and itimer version unless # HEARTBEAT variable is set, in which case just one of both # will be built. # HEARTBEAT can be "threaded" or "itimer" - - build_directory="./build.${ARCH}/${FLAVOR}/build" - [[ ! -d "${build_directory}" ]] && exit 10 - if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "threaded" ]; then - build_linux_in "${build_directory}" "build_vm" - tar_linux_product "${output_file}" + if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "threaded" ]; then + build_linux_in "${BUILD_DIRECTORY}/build" "build_vm" + mv "${PRODUCTS_DIR}" "./threaded" # rename products dir fi # Also build VM with itimerheartbeat if available - if [[ ! -d "${build_directory}.itimerheartbeat" ]]; then - return + if [[ -d "${BUILD_DIRECTORY}/build.itimerheartbeat" ]]; then + if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "itimer" ]; then + build_linux_in "${BUILD_DIRECTORY}/build.itimerheartbeat" "build_itimer_vm" + mv "${PRODUCTS_DIR}" "./itimer" # rename products dir + fi fi - - if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "itimer" ]; then - rm -rf "./products" # Clear products directory - build_linux_in "${build_directory}.itimerheartbeat" "build_itimer_vm" - tar_linux_product "${output_file}_itimer" - fi + # create products dir and move threaded and/or itimer + mkdir "${PRODUCTS_DIR}" + [[ -d "./threaded" ]] && mv "./threaded" "${PRODUCTS_DIR}/" + [[ -d "./itimer" ]] && mv "./itimer" "${PRODUCTS_DIR}/" } build_osx() { - build_directory="./build.${ARCH}/${FLAVOR}" - - [[ ! -d "${build_directory}" ]] && exit 50 + [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 50 - pushd "${build_directory}" + pushd "${BUILD_DIRECTORY}" travis_fold start build_vm "Building OpenSmalltalk VM..." bash -e ./mvm -f travis_fold end build_vm - tar cvzf "${output_file}.tar.gz" ./*.app + mv ./*.app "${PRODUCTS_DIR}/" # Move app to products dir popd } build_windows() { echo "Building for Windows" - echo $ARCH - echo $FLAVOR - - build_directory="./build.${ARCH}/${FLAVOR}/" - - echo "${build_directory}" - - [[ ! -d "${build_directory}" ]] && exit 100 + [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 100 - pushd "${build_directory}" + pushd "${BUILD_DIRECTORY}" echo "remove bochs plugins" sed -i 's/Bochs.* //g' plugins.ext @@ -127,7 +110,7 @@ build_windows() { # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - zip -r "${output_file}.zip" "./build/vm/" + mv "./build/vm/"* "${PRODUCTS_DIR}/" # Move files to products dir # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd } diff --git a/.travis_deploy.sh b/.travis_deploy.sh index 46b503ce5c..d7965edc0a 100755 --- a/.travis_deploy.sh +++ b/.travis_deploy.sh @@ -1,8 +1,13 @@ +#!/bin/bash +set -e + PR=${TRAVIS_PULL_REQUEST:-${APPVEYOR_PULL_REQUEST_NUMBER:-false}} BR=${TRAVIS_BRANCH:-${APPVEYOR_REPO_BRANCH}} if [[ $PR == "false" ]] && ( [[ "$BR" == "Cog" || "$BR" == "master" ]] ); then - echo "`cat .bintray.json | .git_filters/RevDateURL.smudge`" > .bintray.json + "./deploy/generate-artifacts.sh" + + echo "$(cat .bintray.json | .git_filters/RevDateURL.smudge)" > .bintray.json sed -i.bak 's/$Rev: \([0-9][0-9]*\) \$/\1/' .bintray.json sed -i.bak 's/$Date: \(.*\) \$/\1/' .bintray.json rm -f .bintray.json.bak diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh new file mode 100755 index 0000000000..f1616da309 --- /dev/null +++ b/deploy/generate-artifacts.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -e + +readonly PRODUCTS_DIR="./products" +if [[ ! -d "${PRODUCTS_DIR}" ]]; then + echo "No products directory found." + exit 10 +fi +readonly IDENTIFIER="cog_${ARCH}_${FLAVOR}_${REV}" +readonly OUTPUT_PREFIX="${PRODUCTS_DIR}/${IDENTIFIER}" + +pushd "${PRODUCTS_DIR}" +if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + if [[ -d "threaded" ]]; then + tar czf "${OUTPUT_PREFIX}.tar.gz" "./threaded" + fi + if [[ -d "itimer" ]]; then + tar czf "${OUTPUT_PREFIX}_itimer.tar.gz" "./itimer" + fi +elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + TMP_DMG="temp.dmg" + hdiutil create -size 8m -volname "${IDENTIFIER}" -srcfolder "${PRODUCTS_DIR}"/*.app \ + -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -nospotlight "${TMP_DMG}" + DEVICE="$(hdiutil attach -readwrite -noautoopen -nobrowse "${TMP_DMG}" | awk 'NR==1{print$1}')" + VOLUME="$(mount | grep "$DEVICE" | sed 's/^[^ ]* on //;s/ ([^)]*)$//')" + hdiutil detach "$DEVICE" + hdiutil convert "${TMP_DMG}" -format UDBZ -imagekey bzip2-level=9 -o "${OUTPUT_PREFIX}.dmg" + rm "${TMP_DMG}" +elif [[ "${APPVEYOR}" ]]; then + rm -f *.def *.exp *.map *.o *Unstripped* # remove temporary build files + zip -r "${OUTPUT_PREFIX}.zip" "./" +else + echo "Unsupported platform '$(uname -s)'." 1>&2 + exit 20 +fi +popd From bb107833638c6a55ee242ac82099cf765ff9c037 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 17:47:06 +0100 Subject: [PATCH 02/33] Make move Windows compatible --- .travis_build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis_build.sh b/.travis_build.sh index 1fd54230f9..70b1d1d206 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -110,7 +110,8 @@ build_windows() { # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - mv "./build/vm/"* "${PRODUCTS_DIR}/" # Move files to products dir + rm -rf "${PRODUCTS_DIR}" || true # ensure there is no PRODUCTS_DIR + mv "./build/vm" "${PRODUCTS_DIR}" # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd } From e21a70fa74930972e857ef6fb8c5d5c505883174 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 17:47:27 +0100 Subject: [PATCH 03/33] Temporarily ignore deployment branches --- .travis_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis_deploy.sh b/.travis_deploy.sh index d7965edc0a..ea28cdb900 100755 --- a/.travis_deploy.sh +++ b/.travis_deploy.sh @@ -4,7 +4,7 @@ set -e PR=${TRAVIS_PULL_REQUEST:-${APPVEYOR_PULL_REQUEST_NUMBER:-false}} BR=${TRAVIS_BRANCH:-${APPVEYOR_REPO_BRANCH}} -if [[ $PR == "false" ]] && ( [[ "$BR" == "Cog" || "$BR" == "master" ]] ); then +if [[ $PR == "false" ]] && ( [[ "$BR" == "Cog" || "$BR" == "master" || true ]] ); then "./deploy/generate-artifacts.sh" echo "$(cat .bintray.json | .git_filters/RevDateURL.smudge)" > .bintray.json From 5c051b8d1fb8780085dc923cae9a70c3f45c2718 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 18:29:54 +0100 Subject: [PATCH 04/33] No need to move folders around --- .travis_build.sh | 16 ++++++---------- deploy/generate-artifacts.sh | 22 +++++++++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index 70b1d1d206..1fb81bf86b 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -68,20 +68,16 @@ build_linux() { if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "threaded" ]; then build_linux_in "${BUILD_DIRECTORY}/build" "build_vm" - mv "${PRODUCTS_DIR}" "./threaded" # rename products dir fi # Also build VM with itimerheartbeat if available - if [[ -d "${BUILD_DIRECTORY}/build.itimerheartbeat" ]]; then - if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "itimer" ]; then - build_linux_in "${BUILD_DIRECTORY}/build.itimerheartbeat" "build_itimer_vm" - mv "${PRODUCTS_DIR}" "./itimer" # rename products dir - fi + if [[ ! -d "${BUILD_DIRECTORY}/build.itimerheartbeat" ]]; then + return + fi + + if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "itimer" ]; then + build_linux_in "${BUILD_DIRECTORY}/build.itimerheartbeat" "build_itimer_vm" fi - # create products dir and move threaded and/or itimer - mkdir "${PRODUCTS_DIR}" - [[ -d "./threaded" ]] && mv "./threaded" "${PRODUCTS_DIR}/" - [[ -d "./itimer" ]] && mv "./itimer" "${PRODUCTS_DIR}/" } build_osx() { diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index f1616da309..0195318789 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -11,12 +11,20 @@ readonly OUTPUT_PREFIX="${PRODUCTS_DIR}/${IDENTIFIER}" pushd "${PRODUCTS_DIR}" if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - if [[ -d "threaded" ]]; then - tar czf "${OUTPUT_PREFIX}.tar.gz" "./threaded" - fi - if [[ -d "itimer" ]]; then - tar czf "${OUTPUT_PREFIX}_itimer.tar.gz" "./itimer" - fi + counter=0 + for dir in */; do + if [[ "${dir}" == *"ht/" ]]; then + name="${OUTPUT_PREFIX}_itimer" + else + name="${OUTPUT_PREFIX}" + fi + tar czf "${name}.tar.gz" "${dir}" + counter=$((counter+1)) + if [[ "${counter}" -gt 2 ]]; then + echo "No more than two directories expected (threaded and/or itimer)" + exit 20 + fi + done elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then TMP_DMG="temp.dmg" hdiutil create -size 8m -volname "${IDENTIFIER}" -srcfolder "${PRODUCTS_DIR}"/*.app \ @@ -31,6 +39,6 @@ elif [[ "${APPVEYOR}" ]]; then zip -r "${OUTPUT_PREFIX}.zip" "./" else echo "Unsupported platform '$(uname -s)'." 1>&2 - exit 20 + exit 30 fi popd From f871a824dcd4dfb241591859743b6be301c6e86a Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 18:57:02 +0100 Subject: [PATCH 05/33] Minor deployment-related fixes --- .travis_build.sh | 2 -- deploy/generate-artifacts.sh | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index 1fb81bf86b..4e27c96539 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -34,8 +34,6 @@ fi echo "$(cat platforms/Cross/vm/sqSCCSVersion.h | .git_filters/RevDateURL.smudge)" > platforms/Cross/vm/sqSCCSVersion.h echo "$(cat platforms/Cross/plugins/sqPluginsSCCSVersion.h | .git_filters/RevDateURL.smudge)" > platforms/Cross/plugins/sqPluginsSCCSVersion.h -REV=$(grep -m1 "SvnRawRevisionString" platforms/Cross/vm/sqSCCSVersion.h | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') - # echo $PATH readonly BUILD_DIRECTORY="./build.${ARCH}/${FLAVOR}"; diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index 0195318789..d5729f01ba 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -6,17 +6,17 @@ if [[ ! -d "${PRODUCTS_DIR}" ]]; then echo "No products directory found." exit 10 fi +readonly REV=$(grep -m1 "SvnRawRevisionString" platforms/Cross/vm/sqSCCSVersion.h | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') readonly IDENTIFIER="cog_${ARCH}_${FLAVOR}_${REV}" -readonly OUTPUT_PREFIX="${PRODUCTS_DIR}/${IDENTIFIER}" pushd "${PRODUCTS_DIR}" if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then counter=0 for dir in */; do if [[ "${dir}" == *"ht/" ]]; then - name="${OUTPUT_PREFIX}_itimer" + name="${IDENTIFIER}_itimer" else - name="${OUTPUT_PREFIX}" + name="${IDENTIFIER}" fi tar czf "${name}.tar.gz" "${dir}" counter=$((counter+1)) @@ -32,11 +32,11 @@ elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then DEVICE="$(hdiutil attach -readwrite -noautoopen -nobrowse "${TMP_DMG}" | awk 'NR==1{print$1}')" VOLUME="$(mount | grep "$DEVICE" | sed 's/^[^ ]* on //;s/ ([^)]*)$//')" hdiutil detach "$DEVICE" - hdiutil convert "${TMP_DMG}" -format UDBZ -imagekey bzip2-level=9 -o "${OUTPUT_PREFIX}.dmg" + hdiutil convert "${TMP_DMG}" -format UDBZ -imagekey bzip2-level=9 -o "${IDENTIFIER}.dmg" rm "${TMP_DMG}" elif [[ "${APPVEYOR}" ]]; then rm -f *.def *.exp *.map *.o *Unstripped* # remove temporary build files - zip -r "${OUTPUT_PREFIX}.zip" "./" + zip -r "${IDENTIFIER}.zip" "./" else echo "Unsupported platform '$(uname -s)'." 1>&2 exit 30 From 8b2701866da8c39ef4c0d9f622571c6bb0ceea2b Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 19:20:28 +0100 Subject: [PATCH 06/33] Fix itimer naming logic --- deploy/generate-artifacts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index d5729f01ba..eed97b209b 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -14,9 +14,9 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then counter=0 for dir in */; do if [[ "${dir}" == *"ht/" ]]; then - name="${IDENTIFIER}_itimer" - else name="${IDENTIFIER}" + else + name="${IDENTIFIER}_itimer" fi tar czf "${name}.tar.gz" "${dir}" counter=$((counter+1)) From 7fa7d45ccae4d27ce314fca278ec01b2fd4a666d Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 19:21:08 +0100 Subject: [PATCH 07/33] Restore slash for Windows --- .travis_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index 4e27c96539..cf2351a2c1 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -94,9 +94,9 @@ build_osx() { build_windows() { echo "Building for Windows" - [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 100 + [[ ! -d "${BUILD_DIRECTORY}/" ]] && exit 100 - pushd "${BUILD_DIRECTORY}" + pushd "${BUILD_DIRECTORY}/" echo "remove bochs plugins" sed -i 's/Bochs.* //g' plugins.ext From c91e549879b065680384b26d75ad0343675dfcd1 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 19:28:14 +0100 Subject: [PATCH 08/33] Restore TRAVIS_BUILD_DIR for AppVeyor --- .travis_build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index cf2351a2c1..d91a392e2f 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -4,6 +4,7 @@ set -e source ./.travis_helpers.sh if [[ "${APPVEYOR}" ]]; then + TRAVIS_BUILD_DIR="$(pwd)" TRAVIS_TAG="${APPVEYOR_REPO_TAG}" PLATFORM="windows" @@ -29,6 +30,7 @@ if [[ "${ARCH}" == "linux32ARM"* ]]; then export LC_CTYPE=C export LANG=C export LANGUAGE=C + TRAVIS_BUILD_DIR="$(pwd)" fi echo "$(cat platforms/Cross/vm/sqSCCSVersion.h | .git_filters/RevDateURL.smudge)" > platforms/Cross/vm/sqSCCSVersion.h @@ -94,9 +96,9 @@ build_osx() { build_windows() { echo "Building for Windows" - [[ ! -d "${BUILD_DIRECTORY}/" ]] && exit 100 + [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 100 - pushd "${BUILD_DIRECTORY}/" + pushd "${BUILD_DIRECTORY}" echo "remove bochs plugins" sed -i 's/Bochs.* //g' plugins.ext From 5cedeeb60773c2e088d15c19a65cf7ae7da05cbd Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 19:40:32 +0100 Subject: [PATCH 09/33] cygcheck /usr/bin/make --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index 70c4c3ffdf..7f14668baa 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -110,6 +110,7 @@ build: false # build which causes failures as certain functions attempt to redirect # default file handles. Ensure a dummy file descriptor is opened with 'exec'. test_script: + - '%CYG_ROOT%\bin\bash -lc "cygcheck /usr/bin/make"' - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Mon, 15 Jan 2018 19:46:51 +0100 Subject: [PATCH 10/33] Ensure libclang3.9 is installed --- .appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7f14668baa..08fca04bfb 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -98,7 +98,7 @@ cache: install: - ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"' - ps: 'Start-FileDownload "http://cygwin.com/setup-x86_64.exe" -FileName "setup-x86_64.exe"' - - '%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,mingw64-%MINGW_ARCH%-openssl,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,make,cmake,wget,mingw64-%MINGW_ARCH%-win-iconv' + - '%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,mingw64-%MINGW_ARCH%-openssl,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,make,cmake,wget,mingw64-%MINGW_ARCH%-win-iconv,libclang3.9' build: false @@ -110,7 +110,6 @@ build: false # build which causes failures as certain functions attempt to redirect # default file handles. Ensure a dummy file descriptor is opened with 'exec'. test_script: - - '%CYG_ROOT%\bin\bash -lc "cygcheck /usr/bin/make"' - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Mon, 15 Jan 2018 19:51:20 +0100 Subject: [PATCH 11/33] Try libgc1 --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 08fca04bfb..b5f7ffd02c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -98,7 +98,7 @@ cache: install: - ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"' - ps: 'Start-FileDownload "http://cygwin.com/setup-x86_64.exe" -FileName "setup-x86_64.exe"' - - '%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,mingw64-%MINGW_ARCH%-openssl,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,make,cmake,wget,mingw64-%MINGW_ARCH%-win-iconv,libclang3.9' + - '%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,mingw64-%MINGW_ARCH%-openssl,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,make,cmake,wget,mingw64-%MINGW_ARCH%-win-iconv,libgc1' build: false From 7fad7ac4b54104002888ed0f8e82564964f434ff Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 20:49:29 +0100 Subject: [PATCH 12/33] Revert last two commits --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index b5f7ffd02c..70c4c3ffdf 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -98,7 +98,7 @@ cache: install: - ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"' - ps: 'Start-FileDownload "http://cygwin.com/setup-x86_64.exe" -FileName "setup-x86_64.exe"' - - '%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,mingw64-%MINGW_ARCH%-openssl,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,make,cmake,wget,mingw64-%MINGW_ARCH%-win-iconv,libgc1' + - '%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,mingw64-%MINGW_ARCH%-openssl,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,make,cmake,wget,mingw64-%MINGW_ARCH%-win-iconv' build: false From ca1736480cd31e305bb682b775def5375c6df787 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 21:10:27 +0100 Subject: [PATCH 13/33] Move files into products dir --- .travis_build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index d91a392e2f..d59dce1660 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -106,8 +106,7 @@ build_windows() { # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - rm -rf "${PRODUCTS_DIR}" || true # ensure there is no PRODUCTS_DIR - mv "./build/vm" "${PRODUCTS_DIR}" + mv "./build/vm/"* "${PRODUCTS_DIR}" # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd } From 1cc7c55564ce121840a165f90bf9f29cb7947291 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 15 Jan 2018 21:15:57 +0100 Subject: [PATCH 14/33] Revert "Move files into products dir" This reverts commit ca1736480cd31e305bb682b775def5375c6df787. --- .travis_build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis_build.sh b/.travis_build.sh index d59dce1660..d91a392e2f 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -106,7 +106,8 @@ build_windows() { # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - mv "./build/vm/"* "${PRODUCTS_DIR}" + rm -rf "${PRODUCTS_DIR}" || true # ensure there is no PRODUCTS_DIR + mv "./build/vm" "${PRODUCTS_DIR}" # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd } From 7b1f880e3572c5611fa799ceb4f50de926390d1b Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 16 Jan 2018 09:53:20 +0100 Subject: [PATCH 15/33] Move vm dir to products --- .travis_build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index d91a392e2f..bfda48b3a6 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -106,8 +106,10 @@ build_windows() { # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - rm -rf "${PRODUCTS_DIR}" || true # ensure there is no PRODUCTS_DIR - mv "./build/vm" "${PRODUCTS_DIR}" + ls + echo "##" + ls "${PRODUCTS_DIR}/" + mv "./build/vm" "${PRODUCTS_DIR}/" # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd } From d49e23e88dce70a168e6cac5458f933e9c6cd2e1 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 16 Jan 2018 09:58:51 +0100 Subject: [PATCH 16/33] Use absolute paths --- .travis_build.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis_build.sh b/.travis_build.sh index bfda48b3a6..f2ed3b18c5 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -38,8 +38,8 @@ echo "$(cat platforms/Cross/plugins/sqPluginsSCCSVersion.h | .git_filters/RevDat # echo $PATH -readonly BUILD_DIRECTORY="./build.${ARCH}/${FLAVOR}"; -readonly PRODUCTS_DIR="./products" +readonly BUILD_DIRECTORY="$(pwd)/build.${ARCH}/${FLAVOR}"; +readonly PRODUCTS_DIR="$(pwd)/products" export COGVREV="$(git describe --tags --always)" export COGVDATE="$(git show -s --format=%cd HEAD)" @@ -106,9 +106,6 @@ build_windows() { # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - ls - echo "##" - ls "${PRODUCTS_DIR}/" mv "./build/vm" "${PRODUCTS_DIR}/" # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd From 6cbbecd272387b0818e0986de4825ddb14a83756 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 16 Jan 2018 10:22:53 +0100 Subject: [PATCH 17/33] Strip .res and .lib files from Windows artifacts --- deploy/generate-artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index eed97b209b..88f0ebad95 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -35,7 +35,7 @@ elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then hdiutil convert "${TMP_DMG}" -format UDBZ -imagekey bzip2-level=9 -o "${IDENTIFIER}.dmg" rm "${TMP_DMG}" elif [[ "${APPVEYOR}" ]]; then - rm -f *.def *.exp *.map *.o *Unstripped* # remove temporary build files + rm -f *.def *.exp *.lib *.map *.o *.res *Unstripped* # remove temporary build files zip -r "${IDENTIFIER}.zip" "./" else echo "Unsupported platform '$(uname -s)'." 1>&2 From d0dfefc17d207cfdfd2c20f50aa4b2ca42276e3d Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 16 Jan 2018 10:23:37 +0100 Subject: [PATCH 18/33] Clean up .travis.yml and .travis_build.sh --- .travis.yml | 8 +++----- .travis_build.sh | 14 ++++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfd01d8548..26c796f8e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -121,10 +121,8 @@ jobs: install: ./.travis_install.sh -script: -- cd platforms/unix/config/ && make configure -- cd ../../../ -- $CHROOT ./.travis_build.sh -- ./.travis_test.sh +before_script: $CHROOT ./.travis_build.sh + +script: ./.travis_test.sh after_success: ./.travis_deploy.sh diff --git a/.travis_build.sh b/.travis_build.sh index f2ed3b18c5..79e07eec70 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -61,6 +61,10 @@ build_linux_in() { } build_linux() { + travis_fold start 'unix_configure' 'Running "make config" in platforms/unix/config ...' + (cd platforms/unix/config/ && make configure) + travis_fold end 'unix_configure' + # build will include both, threaded and itimer version unless # HEARTBEAT variable is set, in which case just one of both # will be built. @@ -89,25 +93,23 @@ build_osx() { bash -e ./mvm -f travis_fold end build_vm - mv ./*.app "${PRODUCTS_DIR}/" # Move app to products dir + mv ./*.app "${PRODUCTS_DIR}/" # Move app to PRODUCTS_DIR popd } build_windows() { - echo "Building for Windows" - [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 100 pushd "${BUILD_DIRECTORY}" - echo "remove bochs plugins" + echo "Removing bochs plugins..." sed -i 's/Bochs.* //g' plugins.ext - echo "Let's build" + echo "Building OpenSmalltalk VM for Windows..." # We cannot zip dbg and ast if we pass -f to just to the full thing... # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - mv "./build/vm" "${PRODUCTS_DIR}/" # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" + mv "./build/vm" "${PRODUCTS_DIR}/" # Move result to PRODUCTS_DIR popd } From e1ccb440fbd0d77cf01599131527fa03e237c992 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 16 Jan 2018 11:08:11 +0100 Subject: [PATCH 19/33] First attempt to sign Squeak VMs on macOS --- .gitignore | 1 + deploy/generate-artifacts.sh | 33 +++++++++++++++++++++++++++++++-- deploy/squeak/sign.enc | Bin 0 -> 1520 bytes 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 deploy/squeak/sign.enc diff --git a/.gitignore b/.gitignore index 3c1dbf980f..2b3740dfcd 100644 --- a/.gitignore +++ b/.gitignore @@ -256,3 +256,4 @@ platforms/unix/config/autom4te.cache/ # /products/debug/ /products/debug/* +*.p12 diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index 88f0ebad95..8c0725a87e 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -1,13 +1,34 @@ #!/bin/bash set -e -readonly PRODUCTS_DIR="./products" +readonly PRODUCTS_DIR="$(pwd)/products" if [[ ! -d "${PRODUCTS_DIR}" ]]; then echo "No products directory found." exit 10 fi readonly REV=$(grep -m1 "SvnRawRevisionString" platforms/Cross/vm/sqSCCSVersion.h | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') readonly IDENTIFIER="cog_${ARCH}_${FLAVOR}_${REV}" +readonly KEY_CHAIN=macos-build.keychain + +macos_codesign() { + local cert_path=$1 + local cert_pass=$2 + local sign_identity=$3 + + travis_fold start macos_signing "Signing app bundle..." + # Set up keychain + security create-keychain -p travis "${KEY_CHAIN}" + security default-keychain -s "${KEY_CHAIN}" + security unlock-keychain -p travis "${KEY_CHAIN}" + security set-keychain-settings -t 3600 -u "${KEY_CHAIN}" + security import "${cert_path}" -k ~/Library/Keychains/"${KEY_CHAIN}" -P "${cert_pass}" -T /usr/bin/codesign + # Invoke codesign + codesign -s "${sign_identity}" --force --deep ./*.app + # Remove sensitive files again + rm -rf "${cert_path}" + security delete-keychain "${KEY_CHAIN}" + travis_fold end macos_signing +} pushd "${PRODUCTS_DIR}" if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then @@ -26,8 +47,16 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then fi done elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + readonly DEPLOY_DIR="${TRAVIS_BUILD_DIR}/deploy" + if [[ "${FLAVOR}" == "squeak"* ]]; then + openssl aes-256-cbc -k "${SQUEAK_SIGN_PASSWORD}" -in "{DEPLOY_DIR}/squeak/sign.enc" -out "${DEPLOY_DIR}/squeak/sign.p12" -d + macos_codesign "${DEPLOY_DIR}/squeak/sign.p12" "${SQUEAK_CERT_PASSWORD}" "${SQUEAK_SIGN_IDENTITY}" + elif [[ "${FLAVOR}" == "pharo"* ]]; then + # TODO: decrypt Pharo signing certificate and invoke macos_codesign to sign app bundle + # macos_codesign "${DEPLOY_DIR}/pharo/sign.p12" "${PHARO_CERT_PASSWORD}" "${PHARO_SIGN_IDENTITY}" + fi TMP_DMG="temp.dmg" - hdiutil create -size 8m -volname "${IDENTIFIER}" -srcfolder "${PRODUCTS_DIR}"/*.app \ + hdiutil create -size 8m -volname "${IDENTIFIER}" -srcfolder "./"*.app \ -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -nospotlight "${TMP_DMG}" DEVICE="$(hdiutil attach -readwrite -noautoopen -nobrowse "${TMP_DMG}" | awk 'NR==1{print$1}')" VOLUME="$(mount | grep "$DEVICE" | sed 's/^[^ ]* on //;s/ ([^)]*)$//')" diff --git a/deploy/squeak/sign.enc b/deploy/squeak/sign.enc new file mode 100644 index 0000000000000000000000000000000000000000..b1676908f1de20bb9acc956b6980d1571812bcb9 GIT binary patch literal 1520 zcmVRUWy&*Q%NdT8Nc%x<k&s={*UUYxw)B!^~H`dUc(x-GJugZ#1r)US|OA*@JTnKoSt(c9Z|JIuZ!pxf? z-8GmVTDe3dm4~6h90NB0V8gl8N>%a?lBc|>}&ERTgdEtpP3CP4q~^&~C(SL~ z-!ax1g7-X}vwPDDWSKfp<$8}FBU*(2!r1#Fw4je+g23g^zA@UvKSL`3j+Ymgpc_;P zf3+`#L)l@6ss>)vFc5c(b6!S$UMF;5V*NV30nU+Yqm*MBa4d`~_EUEtf+WCBb_)t`j-T2GF-KNbI3bmzP(lZA*mPvlc73$jd7dNp znKZE~^F2mnY2K?M(y-hS%Q1hIH-E_FG)LRN^A)UQYB!7qXU_?fS00eR4_;JgxN-I% z$m@p;d=3xrJ}$6vBEX%w>G7U39rriZ&y5D1Pv-#sy-zJaq5K@fQ?vs=X8;$VCX(_q z8186@8du5BZU#6;WI+D^Q-NcLU2w-n`5jA1B5vjQQu7}As|-l&KK~^K3hy@+f1iMT zXre;Jwg&U}!F=44k`hXdeT}}LlX+*R@)0Os+4tIGdL@o2g1}w*q&xx?w|WPCsqv}_ zbsgLnXLjlWwS$)?6E(I>!pf}RzKWY%o{>L-vlK8h)|j=-x7*i z04hH#rp7T>NMG>SKSR5-?yhu>k1bz_VIT>2fmry~0q2 zQkye^J|0sQx!o_0qkb{BE>0AWZq4%dudwZ)!lAf7)(OK6`Ic7*!01fU-Nb&lky}Ql z$zmHPr$&f$hQV=|;Mj-W_9^SDDs&TZQPK8yf_nAVe_Tk3$tT^vp&EuFx{qC1O{$#&@I@uY_F^dIJ!?MKuPJ#KL78!^4S$(Oqvej5 zj2|amW;WuaiSR&YQH+>b*LEr=Uy!mIlFNmEo=>g;W|?1o%psrTaoBfbyAIN9R2)iS z$!G?h*YXT+Nu}O^ZeG{bDFy_I=QV_FfJXOE=kKt^up?Ln2y={I;t{TsQ zdwz0Nknw@Qh)?sMkC}xOyEcZZWwzm$0)S9N-SR3tr&G~6|Hqh_(<~`CRM6IWd8)WU zJBQ=#$aW}LShFn|lpi$+y<}ds3$G~dhVE6j$F%R0TivCcfrdOi&(vkN<~jdvi-G=! zF33WF#3d3)&!rav|Dp#Ptwu68&ne#Oh~miwnG_h>ZIXxu>qn3yli0TJpb(yf$Aut8 za#9C^5=RrE$DRhDG|z+h6Nt9KZnNB4B=sK+^|BD$*#{VY)VT@^K Date: Tue, 16 Jan 2018 12:36:28 +0100 Subject: [PATCH 20/33] Deploy tags as GitHub Releases (#84) Currently always deploying for testing purposes --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 26c796f8e7..2f2c97a1aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,3 +126,14 @@ before_script: $CHROOT ./.travis_build.sh script: ./.travis_test.sh after_success: ./.travis_deploy.sh + +deploy: + provider: releases + api_key: + secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= + file_glob: true + file: "./products/*.{dmg,gz,zip}" + skip_cleanup: true + on: + # tags: true + repo: OpenSmalltalk/opensmalltalk-vm From ca474c4d2f343583a52fd9b3f4e61f4c3b8f6cc4 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 16 Jan 2018 13:18:09 +0100 Subject: [PATCH 21/33] Fix empty if statement --- deploy/generate-artifacts.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index 8c0725a87e..e6b12841c1 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -54,6 +54,7 @@ elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then elif [[ "${FLAVOR}" == "pharo"* ]]; then # TODO: decrypt Pharo signing certificate and invoke macos_codesign to sign app bundle # macos_codesign "${DEPLOY_DIR}/pharo/sign.p12" "${PHARO_CERT_PASSWORD}" "${PHARO_SIGN_IDENTITY}" + true fi TMP_DMG="temp.dmg" hdiutil create -size 8m -volname "${IDENTIFIER}" -srcfolder "./"*.app \ From 538ccaf39a66f13ed25770e44eafed2bbc9e2b1f Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 11:22:07 +0100 Subject: [PATCH 22/33] Use deploy stage for deployment script --- .travis.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f2c97a1aa..37992e10c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,21 +119,27 @@ jobs: dist: trusty group: edge -install: ./.travis_install.sh +install: .travis_install.sh -before_script: $CHROOT ./.travis_build.sh +before_script: $CHROOT .travis_build.sh -script: ./.travis_test.sh +script: .travis_test.sh -after_success: ./.travis_deploy.sh +deploy: # Deploy bleeding edge to Bintray + provider: script + script: .travis_deploy.sh + on: + repo: OpenSmalltalk/opensmalltalk-vm + branch: Cog -deploy: +deploy: # Deploy stable tags to GitHub releases provider: releases api_key: secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= file_glob: true - file: "./products/*.{dmg,gz,zip}" + file: "products/*.{dmg,gz,zip}" skip_cleanup: true on: - # tags: true repo: OpenSmalltalk/opensmalltalk-vm + branch: fniephaus/artifacts + # tags: true From 0f756740807a1562cfde626cdda6ef25ccee2516 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 11:35:49 +0100 Subject: [PATCH 23/33] Fix paths to scripts again --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37992e10c2..780243d7ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,15 +119,15 @@ jobs: dist: trusty group: edge -install: .travis_install.sh +install: ./.travis_install.sh -before_script: $CHROOT .travis_build.sh +before_script: $CHROOT ./.travis_build.sh -script: .travis_test.sh +script: ./.travis_test.sh deploy: # Deploy bleeding edge to Bintray provider: script - script: .travis_deploy.sh + script: ./.travis_deploy.sh on: repo: OpenSmalltalk/opensmalltalk-vm branch: Cog @@ -137,7 +137,7 @@ deploy: # Deploy stable tags to GitHub releases api_key: secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= file_glob: true - file: "products/*.{dmg,gz,zip}" + file: "./products/*.{dmg,gz,zip}" skip_cleanup: true on: repo: OpenSmalltalk/opensmalltalk-vm From d9620c48ecde38d042cfc98030313e7b68e723da Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 11:50:35 +0100 Subject: [PATCH 24/33] Deploy tags to GitHub releases --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 780243d7ef..aada469f12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -141,5 +141,4 @@ deploy: # Deploy stable tags to GitHub releases skip_cleanup: true on: repo: OpenSmalltalk/opensmalltalk-vm - branch: fniephaus/artifacts - # tags: true + tags: true From 44f06ef6477e15a35316115abfca25d51866a01f Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 13:20:05 +0100 Subject: [PATCH 25/33] Test macOS deployment --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index aada469f12..95bb9e8565 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,9 +128,9 @@ script: ./.travis_test.sh deploy: # Deploy bleeding edge to Bintray provider: script script: ./.travis_deploy.sh - on: - repo: OpenSmalltalk/opensmalltalk-vm - branch: Cog + # on: + # repo: OpenSmalltalk/opensmalltalk-vm + # branch: Cog deploy: # Deploy stable tags to GitHub releases provider: releases From a7c33c4d619f76cff75610aa3a7fe2b93bb4f0c1 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 13:32:44 +0100 Subject: [PATCH 26/33] Fix: there can only be one deploy stage --- .travis.yml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 95bb9e8565..07fed12287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -125,20 +125,18 @@ before_script: $CHROOT ./.travis_build.sh script: ./.travis_test.sh -deploy: # Deploy bleeding edge to Bintray - provider: script - script: ./.travis_deploy.sh - # on: - # repo: OpenSmalltalk/opensmalltalk-vm - # branch: Cog - -deploy: # Deploy stable tags to GitHub releases - provider: releases - api_key: - secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= - file_glob: true - file: "./products/*.{dmg,gz,zip}" - skip_cleanup: true - on: - repo: OpenSmalltalk/opensmalltalk-vm - tags: true +deploy: + - provider: script # Deploy bleeding edge to Bintray + script: ./.travis_deploy.sh + # on: + # repo: OpenSmalltalk/opensmalltalk-vm + # branch: Cog + - provider: releases # Deploy stable tags to GitHub releases + api_key: + secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= + file_glob: true + file: "./products/*.{dmg,gz,zip}" + skip_cleanup: true + on: + repo: OpenSmalltalk/opensmalltalk-vm + tags: true From d14c41f934026ded987e5a1f9ab11eaae79e9498 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 23:12:18 +0100 Subject: [PATCH 27/33] Test script provider on test branch --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07fed12287..0aefaee7e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,9 +128,9 @@ script: ./.travis_test.sh deploy: - provider: script # Deploy bleeding edge to Bintray script: ./.travis_deploy.sh - # on: - # repo: OpenSmalltalk/opensmalltalk-vm - # branch: Cog + on: + repo: OpenSmalltalk/opensmalltalk-vm + branch: fniephaus/artifacts #Cog - provider: releases # Deploy stable tags to GitHub releases api_key: secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= From e10a3ddf4b5b13d833960f2736fb26b81fced2fa Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 23:22:17 +0100 Subject: [PATCH 28/33] Add `skip_cleanup: true` --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0aefaee7e2..6cdac3d811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,6 +128,7 @@ script: ./.travis_test.sh deploy: - provider: script # Deploy bleeding edge to Bintray script: ./.travis_deploy.sh + skip_cleanup: true on: repo: OpenSmalltalk/opensmalltalk-vm branch: fniephaus/artifacts #Cog From 6aff7b4fe3c3253742052e688c10adfc89166f76 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 23:24:43 +0100 Subject: [PATCH 29/33] Test GitHub releases one more time --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6cdac3d811..4d7da5aac8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -140,4 +140,5 @@ deploy: skip_cleanup: true on: repo: OpenSmalltalk/opensmalltalk-vm - tags: true + branch: fniephaus/artifacts #Cog + # tags: true From d62ca2f23a1aa117352811c115d787b10086cf3b Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 17 Jan 2018 23:37:44 +0100 Subject: [PATCH 30/33] Add automatically deploy tags on AppVeyor (#84) --- .appveyor.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 70c4c3ffdf..d65e40880d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -111,6 +111,11 @@ build: false # default file handles. Ensure a dummy file descriptor is opened with 'exec'. test_script: - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Wed, 17 Jan 2018 23:56:41 +0100 Subject: [PATCH 31/33] Clean up --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d7da5aac8..1b65562109 100644 --- a/.travis.yml +++ b/.travis.yml @@ -131,7 +131,7 @@ deploy: skip_cleanup: true on: repo: OpenSmalltalk/opensmalltalk-vm - branch: fniephaus/artifacts #Cog + branch: Cog - provider: releases # Deploy stable tags to GitHub releases api_key: secure: ASzbVm1ootfvzfAYm50rWCfIvwp/O+6N1NMv2lymvswj/sGW7MxmYGHj2UNtLg9OAD+lL9YyElyy94MCpSK496+pD7GrOdRAitilMreWR6jGab0D92pPcujMAsDDSRTPNZsui1kvK1skWGMCN41mXLlwtCxSqWdhQ1viMmjXeK29TJbHykFEdfgZc6RcB97NdMyz6Pp9uqbxXSA656UxeLJzsKX88mXFcd5983pVt1ME8dfeUC9dwTihG5IAEg3Uz6HDxcR3uero0alLXycer5zI1kHLede03aNNvcRcUnVjBa5rNY8ON884DblDC+lcc+8b104MQTAGKWbyibjpm+9b0oWJV/tB20VdJUxZ2MpuktLzUrFBjVFjSrB5NmkITtJ1o+eYmjJOzWZNqFueNIsEkbGItDQJkKhNySBnUZ3/gyxnTBwmulUF2i8dimdwAuZlMiTN5mqpSLzLCE9ZrGWz9zuuCCombvpNIAc2IMsaTlpj391TjQfqGvu+Z88hmJOmDwpdUsGwNHo+Cz1N+KivAfySgj1T+CfE4xnuKOQzVbUK1Aqv/uGl1ieS1MfgyrqfgvRWEcGQh7/35n6yxG5s2z1qrs9Vl0e0rN261GQuK5ElNsQSLVRNH13+PdDwTCEZ/APzo+0uGRGTmGKJtzAofmkeAsrwmgGJPAuip/0= @@ -140,5 +140,4 @@ deploy: skip_cleanup: true on: repo: OpenSmalltalk/opensmalltalk-vm - branch: fniephaus/artifacts #Cog - # tags: true + tags: true From 4cd37e9a3e1bb86ee294191cbe0f9cd30d61752a Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Thu, 18 Jan 2018 08:57:29 +0100 Subject: [PATCH 32/33] Minor deployment fix --- deploy/generate-artifacts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/generate-artifacts.sh b/deploy/generate-artifacts.sh index e6b12841c1..eef387d2eb 100755 --- a/deploy/generate-artifacts.sh +++ b/deploy/generate-artifacts.sh @@ -49,7 +49,7 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then readonly DEPLOY_DIR="${TRAVIS_BUILD_DIR}/deploy" if [[ "${FLAVOR}" == "squeak"* ]]; then - openssl aes-256-cbc -k "${SQUEAK_SIGN_PASSWORD}" -in "{DEPLOY_DIR}/squeak/sign.enc" -out "${DEPLOY_DIR}/squeak/sign.p12" -d + openssl aes-256-cbc -k "${SQUEAK_SIGN_PASSWORD}" -in "${DEPLOY_DIR}/squeak/sign.enc" -out "${DEPLOY_DIR}/squeak/sign.p12" -d macos_codesign "${DEPLOY_DIR}/squeak/sign.p12" "${SQUEAK_CERT_PASSWORD}" "${SQUEAK_SIGN_IDENTITY}" elif [[ "${FLAVOR}" == "pharo"* ]]; then # TODO: decrypt Pharo signing certificate and invoke macos_codesign to sign app bundle @@ -63,7 +63,7 @@ elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then VOLUME="$(mount | grep "$DEVICE" | sed 's/^[^ ]* on //;s/ ([^)]*)$//')" hdiutil detach "$DEVICE" hdiutil convert "${TMP_DMG}" -format UDBZ -imagekey bzip2-level=9 -o "${IDENTIFIER}.dmg" - rm "${TMP_DMG}" + rm -f "${TMP_DMG}" elif [[ "${APPVEYOR}" ]]; then rm -f *.def *.exp *.lib *.map *.o *.res *Unstripped* # remove temporary build files zip -r "${IDENTIFIER}.zip" "./" From e66546dc0cadf9f931a2261e1f5acd47db1fa720 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Thu, 18 Jan 2018 12:34:30 +0100 Subject: [PATCH 33/33] Ensure deploy script runs before everything else --- .appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d65e40880d..fd906a2389 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -116,9 +116,8 @@ artifacts: - path: products\*.zip name: osvm -on_success: - - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0