From ffb2ac63276cf817f5726660ba501ab821cdf4cd Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Tue, 27 Jul 2021 09:34:40 +0200 Subject: [PATCH 01/12] Adds latest work on actions for continuous integration. --- .github/workflows/linux.yml | 102 +++++++++++++++++ .github/workflows/macos.yml | 110 ++++++++++++++++++ .github/workflows/win.yml | 105 +++++++++++++++++ deploy/pack-vm.sh | 144 ++++++++--------------- deploy/sign-vm.sh | 97 ++++++++++++++++ scripts/ci/actions_build.sh | 164 +++++++++++++++++++++++++++ scripts/ci/actions_prepare_msys.sh | 28 +++++ scripts/ci/actions_prepare_ubuntu.sh | 144 +++++++++++++++++++++++ 8 files changed, 799 insertions(+), 95 deletions(-) create mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/win.yml create mode 100755 deploy/sign-vm.sh create mode 100755 scripts/ci/actions_build.sh create mode 100755 scripts/ci/actions_prepare_msys.sh create mode 100755 scripts/ci/actions_prepare_ubuntu.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000000..692e1e1733 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,102 @@ +name: Build for Linux (Ubuntu) + +on: + push: + # branches: [ marceltaeumel/actions ] + paths: + - '.github/workflows/linux.yml' # This workflow spec + - 'scripts/ci/**' # Support scripts for this workflow + - 'deploy/**' # More support scripts for this workflow + + - 'build.linux*/**' # Makefile-based build scripts + - '*src/**' # Generated VMMaker sources (incl. plugins) + - 'platforms/Cross/**' + - 'platforms/unix/**' + + - '!**.md' + - '!**HowToBuild' + + +jobs: + build: + strategy: + fail-fast: true + matrix: + arch: + - linux64x64 + # - linux32x86 + flavor: + - squeak.cog.spur + # - squeak.stack.spur + heartbeat: + - threaded + - itimer + mode: + - fast + - debug + - assert + # include: # compatibility with Squeak 4.6 and older + # - arch: linux32x86 + # flavor: squeak.cog.v3 + # - arch: linux32x86 + # flavor: squeak.stack.v3 + exclude: + - arch: linux64x64 + flavor: squeak.cog.spur + heartbeat: itimer + mode: debug + - arch: linux64x64 + flavor: squeak.cog.spur + heartbeat: itimer + mode: assert + runs-on: ubuntu-latest + name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} + env: + ARCH: ${{ matrix.arch }} + FLAVOR: ${{ matrix.flavor }} + MODE: ${{ matrix.mode }} + steps: + - name: Checkout files + uses: actions/checkout@v2 + + - name: Restore build cache + uses: actions/cache@v2 + with: + path: .thirdparty-cache + key: thirdparty-cache # same for all runner.os + + # - name: Setup tmate debugging session + # uses: mxschmitt/action-tmate@v3 + + - name: Prepare environment + run: ./scripts/ci/actions_prepare_ubuntu.sh + + - name: Build VM + run: ./scripts/ci/actions_build.sh + env: + HEARTBEAT: ${{ matrix.heartbeat }} + + - name: Sign VM (not implemented) + if: false + run: ./deploy/sign-vm.sh + + - name: Pack VM + run: ./deploy/pack-vm.sh + + - name: Store artifact w/ revision + uses: actions/upload-artifact@v2 + with: + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} + path: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + + - name: Update artifact in latest-release + uses: ncipollo/release-action@v1.8.6 + if: endsWith( github.ref , 'marceltaeumel/actions' ) + with: + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000..f496d4815d --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,110 @@ +name: Build for macOS + +on: + push: + # branches: [ marceltaeumel/actions ] + paths: + - '.github/workflows/macos.yml' # This workflow spec + - 'scripts/ci/**' # Support scripts for this workflow + - 'deploy/**' # More support scripts for this workflow + + - 'build.macos*/**' # Makefile-based build scripts + - '*src/**' # Generated VMMaker sources (incl. plugins) + - 'platforms/Cross/**' + - 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated + + - '!**.md' + - '!**HowToBuild' + + + +jobs: + build: + strategy: + fail-fast: true + matrix: + arch: + - macos64x64 + # - macos32x86 + flavor: + - squeak.cog.spur + # - squeak.stack.spur + # - pharo.cog.spur + # - pharo.stack.spur + # - newspeak.cog.spur + # - newspeak.stack.spur + mode: + - fast + - debug + - assert + # include: + # compatibility with Squeak 4.6 and older + # - arch: win32x86 + # flavor: squeak.cog.v3 + # - arch: win32x86 + # flavor: squeak.stack.v3 + # newer flavors w/ Sista-CogIt or Lowcode byteset + # - arch: win32x86 + # flavor: squeak.sista.spur + # - arch: win32x86 + # flavor: pharo.sista.spur + # - arch: win32x86 + # flavor: squeak.cog.spur.lowcode + # - arch: win32x86 + # flavor: pharo.cog.spur.lowcode + runs-on: macos-latest + name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} + env: + ARCH: ${{ matrix.arch }} + FLAVOR: ${{ matrix.flavor }} + MODE: ${{ matrix.mode }} + steps: + - name: Checkout files + uses: actions/checkout@v2 + + - name: Restore build cache + uses: actions/cache@v2 + with: + path: .thirdparty-cache + key: thirdparty-cache # same for all runner.os + + # - name: Setup tmate debugging session + # uses: mxschmitt/action-tmate@v3 + + - name: Build VM + run: ./scripts/ci/actions_build.sh + + - name: Sign VM (secrets missing) + if: false + run: ./deploy/sign-vm.sh + env: + SQUEAK_SIGN_PASSWORD: ${{ secrets.SQUEAK_SIGN_PASSWORD }} + SQUEAK_CERT_PASSWORD: ${{ secrets.SQUEAK_CERT_PASSWORD }} + SQUEAK_SIGN_IDENTITY: ${{ secrets.SQUEAK_SIGN_IDENTITY }} + PHARO_SIGN_PASSWORD: ${{ secrets.PHARO_SIGN_PASSWORD }} + PHARO_CERT_PASSWORD: ${{ secrets.PHARO_CERT_PASSWORD }} + PHARO_SIGN_IDENTITY: ${{ secrets.PHARO_SIGN_IDENTITY }} + NEWSPEAK_SIGN_PASSWORD: ${{ secrets.NEWSPEAK_SIGN_PASSWORD }} + NEWSPEAK_CERT_PASSWORD: ${{ secrets.NEWSPEAK_CERT_PASSWORD }} + NEWSPEAK_SIGN_IDENTITY: ${{ secrets.NEWSPEAK_SIGN_IDENTITY }} + + - name: Pack VM + run: ./deploy/pack-vm.sh + + - name: Store artifact w/ revision + uses: actions/upload-artifact@v2 + with: + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} + path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + + - name: Update artifact in latest-release + uses: ncipollo/release-action@v1.8.6 + if: endsWith( github.ref , 'marceltaeumel/actions' ) + with: + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml new file mode 100644 index 0000000000..1c5cc23661 --- /dev/null +++ b/.github/workflows/win.yml @@ -0,0 +1,105 @@ +name: Build for Windows + +on: + push: + # branches: [ marceltaeumel/actions ] + paths: + - '.github/workflows/win.yml' # This workflow spec + - 'scripts/ci/**' # Support scripts for this workflow + - 'deploy/**' # More support scripts for this workflow + + - 'build.win*/**' # Makefile-based build scripts + - '*src/**' # Generated VMMaker sources (incl. plugins) + - 'platforms/Cross/**' + - 'platforms/win32/**' + + - '!**.md' + - '!**HowToBuild' + +jobs: + build: + strategy: + fail-fast: true + matrix: + arch: + - win64x64 + # - win32x86 + flavor: + - squeak.cog.spur + # - squeak.stack.spur + # - pharo.cog.spur + # - pharo.stack.spur + # - newspeak.cog.spur + # - newspeak.stack.spur + mode: + - fast + - debug + - assert + # include: + # compatibility with Squeak 4.6 and older + # - arch: win32x86 + # flavor: squeak.cog.v3 + # mode: fast + # - arch: win32x86 + # flavor: squeak.stack.v3 + # newer flavors w/ Sista-CogIt or Lowcode byteset + # - arch: win32x86 + # flavor: squeak.sista.spur + # - arch: win32x86 + # flavor: pharo.sista.spur + # - arch: win32x86 + # flavor: squeak.cog.spur.lowcode + # - arch: win32x86 + # flavor: pharo.cog.spur.lowcode + runs-on: windows-latest + name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} + env: + ARCH: ${{ matrix.arch }} + FLAVOR: ${{ matrix.flavor }} + MODE: ${{ matrix.mode }} + steps: + - name: Checkout files + uses: actions/checkout@v2 + + - name: Restore build cache + uses: actions/cache@v2 + with: + path: .thirdparty-cache + key: thirdparty-cache # same for all runner.os + + # - name: Setup tmate debugging session + # uses: mxschmitt/action-tmate@v3 + + - name: Build VM + shell: bash + run: ./scripts/ci/actions_build.sh + # run: C:\msys64\usr\bin\bash -lc "cd $(pwd); exec ./scripts/ci/actions_build.sh" + env: + MSYS_SYS: ${{ matrix.arch == 'win64x64' && 'mingw64' || 'mingw32' }} + MSYS_ENV: ${{ matrix.arch == 'win64x64' && 'x86_64' || 'i686' }} + + - name: Sign VM (not implemented) + if: false + run: ./deploy/sign-vm.sh + + - name: Pack VM + shell: bash + run: ./deploy/pack-vm.sh + + - name: Store artifact w/ revision + uses: actions/upload-artifact@v2 + with: + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} + path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + + - name: Update artifact in latest-release + uses: ncipollo/release-action@v1.8.6 + if: endsWith(github.ref, 'marceltaeumel/actions') + with: + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} + body: ${{ github.event.head_commit.message }} diff --git a/deploy/pack-vm.sh b/deploy/pack-vm.sh index b9c7f233d3..de5a26388b 100755 --- a/deploy/pack-vm.sh +++ b/deploy/pack-vm.sh @@ -1,108 +1,62 @@ #!/bin/bash -set -e - -readonly BUILD_DIR="${TRAVIS_BUILD_DIR:-$(cygpath ${APPVEYOR_BUILD_FOLDER})}" -readonly PRODUCTS_DIR="${BUILD_DIR}/products" -if [[ ! -d "${PRODUCTS_DIR}" ]]; then - echo "No products directory found." - exit 10 -fi +# Pack the VM into platform-specific container. All packing functions are +# evaluated in the ${PRODUCTS_PATH}. All binaries are expected to be there, +# already signed if required. +# +# Uses: +# - APP_NAME +# - PRODUCTS_PATH +# - ASSET_NAME +# +# Provides: +# - ASSET_EXTENSION (e.g., "tar.gz", "dmg", "zip") -BUILD_SYSTEM_SUFFIX="" -if [ "${BUILD_WITH_CMAKE}" = "yes" ]; then - BUILD_SYSTEM_SUFFIX="-cmake-minhdls" -fi -readonly BUILD_SYSTEM_SUFFIX -readonly REV=$(grep -m1 "SvnRawRevisionString" "${BUILD_DIR}/platforms/Cross/vm/sqSCCSVersion.h" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') -readonly IDENTIFIER="${FLAVOR}${BUILD_SYSTEM_SUFFIX}_${ARCH}_${REV}" -readonly IDENTIFIER_ITIMER="${FLAVOR}${BUILD_SYSTEM_SUFFIX}_${ARCH}_itimer_${REV}" -readonly KEY_CHAIN=macos-build.keychain +set -e -macos_codesign() { - local app_dir=$1 - local path_cer=$2 - local path_p12=$3 - local cert_pass=$4 - local sign_identity=$5 +[[ ! -d "${PRODUCTS_PATH}/${APP_NAME}" ]] && exit 31 +[[ -z "${ASSET_NAME}" ]] && exit 32 - echo "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 "${path_cer}" -k ~/Library/Keychains/"${KEY_CHAIN}" -T /usr/bin/codesign - security import "${path_p12}" -k ~/Library/Keychains/"${KEY_CHAIN}" -P "${cert_pass}" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple: -s -k travis "${KEY_CHAIN}" - # Invoke codesign - if [[ -d "${app_dir}/Contents/MacOS/Plugins" ]]; then # Pharo.app does not (yet) have its plugins in Resources dir - codesign -s "${sign_identity}" --force --deep "${app_dir}/Contents/MacOS/Plugins/"* - fi - codesign -s "${sign_identity}" --force --deep "${app_dir}" - # Remove sensitive files again - rm -rf "${path_cer}" "${path_p12}" - security delete-keychain "${KEY_CHAIN}" +# Pack the Linux build as .tar.gz archive +pack_Linux() { + readonly ASSET_EXTENSION="tar.gz" + tar czf "${PRODUCTS_PATH}/${ASSET_NAME}.${ASSET_EXTENSION}" "${APP_NAME}" } -pushd "${PRODUCTS_DIR}" -if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - counter=0 - for dir in */; do - if [[ "${ARCH}" == *"ARM"* || "${dir}" == *"ht/" ]]; then - name="${IDENTIFIER}" - else - name="${IDENTIFIER_ITIMER}" - 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 - APP_DIR=$(find "${PRODUCTS_DIR}" -type d -path "*.app" | head -n 1) - if [[ -z "${APP_DIR}" ]]; then - echo "Unable to locate app bundle." - exit 30 - fi - readonly DEPLOY_DIR="${TRAVIS_BUILD_DIR}/deploy" - if [[ "${FLAVOR}" == "squeak"* ]]; then - path_cer="${DEPLOY_DIR}/squeak/sign.cer" - path_p12="${DEPLOY_DIR}/squeak/sign.p12" - openssl aes-256-cbc -k "${SQUEAK_SIGN_PASSWORD}" -in "${path_cer}.enc" -out "${path_cer}" -d - openssl aes-256-cbc -k "${SQUEAK_SIGN_PASSWORD}" -in "${path_p12}.enc" -out "${path_p12}" -d - macos_codesign "${APP_DIR}" "${path_cer}" "${path_p12}" "${SQUEAK_CERT_PASSWORD}" "${SQUEAK_SIGN_IDENTITY}" - elif [[ "${FLAVOR}" == "pharo"* ]]; then - path_cer="${DEPLOY_DIR}/pharo/pharo.cer" - path_p12="${DEPLOY_DIR}/pharo/pharo.p12" - openssl aes-256-cbc -k "${PHARO_SIGN_PASSWORD}" -in "${path_cer}.enc" -out "${path_cer}" -d - openssl aes-256-cbc -k "${PHARO_SIGN_PASSWORD}" -in "${path_p12}.enc" -out "${path_p12}" -d - macos_codesign "${APP_DIR}" "${path_cer}" "${path_p12}" "${PHARO_CERT_PASSWORD}" "${PHARO_SIGN_IDENTITY}" - elif [[ "${FLAVOR}" == "newspeak"* ]]; then - NEW_APP_DIR="${PRODUCTS_DIR}/Newspeak.app" - mv "${APP_DIR}" "${NEW_APP_DIR}" - APP_DIR="${NEW_APP_DIR}" - path_cer="${DEPLOY_DIR}/newspeak/sign.cer" - path_p12="${DEPLOY_DIR}/newspeak/sign.p12" - openssl aes-256-cbc -k "${NEWSPEAK_SIGN_PASSWORD}" -in "${path_cer}.enc" -out "${path_cer}" -d - openssl aes-256-cbc -k "${NEWSPEAK_SIGN_PASSWORD}" -in "${path_p12}.enc" -out "${path_p12}" -d - macos_codesign "${APP_DIR}" "${path_cer}" "${path_p12}" "${NEWSPEAK_CERT_PASSWORD}" "${NEWSPEAK_SIGN_IDENTITY}" - fi - TMP_DMG="temp.dmg" - hdiutil create -size 64m -volname "${IDENTIFIER}" -srcfolder "${APP_DIR}" \ +# Pack the macOS .app as .dmg container +pack_macOS() { + readonly ASSET_EXTENSION="dmg" + readonly APP_PATH="${PRODUCTS_PATH}/${APP_NAME}" + TMP_DMG="temp.${ASSET_EXTENSION}" + hdiutil create -size 64m -volname "${ASSET_NAME}" -srcfolder "${APP_PATH}" \ -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 "${IDENTIFIER}.dmg" + hdiutil convert "${TMP_DMG}" -format UDBZ -imagekey bzip2-level=9 -o "${ASSET_NAME}.${ASSET_EXTENSION}" rm -f "${TMP_DMG}" -elif [[ "${APPVEYOR}" ]]; then - cd "./vm" - rm -f *.def *.exp *.lib *.map *.o *.res *Unstripped* # remove temporary build files - zip -r "${PRODUCTS_DIR}/${IDENTIFIER}.zip" "./" -else - echo "Unsupported platform '$(uname -s)'." 1>&2 - exit 90 +} + +# Pack the Windows build as .zip archive +pack_Windows() { + readonly ASSET_EXTENSION="zip" + cd "${APP_NAME}" + rm -f *.def *.exp *.lib *.map *.o *.res *Unstripped* *.ignore # remove temporary build files + 7z a -tzip -r "${PRODUCTS_PATH}/${ASSET_NAME}.${ASSET_EXTENSION}" "./" +} + +if [[ ! -d "${PRODUCTS_PATH}" ]]; then + echo "No products directory found." + exit 10 fi + +if [[ ! $(type -t pack_$RUNNER_OS) ]]; then + echo "Unsupported runner OS ${RUNNER_OS}." + exit 99 +fi + +pushd "${PRODUCTS_PATH}" +pack_$RUNNER_OS popd + +[[ -z "${ASSET_EXTENSION}" ]] && exit 95 +echo "ASSET_EXTENSION=${ASSET_EXTENSION}" >> $GITHUB_ENV diff --git a/deploy/sign-vm.sh b/deploy/sign-vm.sh new file mode 100755 index 0000000000..e219881d35 --- /dev/null +++ b/deploy/sign-vm.sh @@ -0,0 +1,97 @@ +#!/bin/bash +# Uses: +# - PRODUCTS_PATH +# - APP_NAME +# - *_SIGN_PASSWORD (secret) +# - *_CERT_PASSWORD (secret) +# - *_SIGN_IDENTITY (secret) +set -e + +[[ ! -d "${PRODUCTS_PATH}/${APP_NAME}" ]] && exit 30 + +readonly APP_PATH="${PRODUCTS_PATH}/${APP_NAME}" +readonly KEY_CHAIN=macos-build.keychain + +sign_Linux() { + echo "Not implemented." + exit 999 +} + +sign_macOS() { + local -r cert_path="deploy" + + if [[ "${FLAVOR}" == "squeak"* ]]; then + cert_filepath_cer="${cert_path}/squeak/sign.cer" + cert_filepath_p12="${cert_path}/squeak/sign.p12" + sign_password="${SQUEAK_SIGN_PASSWORD}" + cert_password="${SQUEAK_CERT_PASSWORD}" + sign_identity="${SQUEAK_SIGN_IDENTITY}" + elif [[ "${FLAVOR}" == "pharo"* ]]; then + cert_filepath_cer="${cert_path}/pharo/pharo.cer" + cert_filepath_p12="${cert_path}/pharo/pharo.p12" + sign_password="${PHARO_SIGN_PASSWORD}" + cert_password="${PHARO_CERT_PASSWORD}" + sign_identity="${PHARO_SIGN_IDENTITY}" + elif [[ "${FLAVOR}" == "newspeak"* ]]; then + cert_filepath_cer="${cert_path}/newspeak/sign.cer" + cert_filepath_p12="${cert_path}/newspeak/sign.p12" + sign_password="${NEWSPEAK_SIGN_PASSWORD}" + cert_password="${NEWSPEAK_CERT_PASSWORD}" + sign_identity="${NEWSPEAK_SIGN_IDENTITY}" + else + echo "Unsupported VM flavor ${FLAVOR}." + exit 35 + fi + + echo "::group::Decrypt certificate files..." + openssl aes-256-cbc \ + -k "${sign_password}" \ + -in "${cert_filepath_cer}.enc" \ + -out "${cert_filepath_cer}" \ + -d + openssl aes-256-cbc \ + -k "${sign_password}" \ + -in "${cert_filepath_p12}.enc" \ + -out "${cert_filepath_p12}" \ + -d + echo "::endgroup::" + + echo "::group::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_filepath_cer}" -k ~/Library/Keychains/"${KEY_CHAIN}" -T /usr/bin/codesign + security import "${cert_filepath_p12}" -k ~/Library/Keychains/"${KEY_CHAIN}" -P "${cert_password}" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple: -s -k travis "${KEY_CHAIN}" + # Invoke codesign + if [[ -d "${APP_PATH}/Contents/MacOS/Plugins" ]]; then + # Pharo.app does not (yet) have its plugins in Resources dir + codesign -s "${sign_identity}" --force --deep "${APP_PATH}/Contents/MacOS/Plugins/"* + fi + codesign -s "${sign_identity}" --force --deep "${APP_PATH}" + # Remove sensitive files again + rm -rf "${cert_filepath_cer}" "${cert_filepath_p12}" + security delete-keychain "${KEY_CHAIN}" + echo "::endgroup::" +} + +sign_Windows() { + echo "Not implemented." + exit 999 +} + +if [[ ! -d "${PRODUCTS_PATH}" ]]; then + echo "No products directory found." + exit 10 +fi + +if [[ ! $(type -t pack_$RUNNER_OS) ]]; then + echo "Unsupported runner OS ${RUNNER_OS}." + exit 99 +fi + +pushd "${PRODUCTS_PATH}" +sign_$RUNNER_OS +popd diff --git a/scripts/ci/actions_build.sh b/scripts/ci/actions_build.sh new file mode 100755 index 0000000000..6c9a3c2f36 --- /dev/null +++ b/scripts/ci/actions_build.sh @@ -0,0 +1,164 @@ +#!/bin/bash +# Uses: +# - ARCH (e.g., "macos64x64") +# - FLAVOR (e.g., "squeak.cog.spur") +# - RUNNER_OS (i.e., "Linux", "macOS", "Windows") +# - HEARTBEAT (i.e., "threaded" or "itimer"; !! Linux only !!) +# Provides: +# - ASSET_REVISION (e.g., "202107261048") +# - ASSET_NAME (e.g., "squeak.cog.spur_macos64x64") +# - BUILD_PATH (e.g., "build.macos64x64/squeak.cog.spur") +# - PRODUCTS_PATH (e.g., "products") +# - APP_NAME (e.g., "vm" or "sqcogspur64linuxht" or "Squeak.app") + +set -e + +if [[ "${RUNNER_OS}" == "Windows" ]]; then + source ./scripts/ci/actions_prepare_msys.sh +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 + +[[ -z "${ARCH}" ]] && exit 2 +[[ -z "${FLAVOR}" ]] && exit 3 + +readonly ASSET_REVISION=$(grep -m1 "SvnRawRevisionString" "platforms/Cross/vm/sqSCCSVersion.h" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') + +ASSET_NAME="${FLAVOR}_${ARCH}" +BUILD_PATH="$(pwd)/build.${ARCH}/${FLAVOR}" + +PRODUCTS_PATH="$(pwd)/products" +mkdir "${PRODUCTS_PATH}" || true # ensure PRODUCTS_PATH exists + +check_buildPath() { + if [[ ! -d "${BUILD_PATH}" ]]; then + echo "Build path does not exist: ${BUILD_PATH}" + exit 11 + fi +} + +skip_BochsPlugins() { + echo "Skipping Bochs plugins..." + sed -i 's/Bochs.* //g' plugins.ext + sed -i 's/Bochs.* //g' plugins.int +} + +# export COGVREV="$(git describe --tags --always)" +# export COGVDATE="$(git show -s --format=%cd HEAD)" +# export COGVURL="$(git config --get remote.origin.url)" +# export COGVOPTS="-DCOGVREV=\"${COGVREV}\" -DCOGVDATE=\"${COGVDATE// /_}\" -DCOGVURL=\"${COGVURL//\//\\\/}\"" + +build_Linux() { + echo '::group::Running "make configure" in platforms/unix/config ...' + (cd platforms/unix/config/ && make configure) + echo '::endgroup::' + + BUILD_PATH="${BUILD_PATH}/build" + if [[ "${MODE}" == "debug" ]]; then + BUILD_PATH="${BUILD_PATH}.debug" + PRODUCTS_PATH="${PRODUCTS_PATH}/debug" + elif [[ "${MODE}" == "assert" ]]; then + BUILD_PATH="${BUILD_PATH}.assert" + PRODUCTS_PATH="${PRODUCTS_PATH}/assert" + fi + + if [[ ! -z "$HEARTBEAT" ]] && [[ "${HEARTBEAT}" != "threaded" ]]; then + BUILD_PATH="${BUILD_PATH}.itimerheartbeat" + ASSET_NAME="${ASSET_NAME}_itimer" + fi + + pushd "${BUILD_PATH}" + + echo "::group::Building ${BUILD_PATH}..." + echo n | bash -e ./mvm || exit 1 + echo "::endgroup::" + + cd "${PRODUCTS_PATH}" + readonly APP_NAME=$(find * -type d | head -n 1) + + popd +} + +build_macOS() { + check_buildPath + + pushd "${BUILD_PATH}" + + echo "::group::Building ${BUILD_PATH}..." + if [[ "${MODE}" == "debug" ]]; then + bash -e ./mvm -d || exit 1 + elif [[ "${MODE}" == "assert" ]]; then + bash -e ./mvm -a || exit 1 + else + bash -e ./mvm -f || exit 1 + fi + echo "::endgroup::" + + echo "::group::Moving build artifacts to ${PRODUCTS_PATH}..." + if [[ "${FLAVOR}" == "newspeak"* ]]; then + # TODO: Why does the Newspeak flavor have to wrong name? Should be set in its build scripts (or Makefile ...) + mv ./*.app "${PRODUCTS_PATH}/Newspeak.app" + else + mv ./*.app "${PRODUCTS_PATH}/" + fi + echo "::endgroup::" + + cd "${PRODUCTS_PATH}" + readonly APP_NAME=$(find * -type d -path "*.app" | head -n 1) + + popd +} + +build_Windows() { + check_buildPath + pushd "${BUILD_PATH}" + + echo "::group::Building ${BUILD_PATH}..." + skip_BochsPlugins + if [[ "${MODE}" == "debug" ]]; then + bash -e ./mvm -d || exit 1 + elif [[ "${MODE}" == "assert" ]]; then + bash -e ./mvm -a || exit 1 + else + bash -e ./mvm -f || exit 1 + fi + echo "::endgroup::" + + echo "::group::Moving build artifacts to ${PRODUCTS_PATH}..." + if [[ "${MODE}" == "debug" ]]; then + mv "./builddbg/vm" "${PRODUCTS_PATH}/" + elif [[ "${MODE}" == "assert" ]]; then + mv "./buildast/vm" "${PRODUCTS_PATH}/" + else + mv "./build/vm" "${PRODUCTS_PATH}/" + fi + echo "::endgroup::" + + readonly APP_NAME="vm" + + popd +} + +if [[ ! $(type -t build_$RUNNER_OS) ]]; then + echo "Unsupported runner OS ${RUNNER_OS}." + exit 99 +fi + +build_$RUNNER_OS + +if [[ "${MODE}" == "debug" ]]; then + ASSET_NAME="${ASSET_NAME}_debug" +elif [[ "${MODE}" == "assert" ]]; then + ASSET_NAME="${ASSET_NAME}_assert" +fi + +echo "ASSET_REVISION=${ASSET_REVISION}" >> $GITHUB_ENV +echo "ASSET_NAME=${ASSET_NAME}" >> $GITHUB_ENV + +[[ ! -d "${BUILD_PATH}" ]] && exit 12 +echo "BUILD_PATH=${BUILD_PATH}" >> $GITHUB_ENV +[[ ! -d "${PRODUCTS_PATH}" ]] && exit 13 +echo "PRODUCTS_PATH=${PRODUCTS_PATH}" >> $GITHUB_ENV +[[ ! -d "${PRODUCTS_PATH}/${APP_NAME}" ]] && exit 14 +echo "APP_NAME=${APP_NAME}" >> $GITHUB_ENV diff --git a/scripts/ci/actions_prepare_msys.sh b/scripts/ci/actions_prepare_msys.sh new file mode 100755 index 0000000000..f32f883601 --- /dev/null +++ b/scripts/ci/actions_prepare_msys.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Prepare MSYS environment so that all build tools have the $(TOOLPREFIX) as +# expected in Makefile.tools: +# - win64x64\common\Makefile.tools +# - win32x86\common\Makefile.tools +# Also, extend $PATH since MSYS is installed but not conveniently accessible +# in a GitHub-Actions Windows environment. + +[[ -z "${MSYS_SYS}" ]] && exit 2 +[[ -z "${MSYS_ENV}" ]] && exit 2 + +ln -f -s /c/msys64/${MSYS_SYS}/bin/clang /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-clang +ln -f -s /c/msys64/${MSYS_SYS}/bin/clang++ /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-clang++ +ln -f -s /c/msys64/${MSYS_SYS}/bin/ar /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-ar +ln -f -s /c/msys64/${MSYS_SYS}/bin/dlltool /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-dlltool +ln -f -s /c/msys64/${MSYS_SYS}/bin/as /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-as +ln -f -s /c/msys64/${MSYS_SYS}/bin/windres /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-windres +ln -f -s /c/msys64/${MSYS_SYS}/bin/nm /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-nm +ln -f -s /c/msys64/${MSYS_SYS}/bin/dllwrap /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-dllwrap +ln -f -s /c/msys64/${MSYS_SYS}/bin/strip /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-strip +ln -f -s /c/msys64/${MSYS_SYS}/bin/objcopy /c/msys64/${MSYS_SYS}/bin/${MSYS_ENV}-w64-mingw32-objcopy + +# Add MinGW tools for build scripts +PATH=$PATH:/c/msys64/${MSYS_SYS}/bin + +# Add other GNU tools (e.g., wget) for third-party build scripts +PATH=$PATH:/c/msys64/usr/bin diff --git a/scripts/ci/actions_prepare_ubuntu.sh b/scripts/ci/actions_prepare_ubuntu.sh new file mode 100755 index 0000000000..73150eb875 --- /dev/null +++ b/scripts/ci/actions_prepare_ubuntu.sh @@ -0,0 +1,144 @@ +set -e + +if [[ "${ARCH}" = "linux64x64" ]]; then + sudo apt-get update -y + sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ + debhelper \ + devscripts \ + libasound2-dev \ + libc6-dev \ + libssl-dev \ + libfreetype6-dev \ + libx11-dev \ + libxext-dev \ + libxrender-dev \ + libpango1.0-dev \ + libpulse-dev \ + libaudio-dev \ + libsndio-dev \ + gcc-multilib \ + uuid-dev \ + libglu1-mesa-dev \ + automake \ + autoconf \ + libtool \ + curl \ + cmake +elif [[ "${ARCH}" = "linux32x86" ]]; then + sudo apt-get update -y + sudo apt-get remove -q -y gvfs-daemons + sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ + devscripts \ + libc6-dev:i386 \ + libasound2:i386 \ + libasound2-dev:i386 \ + libssl-dev:i386 \ + libssl0.9.8:i386 \ + libpng-dev:i386 \ + libfreetype6-dev:i386 \ + libx11-dev:i386 \ + libsm-dev:i386 \ + libice-dev:i386 \ + libgl1-mesa-glx:i386 \ + libgl1-mesa-dev:i386 \ + libxext-dev:i386 \ + libxrender-dev:i386 \ + libglapi-mesa:i386 \ + libcairo2-dev:i386 \ + libpango1.0-dev:i386 \ + libglib2.0-dev:i386 \ + libxft-dev:i386 \ + gir1.2-pango-1.0:i386 \ + gir1.2-freedesktop:i386 \ + gir1.2-glib-2.0:i386 \ + libgirepository-1.0-1:i386 \ + libpulse-dev:i386 \ + libaudio-dev:i386 \ + libsndio-dev:i386 \ + gcc-multilib \ + uuid-dev:i386 \ + libcurl4-openssl-dev:i386 \ + libssh2-1-dev:i386 +fi + +[[ "${ARCH}" != "linux32ARMv6" ]] && exit 0 + +MIRROR=http://archive.raspbian.org/raspbian +VERSION=jessie +# TOOLS_DIR=$PWD/tools +ARMCHROOT=$PWD/armchroot + +sudo dpkg --add-architecture i386 +sudo apt-add-repository multiverse +sudo apt-add-repository universe +sudo apt-get update -myq || true + +sudo apt-get update -y +sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ + gcc-arm-linux-gnueabi \ + gcc-arm-linux-gnueabihf \ + qemu-system \ + qemu-system-arm \ + qemu-user \ + qemu-user-static \ + sbuild \ + schroot \ + scratchbox2 \ + debootstrap \ + zlib1g:i386 \ + libstdc++6:i386 \ + libffi-dev:i386 \ + libffi6:i386 \ + libssl1.0.0:i386 \ + libbz2-1.0:i386 \ + libc6-dev-i386 \ + libc6:i386 \ + libexpat1:i386 \ + libtinfo5:i386 \ + binfmt-support \ + build-essential \ + python-dev \ + libffi-dev \ + zlib1g-dev \ + libtool \ + automake \ + autoconf + +sudo chown $USER /etc/schroot/schroot.conf +echo " +[rpi] +directory=$ARMCHROOT +users=$USER +root-users=$USER +groups=$USER +aliases=default +type=directory +" >> /etc/schroot/schroot.conf +cat /etc/schroot/schroot.conf +sudo chown root /etc/schroot/schroot.conf + +# git clone https://github.com/raspberrypi/tools.git $TOOLS_DIR + +# chroot +if [ ! -e "$ARMCHROOT/etc/debian_chroot" ]; then + mkdir -p $ARMCHROOT + sudo qemu-debootstrap --no-check-gpg --include=fakeroot,build-essential --arch=armhf ${VERSION} ${ARMCHROOT} ${MIRROR} + sudo su -c "echo \"deb ${MIRROR} jessie main contrib rpi\" > ${ARMCHROOT}/etc/apt/sources.list" + schroot -c rpi -u root -- apt-get update + schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y \ + build-essential libcairo2-dev libpango1.0-dev libssl-dev uuid-dev uuid-runtime libasound2-dev \ + debhelper devscripts libssl-dev libfreetype6-dev libx11-dev libxext-dev libxrender-dev \ + libx11-dev libsm-dev libice-dev libgl1-mesa-dev libgl1-mesa-glx git \ + libtool automake autoconf + #needed for third-party libraries + schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y cmake curl +fi +schroot -c rpi -- uname -m + +sudo mount -o remount,size=100M /tmp || echo "No tmp size increase required" + +# Use Scratchbox2 for faster compilation +# pushd $ARMCHROOT +# sb2-init -c `which qemu-arm` rpi $TOOLS_DIR/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc +# sb2-config -d rpi +# popd From 47774cc0ba36cd62d3e41e8181971025a8d42f7f Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Tue, 27 Jul 2021 09:44:23 +0200 Subject: [PATCH 02/12] Change deploy branch to "Cog". --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/win.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 692e1e1733..e74f6ae1b3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -91,7 +91,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: endsWith( github.ref , 'marceltaeumel/actions' ) + if: endsWith( github.ref , 'Cog' ) with: prerelease: true allowUpdates: true diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f496d4815d..1dae773d2e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -99,7 +99,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: endsWith( github.ref , 'marceltaeumel/actions' ) + if: endsWith( github.ref , 'Cog' ) with: prerelease: true allowUpdates: true diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 1c5cc23661..ac87b7d7b6 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -94,7 +94,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: endsWith(github.ref, 'marceltaeumel/actions') + if: endsWith(github.ref, 'Cog') with: prerelease: true allowUpdates: true From 4e8cb6bb0e8e6da263b3f262e3956e3537e5ad18 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Tue, 27 Jul 2021 10:29:35 +0200 Subject: [PATCH 03/12] Try Newspeak builds. --- .github/workflows/linux.yml | 26 +++++++++++++++----------- .github/workflows/macos.yml | 6 +++--- .github/workflows/win.yml | 8 ++++---- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e74f6ae1b3..e7873a3167 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -24,10 +24,14 @@ jobs: matrix: arch: - linux64x64 - # - linux32x86 + - linux32x86 flavor: - - squeak.cog.spur + # - squeak.cog.spur # - squeak.stack.spur + # - pharo.cog.spur + # - pharo.stack.spur + - newspeak.cog.spur + - newspeak.stack.spur heartbeat: - threaded - itimer @@ -40,15 +44,15 @@ jobs: # flavor: squeak.cog.v3 # - arch: linux32x86 # flavor: squeak.stack.v3 - exclude: - - arch: linux64x64 - flavor: squeak.cog.spur - heartbeat: itimer - mode: debug - - arch: linux64x64 - flavor: squeak.cog.spur - heartbeat: itimer - mode: assert + # exclude: + # - arch: linux64x64 + # flavor: squeak.cog.spur + # heartbeat: itimer + # mode: debug + # - arch: linux64x64 + # flavor: squeak.cog.spur + # heartbeat: itimer + # mode: assert runs-on: ubuntu-latest name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} env: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1dae773d2e..d717457257 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -27,12 +27,12 @@ jobs: - macos64x64 # - macos32x86 flavor: - - squeak.cog.spur + # - squeak.cog.spur # - squeak.stack.spur # - pharo.cog.spur # - pharo.stack.spur - # - newspeak.cog.spur - # - newspeak.stack.spur + - newspeak.cog.spur + - newspeak.stack.spur mode: - fast - debug diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index ac87b7d7b6..1ef89a6f6c 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -23,14 +23,14 @@ jobs: matrix: arch: - win64x64 - # - win32x86 + - win32x86 flavor: - - squeak.cog.spur + # - squeak.cog.spur # - squeak.stack.spur # - pharo.cog.spur # - pharo.stack.spur - # - newspeak.cog.spur - # - newspeak.stack.spur + - newspeak.cog.spur + - newspeak.stack.spur mode: - fast - debug From fb5633bedc2d628d8423dcc8ef2c0b3b151b81e6 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Tue, 27 Jul 2021 10:42:37 +0200 Subject: [PATCH 04/12] Also build for pull_request; only deploy on push. [ci skip] --- .github/workflows/linux.yml | 8 +++++--- .github/workflows/macos.yml | 8 +++++--- .github/workflows/win.yml | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e7873a3167..2fe53325a7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,8 +1,7 @@ name: Build for Linux (Ubuntu) on: - push: - # branches: [ marceltaeumel/actions ] + push: # All branches, but appropriate paths only. paths: - '.github/workflows/linux.yml' # This workflow spec - 'scripts/ci/**' # Support scripts for this workflow @@ -15,6 +14,9 @@ on: - '!**.md' - '!**HowToBuild' + pull_request: + branches: + - Cog jobs: @@ -95,7 +97,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: endsWith( github.ref , 'Cog' ) + if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) with: prerelease: true allowUpdates: true diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d717457257..e8df3d4cb7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,8 +1,7 @@ name: Build for macOS on: - push: - # branches: [ marceltaeumel/actions ] + push: # All branches, but appropriate paths only. paths: - '.github/workflows/macos.yml' # This workflow spec - 'scripts/ci/**' # Support scripts for this workflow @@ -15,6 +14,9 @@ on: - '!**.md' - '!**HowToBuild' + pull_request: + branches: + - Cog @@ -99,7 +101,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: endsWith( github.ref , 'Cog' ) + if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) with: prerelease: true allowUpdates: true diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 1ef89a6f6c..854d526336 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -1,8 +1,7 @@ name: Build for Windows on: - push: - # branches: [ marceltaeumel/actions ] + push: # All branches, but appropriate paths only. paths: - '.github/workflows/win.yml' # This workflow spec - 'scripts/ci/**' # Support scripts for this workflow @@ -15,6 +14,9 @@ on: - '!**.md' - '!**HowToBuild' + pull_request: + branches: + - Cog jobs: build: @@ -94,7 +96,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: endsWith(github.ref, 'Cog') + if: github.event_name == 'push' && endsWith(github.ref, 'Cog') with: prerelease: true allowUpdates: true From d57fe65d3ccdf9fc9db5a21233d6b8ce1436f4cb Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Tue, 27 Jul 2021 11:13:49 +0200 Subject: [PATCH 05/12] Setup all main builds for Linux, macOS, and Windows. Sketch workflow for Linux32xARMv6 (not functional). Adds extra workflow for not-so-common VM flavors. In linux install scripts, replace deprecated "--force-yes" with "--allow-unauthenticated". --- .github/workflows/extra.yml | 104 ++++++++++++++++++ .github/workflows/linux-arm.yml | 98 +++++++++++++++++ .github/workflows/linux.yml | 54 +++++---- .github/workflows/macos.yml | 40 +++---- .github/workflows/win.yml | 45 ++++---- .../pharo.cog.spur.lowcode/build/mvm | 4 +- .../pharo.stack.spur.lowcode/build/mvm | 4 +- platforms/Cross/plugins/IA32ABI/ia32abi.h | 4 + ...ubuntu.sh => actions_prepare_linux_arm.sh} | 71 +----------- scripts/ci/actions_prepare_linux_x86.sh | 62 +++++++++++ src/plugins/FileCopyPlugin/FileCopyPlugin.c | 9 +- 11 files changed, 339 insertions(+), 156 deletions(-) create mode 100644 .github/workflows/extra.yml create mode 100644 .github/workflows/linux-arm.yml rename scripts/ci/{actions_prepare_ubuntu.sh => actions_prepare_linux_arm.sh} (51%) create mode 100755 scripts/ci/actions_prepare_linux_x86.sh diff --git a/.github/workflows/extra.yml b/.github/workflows/extra.yml new file mode 100644 index 0000000000..a69b8ea9fc --- /dev/null +++ b/.github/workflows/extra.yml @@ -0,0 +1,104 @@ +name: Extra Monthly Builds + +on: + schedule: + - cron: '0 0 1 * *' + workflow_dispatch: + inputs: + ref: + description: 'Ref' + required: true + default: 'refs/heads/Cog' + + +jobs: + build: + strategy: + fail-fast: false + matrix: + arch: + - { name: win64x64, os: windows-latest } + - { name: win32x86, os: windows-latest } + - { name: linux64x64, os: ubuntu-latest } + - { name: linux32x86, os: ubuntu-latest } + - { name: macos64x64, os: macos-latest } + # - { name: macos32x86, os: macos-latest } + + flavor: + - newspeak.cog.spur + - newspeak.stack.spur + + include: + - arch: { name: win32x86, os: windows-latest } + flavor: squeak.cog.v3 + - arch: { name: win32x86, os: windows-latest } + flavor: squeak.stack.v3 + - arch: { name: win32x86, os: windows-latest } + flavor: squeak.cog.spur.lowcode + # - arch: { name: win32x86, os: windows-latest } + # flavor: pharo.cog.spur.lowcode + + - arch: { name: linux32x86, os: ubuntu-latest } + flavor: squeak.cog.v3 + - arch: { name: linux32x86, os: ubuntu-latest } + flavor: squeak.stack.v3 + - arch: { name: linux32x86, os: ubuntu-latest } + flavor: pharo.cog.spur.lowcode + - arch: { name: linux32x86, os: ubuntu-latest } + flavor: pharo.stack.spur.lowcode + + - arch: { name: macos64x64, os: macos-latest } + flavor: pharo.cog.spur.lowcode + - arch: { name: macos64x64, os: macos-latest } + flavor: pharo.stack.spur.lowcode + + runs-on: ${{ matrix.arch.os }} + name: ${{ matrix.flavor }} for ${{ matrix.arch.name }} + env: + ARCH: ${{ matrix.arch.name }} + FLAVOR: ${{ matrix.flavor }} + MODE: fast # no assert or debug here + HEARTBEAT: threaded # linux only; no itimer here + MSYS_SYS: ${{ matrix.arch.name == 'win64x64' && 'mingw64' || 'mingw32' }} + MSYS_ENV: ${{ matrix.arch.name == 'win64x64' && 'x86_64' || 'i686' }} + steps: + - name: Checkout files + uses: actions/checkout@v2 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || 'refs/heads/Cog'}} + + - name: Restore build cache + uses: actions/cache@v2 + with: + path: .thirdparty-cache + key: ${{ startsWith(matrix.arch.name, 'win') && 'thirdparty-cache-win' || startsWith(matrix.arch.name, 'linux') && 'thirdparty-cache-linux' || 'thirdparty-cache-macos' }} + + - name: Prepare environment + if: startsWith(matrix.arch.name, 'linux') + run: ./scripts/ci/actions_prepare_linux_x86.sh + + - name: Build VM + shell: bash + run: ./scripts/ci/actions_build.sh + + - name: Pack VM + shell: bash + run: ./deploy/pack-vm.sh + + - name: Store artifact w/ revision + uses: actions/upload-artifact@v2 + with: + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} + path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + + - name: Update artifact in latest-build + uses: ncipollo/release-action@v1.8.6 + if: endsWith( github.ref , 'Cog' ) + with: + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/linux-arm.yml b/.github/workflows/linux-arm.yml new file mode 100644 index 0000000000..7840b350c2 --- /dev/null +++ b/.github/workflows/linux-arm.yml @@ -0,0 +1,98 @@ +name: Build for Linux (ARM) + +on: + push: # All branches, but appropriate paths only. + paths: + - '.github/workflows/linux-arm.yml' # This workflow spec + - 'scripts/ci/*linux_arm.sh' # Support scripts for this workflow + - 'scripts/ci/*build.sh' + - 'deploy/**' + + - 'build.linux*/**' # Makefile-based build scripts + - '*src/**' # Generated VMMaker sources (incl. plugins) + - 'platforms/Cross/**' + - 'platforms/unix/**' + + - '!**.md' + - '!**HowToBuild' + pull_request: + branches: + - Cog + paths-ignore: + - '**.md' + - '**HowToBuild' + + +jobs: + build: + strategy: + fail-fast: true + matrix: + arch: + - linux32ARMv6 + # - linux32ARMv7 + # - linux64ARMv8 + flavor: + - squeak.cog.spur + # - squeak.stack.spur + heartbeat: + - threaded + # - itimer # not supported + mode: + - fast + # - debug + # - assert + runs-on: ubuntu-latest + name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} + env: + ARCH: ${{ matrix.arch }} + ARCH_ARM: ${{ matrix.arch == 'linux32ARMv6' && 'armv6' || matrix.arch == 'linux32ARMv7' && 'armv7' || 'aarch64' }} + FLAVOR: ${{ matrix.flavor }} + MODE: ${{ matrix.mode }} + steps: + - name: Checkout files + uses: actions/checkout@v2 + + - name: Restore build cache + uses: actions/cache@v2 + with: + path: armchroot + key: thirdparty-cache-linux-arm + + # - name: Setup tmate debugging session + # uses: mxschmitt/action-tmate@v3 + + - name: Prepare environment + run: ./scripts/ci/actions_prepare_linux_arm.sh + + - name: Build VM + run: | + schroot -p -c rpi -- + ./scripts/ci/actions_build.sh + env: + HEARTBEAT: ${{ matrix.heartbeat }} + + - name: Sign VM (not implemented) + if: false + run: ./deploy/sign-vm.sh + + - name: Pack VM + run: ./deploy/pack-vm.sh + + - name: Store artifact w/ revision + uses: actions/upload-artifact@v2 + with: + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} + path: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + + - name: Update artifact in latest-release + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) + with: + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2fe53325a7..e8f113c691 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,11 +1,12 @@ -name: Build for Linux (Ubuntu) +name: Build for Linux (x86) on: push: # All branches, but appropriate paths only. paths: - '.github/workflows/linux.yml' # This workflow spec - - 'scripts/ci/**' # Support scripts for this workflow - - 'deploy/**' # More support scripts for this workflow + - 'scripts/ci/*linux_x86.sh' # Support scripts for this workflow + - 'scripts/ci/*build.sh' + - 'deploy/**' - 'build.linux*/**' # Makefile-based build scripts - '*src/**' # Generated VMMaker sources (incl. plugins) @@ -17,6 +18,9 @@ on: pull_request: branches: - Cog + paths-ignore: + - '**.md' + - '**HowToBuild' jobs: @@ -28,12 +32,10 @@ jobs: - linux64x64 - linux32x86 flavor: - # - squeak.cog.spur - # - squeak.stack.spur - # - pharo.cog.spur - # - pharo.stack.spur - - newspeak.cog.spur - - newspeak.stack.spur + - squeak.cog.spur + - squeak.stack.spur + - pharo.cog.spur + # - pharo.stack.spur # build not prepared heartbeat: - threaded - itimer @@ -41,20 +43,17 @@ jobs: - fast - debug - assert - # include: # compatibility with Squeak 4.6 and older - # - arch: linux32x86 - # flavor: squeak.cog.v3 - # - arch: linux32x86 - # flavor: squeak.stack.v3 - # exclude: - # - arch: linux64x64 - # flavor: squeak.cog.spur - # heartbeat: itimer - # mode: debug - # - arch: linux64x64 - # flavor: squeak.cog.spur - # heartbeat: itimer - # mode: assert + include: + # sista build not fully prepared for linux64x64, so only your selected configurations for linux32x86 + - arch: linux32x86 + flavor: squeak.sista.spur + heartbeat: threaded + mode: fast + - arch: linux32x86 + flavor: pharo.sista.spur + heartbeat: threaded + mode: fast + runs-on: ubuntu-latest name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} env: @@ -69,13 +68,10 @@ jobs: uses: actions/cache@v2 with: path: .thirdparty-cache - key: thirdparty-cache # same for all runner.os - - # - name: Setup tmate debugging session - # uses: mxschmitt/action-tmate@v3 + key: thirdparty-cache-linux - name: Prepare environment - run: ./scripts/ci/actions_prepare_ubuntu.sh + run: ./scripts/ci/actions_prepare_linux_x86.sh - name: Build VM run: ./scripts/ci/actions_build.sh @@ -95,7 +91,7 @@ jobs: name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} path: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} - - name: Update artifact in latest-release + - name: Update artifact in latest-build uses: ncipollo/release-action@v1.8.6 if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) with: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e8df3d4cb7..9cc5a4d2aa 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -4,7 +4,7 @@ on: push: # All branches, but appropriate paths only. paths: - '.github/workflows/macos.yml' # This workflow spec - - 'scripts/ci/**' # Support scripts for this workflow + - 'scripts/ci/*build.sh' # Support scripts for this workflow - 'deploy/**' # More support scripts for this workflow - 'build.macos*/**' # Makefile-based build scripts @@ -17,6 +17,9 @@ on: pull_request: branches: - Cog + paths-ignore: + - '**.md' + - '**HowToBuild' @@ -29,31 +32,17 @@ jobs: - macos64x64 # - macos32x86 flavor: - # - squeak.cog.spur - # - squeak.stack.spur - # - pharo.cog.spur - # - pharo.stack.spur - - newspeak.cog.spur - - newspeak.stack.spur + - squeak.cog.spur + # - squeak.sista.spur # -Werror bc. decl. missing + - squeak.stack.spur + - pharo.cog.spur + # - pharo.sista.spur # -Werror bc. decl. missing + - pharo.stack.spur mode: - fast - debug - assert - # include: - # compatibility with Squeak 4.6 and older - # - arch: win32x86 - # flavor: squeak.cog.v3 - # - arch: win32x86 - # flavor: squeak.stack.v3 - # newer flavors w/ Sista-CogIt or Lowcode byteset - # - arch: win32x86 - # flavor: squeak.sista.spur - # - arch: win32x86 - # flavor: pharo.sista.spur - # - arch: win32x86 - # flavor: squeak.cog.spur.lowcode - # - arch: win32x86 - # flavor: pharo.cog.spur.lowcode + runs-on: macos-latest name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} env: @@ -68,10 +57,7 @@ jobs: uses: actions/cache@v2 with: path: .thirdparty-cache - key: thirdparty-cache # same for all runner.os - - # - name: Setup tmate debugging session - # uses: mxschmitt/action-tmate@v3 + key: thirdparty-cache-macos - name: Build VM run: ./scripts/ci/actions_build.sh @@ -99,7 +85,7 @@ jobs: name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} - - name: Update artifact in latest-release + - name: Update artifact in latest-build uses: ncipollo/release-action@v1.8.6 if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) with: diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 854d526336..03546d17d6 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -4,8 +4,9 @@ on: push: # All branches, but appropriate paths only. paths: - '.github/workflows/win.yml' # This workflow spec - - 'scripts/ci/**' # Support scripts for this workflow - - 'deploy/**' # More support scripts for this workflow + - 'scripts/ci/*msys.sh' # Support scripts for this workflow + - 'scripts/ci/*build.sh' + - 'deploy/**' - 'build.win*/**' # Makefile-based build scripts - '*src/**' # Generated VMMaker sources (incl. plugins) @@ -17,6 +18,9 @@ on: pull_request: branches: - Cog + paths-ignore: + - '**.md' + - '**HowToBuild' jobs: build: @@ -27,32 +31,23 @@ jobs: - win64x64 - win32x86 flavor: - # - squeak.cog.spur - # - squeak.stack.spur - # - pharo.cog.spur - # - pharo.stack.spur - - newspeak.cog.spur - - newspeak.stack.spur + - squeak.cog.spur + - squeak.stack.spur + # - pharo.cog.spur # third-party not yet working + # - pharo.stack.spur # third-party not yet working mode: - fast - debug - assert - # include: - # compatibility with Squeak 4.6 and older - # - arch: win32x86 - # flavor: squeak.cog.v3 - # mode: fast - # - arch: win32x86 - # flavor: squeak.stack.v3 - # newer flavors w/ Sista-CogIt or Lowcode byteset - # - arch: win32x86 - # flavor: squeak.sista.spur - # - arch: win32x86 + include: + # sista build not fully prepared for win64x64, so only your selected configurations for win32x86 + - arch: win32x86 + flavor: squeak.sista.spur + mode: fast + # - arch: win32x86 # flavor: pharo.sista.spur - # - arch: win32x86 - # flavor: squeak.cog.spur.lowcode - # - arch: win32x86 - # flavor: pharo.cog.spur.lowcode + # mode: fast + runs-on: windows-latest name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} env: @@ -67,7 +62,7 @@ jobs: uses: actions/cache@v2 with: path: .thirdparty-cache - key: thirdparty-cache # same for all runner.os + key: thirdparty-cache-win # - name: Setup tmate debugging session # uses: mxschmitt/action-tmate@v3 @@ -94,7 +89,7 @@ jobs: name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} - - name: Update artifact in latest-release + - name: Update artifact in latest-build uses: ncipollo/release-action@v1.8.6 if: github.event_name == 'push' && endsWith(github.ref, 'Cog') with: diff --git a/build.linux32x86/pharo.cog.spur.lowcode/build/mvm b/build.linux32x86/pharo.cog.spur.lowcode/build/mvm index b8e61423e1..d35a3c877a 100755 --- a/build.linux32x86/pharo.cog.spur.lowcode/build/mvm +++ b/build.linux32x86/pharo.cog.spur.lowcode/build/mvm @@ -35,7 +35,7 @@ test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp - test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) for lib in ${THIRDPARTYLIBS}; do - ../../third-party/${lib}/mvm + ../../third-party/mvm ${lib} done test -f config.h || ../../../platforms/unix/config/configure \ @@ -50,6 +50,6 @@ rm -rf ../../../products/$INSTALLDIR # but older linux readlinks lack the -f flag make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG for lib in ${THIRDPARTYLIBS}; do - ../../third-party/${lib}/mvm install `find ../../../products/$INSTALLDIR -name "5.0*"` + ../../third-party/mvm ${lib} install $productDir done ../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@" diff --git a/build.linux32x86/pharo.stack.spur.lowcode/build/mvm b/build.linux32x86/pharo.stack.spur.lowcode/build/mvm index 8ab2ec9f24..07d994e668 100755 --- a/build.linux32x86/pharo.stack.spur.lowcode/build/mvm +++ b/build.linux32x86/pharo.stack.spur.lowcode/build/mvm @@ -35,7 +35,7 @@ test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp - test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) for lib in ${THIRDPARTYLIBS}; do - ../../third-party/${lib}/mvm + ../../third-party/mvm ${lib} done test -f config.h || ../../../platforms/unix/config/configure \ @@ -50,6 +50,6 @@ rm -rf ../../../products/$INSTALLDIR # but older linux readlinks lack the -f flag make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG for lib in ${THIRDPARTYLIBS}; do - ../../third-party/${lib}/mvm install `find ../../../products/$INSTALLDIR -name "5.0*"` + ../../third-party/mvm ${lib} install $productDir done ../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@" diff --git a/platforms/Cross/plugins/IA32ABI/ia32abi.h b/platforms/Cross/plugins/IA32ABI/ia32abi.h index 7f981d79cf..5774701489 100644 --- a/platforms/Cross/plugins/IA32ABI/ia32abi.h +++ b/platforms/Cross/plugins/IA32ABI/ia32abi.h @@ -101,3 +101,7 @@ extern thunkEntryType thunkEntry (INT_REG_ARGS DBL_REG_ARGS void *,sqIntptr_t * extern void *allocateExecutablePage(sqIntptr_t *pagesize); extern VMCallbackContext *getMostRecentCallbackContext(void); #undef thunkEntryType + +#if NewspeakVM +int ioDrainEventQueue(void); +#endif diff --git a/scripts/ci/actions_prepare_ubuntu.sh b/scripts/ci/actions_prepare_linux_arm.sh similarity index 51% rename from scripts/ci/actions_prepare_ubuntu.sh rename to scripts/ci/actions_prepare_linux_arm.sh index 73150eb875..1eb5b4981c 100755 --- a/scripts/ci/actions_prepare_ubuntu.sh +++ b/scripts/ci/actions_prepare_linux_arm.sh @@ -1,70 +1,9 @@ set -e -if [[ "${ARCH}" = "linux64x64" ]]; then - sudo apt-get update -y - sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ - debhelper \ - devscripts \ - libasound2-dev \ - libc6-dev \ - libssl-dev \ - libfreetype6-dev \ - libx11-dev \ - libxext-dev \ - libxrender-dev \ - libpango1.0-dev \ - libpulse-dev \ - libaudio-dev \ - libsndio-dev \ - gcc-multilib \ - uuid-dev \ - libglu1-mesa-dev \ - automake \ - autoconf \ - libtool \ - curl \ - cmake -elif [[ "${ARCH}" = "linux32x86" ]]; then - sudo apt-get update -y - sudo apt-get remove -q -y gvfs-daemons - sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ - devscripts \ - libc6-dev:i386 \ - libasound2:i386 \ - libasound2-dev:i386 \ - libssl-dev:i386 \ - libssl0.9.8:i386 \ - libpng-dev:i386 \ - libfreetype6-dev:i386 \ - libx11-dev:i386 \ - libsm-dev:i386 \ - libice-dev:i386 \ - libgl1-mesa-glx:i386 \ - libgl1-mesa-dev:i386 \ - libxext-dev:i386 \ - libxrender-dev:i386 \ - libglapi-mesa:i386 \ - libcairo2-dev:i386 \ - libpango1.0-dev:i386 \ - libglib2.0-dev:i386 \ - libxft-dev:i386 \ - gir1.2-pango-1.0:i386 \ - gir1.2-freedesktop:i386 \ - gir1.2-glib-2.0:i386 \ - libgirepository-1.0-1:i386 \ - libpulse-dev:i386 \ - libaudio-dev:i386 \ - libsndio-dev:i386 \ - gcc-multilib \ - uuid-dev:i386 \ - libcurl4-openssl-dev:i386 \ - libssh2-1-dev:i386 -fi - [[ "${ARCH}" != "linux32ARMv6" ]] && exit 0 MIRROR=http://archive.raspbian.org/raspbian -VERSION=jessie +VERSION=buster # TOOLS_DIR=$PWD/tools ARMCHROOT=$PWD/armchroot @@ -74,7 +13,7 @@ sudo apt-add-repository universe sudo apt-get update -myq || true sudo apt-get update -y -sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ +sudo apt-get install -yq --no-install-suggests --no-install-recommends --allow-unauthenticated \ gcc-arm-linux-gnueabi \ gcc-arm-linux-gnueabihf \ qemu-system \ @@ -83,13 +22,11 @@ sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-y qemu-user-static \ sbuild \ schroot \ - scratchbox2 \ debootstrap \ zlib1g:i386 \ libstdc++6:i386 \ libffi-dev:i386 \ - libffi6:i386 \ - libssl1.0.0:i386 \ + libssl-dev:i386 \ libbz2-1.0:i386 \ libc6-dev-i386 \ libc6:i386 \ @@ -123,7 +60,7 @@ sudo chown root /etc/schroot/schroot.conf if [ ! -e "$ARMCHROOT/etc/debian_chroot" ]; then mkdir -p $ARMCHROOT sudo qemu-debootstrap --no-check-gpg --include=fakeroot,build-essential --arch=armhf ${VERSION} ${ARMCHROOT} ${MIRROR} - sudo su -c "echo \"deb ${MIRROR} jessie main contrib rpi\" > ${ARMCHROOT}/etc/apt/sources.list" + sudo su -c "echo \"deb ${MIRROR} ${VERSION} main contrib rpi\" > ${ARMCHROOT}/etc/apt/sources.list" schroot -c rpi -u root -- apt-get update schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y \ build-essential libcairo2-dev libpango1.0-dev libssl-dev uuid-dev uuid-runtime libasound2-dev \ diff --git a/scripts/ci/actions_prepare_linux_x86.sh b/scripts/ci/actions_prepare_linux_x86.sh new file mode 100755 index 0000000000..2f359df885 --- /dev/null +++ b/scripts/ci/actions_prepare_linux_x86.sh @@ -0,0 +1,62 @@ +set -e + +if [[ "${ARCH}" = "linux64x64" ]]; then + sudo apt-get update -y + sudo apt-get install -yq --no-install-suggests --no-install-recommends --allow-unauthenticated \ + debhelper \ + devscripts \ + libasound2-dev \ + libc6-dev \ + libssl-dev \ + libfreetype6-dev \ + libx11-dev \ + libxext-dev \ + libxrender-dev \ + libpango1.0-dev \ + libpulse-dev \ + libaudio-dev \ + libsndio-dev \ + gcc-multilib \ + uuid-dev \ + libglu1-mesa-dev \ + automake \ + autoconf \ + libtool \ + curl \ + cmake +elif [[ "${ARCH}" = "linux32x86" ]]; then + sudo dpkg --add-architecture i386 + sudo apt-get update -y + sudo apt-get remove -q -y gvfs-daemons + sudo apt-get install -yq --no-install-suggests --no-install-recommends --allow-unauthenticated \ + devscripts \ + libc6-dev:i386 \ + libasound2:i386 \ + libasound2-dev:i386 \ + libssl-dev:i386 \ + libpng-dev:i386 \ + libfreetype6-dev:i386 \ + libx11-dev:i386 \ + libsm-dev:i386 \ + libice-dev:i386 \ + libgl1-mesa-glx:i386 \ + libgl1-mesa-dev:i386 \ + libxext-dev:i386 \ + libxrender-dev:i386 \ + libglapi-mesa:i386 \ + libcairo2-dev:i386 \ + libpango1.0-dev:i386 \ + libglib2.0-dev:i386 \ + libxft-dev:i386 \ + gir1.2-pango-1.0:i386 \ + gir1.2-freedesktop:i386 \ + gir1.2-glib-2.0:i386 \ + libgirepository-1.0-1:i386 \ + libpulse-dev:i386 \ + libaudio-dev:i386 \ + libsndio-dev:i386 \ + gcc-multilib \ + uuid-dev:i386 \ + libcurl4-openssl-dev:i386 \ + libssh2-1-dev:i386 +fi diff --git a/src/plugins/FileCopyPlugin/FileCopyPlugin.c b/src/plugins/FileCopyPlugin/FileCopyPlugin.c index ef1dfe733c..dccb801d4d 100644 --- a/src/plugins/FileCopyPlugin/FileCopyPlugin.c +++ b/src/plugins/FileCopyPlugin/FileCopyPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.2995 uuid: d5fbffa6-5db7-4c4d-8937-a45036ab3015 + SmartSyntaxPluginCodeGenerator * VMMaker.oscog-eem.2997 uuid: 2d21044e-f2db-40ea-91da-ba273faf9093 from - FileCopyPlugin VMMaker.oscog-eem.2995 uuid: d5fbffa6-5db7-4c4d-8937-a45036ab3015 + FileCopyPlugin * VMMaker.oscog-eem.2997 uuid: 2d21044e-f2db-40ea-91da-ba273faf9093 */ -static char __buildInfo[] = "FileCopyPlugin VMMaker.oscog-eem.2995 uuid: d5fbffa6-5db7-4c4d-8937-a45036ab3015 " __DATE__ ; +static char __buildInfo[] = "FileCopyPlugin * VMMaker.oscog-eem.2997 uuid: 2d21044e-f2db-40ea-91da-ba273faf9093 " __DATE__ ; #include "config.h" @@ -19,6 +19,7 @@ static char __buildInfo[] = "FileCopyPlugin VMMaker.oscog-eem.2995 uuid: d5fbffa #include "sqVirtualMachine.h" /* The virtual machine proxy definition */ #include "sqPlatformSpecific.h" /* Platform specific definitions */ +#include "FileCopyPlugin.h" #include "sqMemoryAccess.h" #define true 1 @@ -66,7 +67,7 @@ extern sqInt stackValue(sqInt offset); extern #endif struct VirtualMachine* interpreterProxy; -static const char *moduleName = "FileCopyPlugin VMMaker.oscog-eem.2995 " INT_EXT; +static const char *moduleName = "FileCopyPlugin * VMMaker.oscog-eem.2997 " INT_EXT; From cc9be2b259071406e11a5b31d485270f993fce0f Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Wed, 28 Jul 2021 13:31:59 +0200 Subject: [PATCH 06/12] Quick-fix generated FT2Plugin to compile in Linux. Note that code generation does currently not work for that plugin. --- src/plugins/FT2Plugin/FT2Plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/FT2Plugin/FT2Plugin.c b/src/plugins/FT2Plugin/FT2Plugin.c index 91038c1777..49632bc4a1 100644 --- a/src/plugins/FT2Plugin/FT2Plugin.c +++ b/src/plugins/FT2Plugin/FT2Plugin.c @@ -6,7 +6,7 @@ static char __buildInfo[] = "FT2Plugin Freetype-Plugin-EstebanLorenzano.70 uuid: 3729adbd-b383-456b-96ec-dac31cd293f8 " __DATE__ ; - +#include "config.h" #include #include #include From 6095fda0c8a73e9e4280aba394d37161cb825386 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Wed, 28 Jul 2021 15:23:51 +0200 Subject: [PATCH 07/12] Quick fix to make squeak.cog.v3 build again on Linux32x86. Do not set or use endOfJITZone. This might not be what we actually want. --- platforms/unix/vm/sqUnixMemory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/unix/vm/sqUnixMemory.c b/platforms/unix/vm/sqUnixMemory.c index b8b7f350b1..17d5343a26 100644 --- a/platforms/unix/vm/sqUnixMemory.c +++ b/platforms/unix/vm/sqUnixMemory.c @@ -427,7 +427,7 @@ allocateJITMemory(usqInt *desiredSize) exit(1); } // Note the address for sqAllocateMemory above - endOfJITZone = (char *)result + *desiredSize; + // endOfJITZone = (char *)result + *desiredSize; return result; } From 74cd9b7d66ef33b40227f5f86ba4edfccb0fcfa9 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Wed, 28 Jul 2021 15:36:01 +0200 Subject: [PATCH 08/12] [ci skip] Another quickfix for making the rather old EventsHandlerPlugin compile on Linux. Where are its Slang sources located anyway? --- src/plugins/EventsHandlerPlugin/EventsHandlerPlugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/EventsHandlerPlugin/EventsHandlerPlugin.c b/src/plugins/EventsHandlerPlugin/EventsHandlerPlugin.c index 12ee96a726..ca22f6cafb 100644 --- a/src/plugins/EventsHandlerPlugin/EventsHandlerPlugin.c +++ b/src/plugins/EventsHandlerPlugin/EventsHandlerPlugin.c @@ -6,7 +6,7 @@ static char __buildInfo[] = "EventsHandlerPlugin EventsHandlerPlugin-EstebanLorenzano.1 uuid: 1516ba00-d8f9-4928-93cf-a46ad8e46d70 " __DATE__ ; - +#include "config.h" #include #include #include From 2ee13cacd033025e3fe4770a105e78139edb0234 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Wed, 28 Jul 2021 15:40:50 +0200 Subject: [PATCH 09/12] Setup ARM builds for Linux. Remove obsolete build files for TravisCI, AppVeyor, Bintray. --- .appveyor.yml | 198 --------------- .github/workflows/extra-arm.yml | 114 +++++++++ .github/workflows/extra.yml | 21 +- .github/workflows/linux-arm.yml | 70 ++++-- .github/workflows/linux.yml | 21 +- .github/workflows/macos.yml | 18 +- .github/workflows/win.yml | 9 +- .travis.yml | 225 ------------------ .../newspeak.cog.spur/build.assert/mvm | 2 +- .../newspeak.cog.spur/build.debug/mvm | 2 +- .../newspeak.stack.spur/build.assert/mvm | 2 +- .../newspeak.stack.spur/build.debug/mvm | 2 +- .../newspeak.stack.spur/build/mvm | 2 +- .../pharo.cog.spur/build.assert/mvm | 2 +- .../pharo.cog.spur/build.debug/mvm | 2 +- .../squeak.cog.spur/build.assert/mvm | 2 +- .../squeak.cog.spur/build.debug/mvm | 2 +- build.linux32ARMv6/squeak.cog.spur/build/mvm | 2 +- .../squeak.cog.v3/build.assert/mvm | 2 +- .../squeak.cog.v3/build.debug/mvm | 2 +- build.linux32ARMv6/squeak.cog.v3/build/mvm | 2 +- .../squeak.stack.spur/build.assert/mvm | 2 +- .../squeak.stack.spur/build.debug/mvm | 2 +- .../squeak.stack.spur/build/mvm | 2 +- .../squeak.stack.v3/build.assert/mvm | 2 +- .../squeak.stack.v3/build.debug/mvm | 2 +- build.linux32ARMv6/squeak.stack.v3/build/mvm | 2 +- .../newspeak.cog.spur/plugins.ext | 3 + .../newspeak.cog.spur/plugins.int | 29 +++ .../newspeak.stack.spur/plugins.ext | 3 + .../newspeak.stack.spur/plugins.int | 29 +++ .../pharo.cog.spur.lowcode/build/mvm | 2 + .../pharo.stack.spur.lowcode/build/mvm | 2 + deploy/bintray-cleanup.sh | 37 --- deploy/bintray.json | 15 -- deploy/bintray.sh | 22 -- deploy/filter-exec.sh | 35 --- deploy/sign-vm.sh | 9 +- scripts/ci/actions_build.sh | 38 ++- scripts/ci/actions_prepare_linux_arm.sh | 90 +------ scripts/ci/actions_prepare_linux_x86.sh | 6 + scripts/ci/travis_build.sh | 142 ----------- scripts/ci/travis_helpers.sh | 12 - scripts/ci/travis_install.sh | 144 ----------- 44 files changed, 339 insertions(+), 993 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .github/workflows/extra-arm.yml delete mode 100644 .travis.yml create mode 100644 build.linux32ARMv7/newspeak.cog.spur/plugins.ext create mode 100644 build.linux32ARMv7/newspeak.cog.spur/plugins.int create mode 100644 build.linux32ARMv7/newspeak.stack.spur/plugins.ext create mode 100644 build.linux32ARMv7/newspeak.stack.spur/plugins.int delete mode 100755 deploy/bintray-cleanup.sh delete mode 100644 deploy/bintray.json delete mode 100755 deploy/bintray.sh delete mode 100755 deploy/filter-exec.sh delete mode 100755 scripts/ci/travis_build.sh delete mode 100755 scripts/ci/travis_helpers.sh delete mode 100755 scripts/ci/travis_install.sh diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index db8de0236f..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,198 +0,0 @@ -environment: - matrix: - # Main VM variants - - FLAVOR: squeak.cog.spur - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: squeak.cog.spur - ARCH: win64x64 - CYG_ROOT: C:\cygwin64 - MINGW_ARCH: x86_64 - - FLAVOR: pharo.cog.spur - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: pharo.cog.spur - ARCH: win64x64 - CYG_ROOT: C:\cygwin64 - MINGW_ARCH: x86_64 - - # Main minheadless VM variants. - - FLAVOR: squeak.cog.spur.minheadless - ARCH: win32x86 - CPU_ARCH: x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - BUILD_WITH_CMAKE: yes - # - FLAVOR: squeak.cog.spur - # ARCH: win64x64 - # CPU_ARCH: x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - # BUILD_WITH_CMAKE: yes - - FLAVOR: pharo.cog.spur.minheadless - ARCH: win32x86 - CPU_ARCH: x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - BUILD_WITH_CMAKE: yes - # - FLAVOR: pharo.cog.spur - # ARCH: win64x64 - # CPU_ARCH: x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - # BUILD_WITH_CMAKE: yes - - # Minheadless VM variants with SDL2 based support for traditional display. - # - FLAVOR: squeak.cog.spur+sdl2 - # ARCH: win32x86 - # CPU_ARCH: x86 - # CYG_ROOT: C:\cygwin - # MINGW_ARCH: i686 - # BUILD_WITH_CMAKE: yes - # - FLAVOR: squeak.cog.spur+sdl2 - # ARCH: win64x64 - # CPU_ARCH: x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - # BUILD_WITH_CMAKE: yes - # - FLAVOR: pharo.cog.spur+sdl2 - # ARCH: win32x86 - # CPU_ARCH: x86 - # CYG_ROOT: C:\cygwin - # MINGW_ARCH: i686 - # BUILD_WITH_CMAKE: yes - # - FLAVOR: pharo.cog.spur+sdl2 - # ARCH: win64x64 - # CPU_ARCH: x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - # BUILD_WITH_CMAKE: yes - - # Other VM variants - - FLAVOR: squeak.sista.spur - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: squeak.cog.spur.lowcode - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: squeak.cog.v3 - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: squeak.stack.spur - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: squeak.stack.v3 - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: pharo.sista.spur - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - - FLAVOR: pharo.cog.spur.lowcode - ARCH: win32x86 - CYG_ROOT: C:\cygwin - MINGW_ARCH: i686 - # - FLAVOR: newspeak.cog.spur - # ARCH: win32x86 - # CYG_ROOT: C:\cygwin - # MINGW_ARCH: i686 - # - FLAVOR: newspeak.stack.spur - # ARCH: win32x86 - # CYG_ROOT: C:\cygwin - # MINGW_ARCH: i686 - # - FLAVOR: pharo.sista.spur - # ARCH: win64x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - # - FLAVOR: newspeak.cog.spur - # ARCH: win64x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - - FLAVOR: squeak.stack.spur - ARCH: win64x64 - CYG_ROOT: C:\cygwin64 - MINGW_ARCH: x86_64 - # - FLAVOR: pharo.stack.spur - # ARCH: win64x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - # - FLAVOR: newspeak.stack.spur - # ARCH: win64x64 - # CYG_ROOT: C:\cygwin64 - # MINGW_ARCH: x86_64 - - -matrix: - fast_finish: true - allow_failures: - - FLAVOR: squeak.cog.spur.minheadless - - FLAVOR: pharo.cog.spur.minheadless - - FLAVOR: squeak.sista.spur - - FLAVOR: pharo.sista.spur - - FLAVOR: squeak.cog.spur.lowcode - - FLAVOR: pharo.cog.spur.lowcode - -notifications: - - provider: Email - to: - - vm-dev@lists.squeakfoundation.org - on_build_success: false - -platform: - - x86 - -clone_depth: 5 - -cache: - - .thirdparty-cache - -install: - # Search for [appveyor skip], [skip appveyor], [skip ci] or [ci skip] and exit if found in full commit message - - ps: $commit=$env:APPVEYOR_REPO_COMMIT_MESSAGE + $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED - - ps: If ($commit.Contains("[skip appveyor]") -Or $commit.Contains("[appveyor skip]")) { Exit-AppVeyorBuild } - - ps: $commit=$env:APPVEYOR_REPO_COMMIT_MESSAGE + $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED - - ps: If ($commit.Contains("[skip ci]") -Or $commit.Contains("[ci skip]")) { Exit-AppVeyorBuild } - - 'curl -fsSL --retry 4 -m 600 -o "setup-x86.exe" "http://cygwin.com/setup-x86.exe" ' - - 'curl -fsSL --retry 4 -m 600 -o "setup-x86_64.exe" "http://cygwin.com/setup-x86_64.exe" ' - - 'call scripts/installCygwin.bat %MINGW_ARCH% "%CYG_ROOT%"' - -# Cygwin build script -# -# NOTES: -# -# The stdin/stdout file descriptor appears not to be valid for the Appveyor -# build which causes failures as certain functions attempt to redirect -# default file handles. Ensure a dummy file descriptor is opened with 'exec'. -build_script: - - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0> $GITHUB_ENV + echo "ASSET_NAME=${{ steps.build-vm.outputs.ASSET_NAME }}" >> $GITHUB_ENV + echo "PRODUCTS_PATH=${{ steps.build-vm.outputs.PRODUCTS_PATH }}" >> $GITHUB_ENV + echo "APP_NAME=${{ steps.build-vm.outputs.APP_NAME }}" >> $GITHUB_ENV + + - name: Sign VM (not implemented) + if: false + run: ./deploy/sign-vm.sh + + - name: Pack VM + run: ./deploy/pack-vm.sh + + - name: Store artifact w/ revision + uses: actions/upload-artifact@v2 + with: + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} + path: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + + - name: Update artifact in latest-release + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) + with: + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/extra.yml b/.github/workflows/extra.yml index a69b8ea9fc..bddaa3af1e 100644 --- a/.github/workflows/extra.yml +++ b/.github/workflows/extra.yml @@ -2,19 +2,19 @@ name: Extra Monthly Builds on: schedule: - - cron: '0 0 1 * *' + - cron: '0 0 1 * *' # Build on the 1st of every month at midnight workflow_dispatch: inputs: - ref: - description: 'Ref' + should-deploy: + description: 'Deploy on success' required: true - default: 'refs/heads/Cog' + default: "true" # No boolean support at the moment jobs: build: strategy: - fail-fast: false + fail-fast: false # let them finish bc. different platforms matrix: arch: - { name: win64x64, os: windows-latest } @@ -25,6 +25,7 @@ jobs: # - { name: macos32x86, os: macos-latest } flavor: + # Only newsqueak.* builds are fully prepared for all platforms - newspeak.cog.spur - newspeak.stack.spur @@ -47,8 +48,8 @@ jobs: - arch: { name: linux32x86, os: ubuntu-latest } flavor: pharo.stack.spur.lowcode - - arch: { name: macos64x64, os: macos-latest } - flavor: pharo.cog.spur.lowcode + # - arch: { name: macos64x64, os: macos-latest } + # flavor: pharo.cog.spur.lowcode # impl. decl. getThisSessionID - arch: { name: macos64x64, os: macos-latest } flavor: pharo.stack.spur.lowcode @@ -64,8 +65,8 @@ jobs: steps: - name: Checkout files uses: actions/checkout@v2 - with: - ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || 'refs/heads/Cog'}} + # with: + # ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || 'refs/heads/Cog'}} - name: Restore build cache uses: actions/cache@v2 @@ -93,7 +94,7 @@ jobs: - name: Update artifact in latest-build uses: ncipollo/release-action@v1.8.6 - if: endsWith( github.ref , 'Cog' ) + if: github.event.inputs.should-deploy == 'true' && endsWith( github.ref , 'Cog' ) with: prerelease: true allowUpdates: true diff --git a/.github/workflows/linux-arm.yml b/.github/workflows/linux-arm.yml index 7840b350c2..12326ab1b2 100644 --- a/.github/workflows/linux-arm.yml +++ b/.github/workflows/linux-arm.yml @@ -3,16 +3,17 @@ name: Build for Linux (ARM) on: push: # All branches, but appropriate paths only. paths: - - '.github/workflows/linux-arm.yml' # This workflow spec - - 'scripts/ci/*linux_arm.sh' # Support scripts for this workflow + # This workflow spec and its support scripts + - '.github/workflows/linux-arm.yml' + - 'scripts/ci/*linux_arm.sh' - 'scripts/ci/*build.sh' - 'deploy/**' - + # Relevant sources for this platform - 'build.linux*/**' # Makefile-based build scripts - '*src/**' # Generated VMMaker sources (incl. plugins) - 'platforms/Cross/**' - 'platforms/unix/**' - + # Skip changes in documentation artifacts - '!**.md' - '!**HowToBuild' pull_request: @@ -26,51 +27,70 @@ on: jobs: build: strategy: - fail-fast: true + fail-fast: false # let them finish bc. mixed platforms matrix: arch: - linux32ARMv6 - # - linux32ARMv7 - # - linux64ARMv8 + # - linux32ARMv7 # Newspeak only, see "extra-arm" workflow + - linux64ARMv8 flavor: - squeak.cog.spur - # - squeak.stack.spur - heartbeat: - - threaded - # - itimer # not supported + - squeak.stack.spur mode: - fast - # - debug - # - assert + - debug + - assert + runs-on: ubuntu-latest - name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} + name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} env: ARCH: ${{ matrix.arch }} ARCH_ARM: ${{ matrix.arch == 'linux32ARMv6' && 'armv6' || matrix.arch == 'linux32ARMv7' && 'armv7' || 'aarch64' }} FLAVOR: ${{ matrix.flavor }} MODE: ${{ matrix.mode }} + HEARTBEAT: threaded # itimer not supported steps: - name: Checkout files uses: actions/checkout@v2 + # TODO: Can we use the same thirdparty cache for armv6, armv7, and aarch64? Are pre-compiled binaries compatible or organized differently? - name: Restore build cache uses: actions/cache@v2 with: - path: armchroot - key: thirdparty-cache-linux-arm + path: .thirdparty-cache + key: thirdparty-cache-linux-${{ env.ARCH_ARM }} - # - name: Setup tmate debugging session - # uses: mxschmitt/action-tmate@v3 + # https://github.com/marketplace/actions/run-on-architecture + - name: Build VM + uses: uraimo/run-on-arch-action@v2.1.1 + id: build-vm + with: + arch: ${{ env.ARCH_ARM }} + distro: buster - - name: Prepare environment - run: ./scripts/ci/actions_prepare_linux_arm.sh + #TODO: Somehow use ./scripts/ci/actions_prepare_linux_arm.sh + #SEE: https://github.com/uraimo/run-on-arch-action/issues/54 + install: | + apt update -y + apt install -yq --no-install-suggests --no-install-recommends build-essential git devscripts uuid-dev libcairo2-dev libpango1.0-dev libgl1-mesa-dev libgl1-mesa-glx libssl-dev libevdev-dev m4 libpulse-dev libasound2-dev libfreetype6-dev libx11-dev libxrender-dev libtool automake autoconf libltdl-dev - - name: Build VM + env: | # Copy the entire environment for the docker container + ARCH: ${{ env.ARCH }} + ARCH_ARM: ${{ env.ARCH_ARM }} + FLAVOR: ${{ env.FLAVOR }} + MODE: ${{ env.MODE }} + HEARTBEAT: ${{ env.HEARTBEAT }} + + run: ./scripts/ci/actions_build.sh + + - name: Post Build VM + #TODO: https://github.com/uraimo/run-on-arch-action/issues/52 run: | - schroot -p -c rpi -- - ./scripts/ci/actions_build.sh - env: - HEARTBEAT: ${{ matrix.heartbeat }} + sudo chown -R runner ${{ steps.build-vm.outputs.PRODUCTS_PATH }} + echo "ASSET_REVISION=${{ steps.build-vm.outputs.ASSET_REVISION }}" >> $GITHUB_ENV + echo "ASSET_NAME=${{ steps.build-vm.outputs.ASSET_NAME }}" >> $GITHUB_ENV + echo "PRODUCTS_PATH=${{ steps.build-vm.outputs.PRODUCTS_PATH }}" >> $GITHUB_ENV + echo "APP_NAME=${{ steps.build-vm.outputs.APP_NAME }}" >> $GITHUB_ENV - name: Sign VM (not implemented) if: false diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e8f113c691..7106694326 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,16 +3,17 @@ name: Build for Linux (x86) on: push: # All branches, but appropriate paths only. paths: - - '.github/workflows/linux.yml' # This workflow spec - - 'scripts/ci/*linux_x86.sh' # Support scripts for this workflow + # This workflow spec and its support scripts + - '.github/workflows/linux.yml' + - 'scripts/ci/*linux_x86.sh' - 'scripts/ci/*build.sh' - 'deploy/**' - + # Relevant sources for this platform - 'build.linux*/**' # Makefile-based build scripts - '*src/**' # Generated VMMaker sources (incl. plugins) - 'platforms/Cross/**' - 'platforms/unix/**' - + # Skip changes in documentation artifacts - '!**.md' - '!**HowToBuild' pull_request: @@ -33,7 +34,6 @@ jobs: - linux32x86 flavor: - squeak.cog.spur - - squeak.stack.spur - pharo.cog.spur # - pharo.stack.spur # build not prepared heartbeat: @@ -44,7 +44,7 @@ jobs: - debug - assert include: - # sista build not fully prepared for linux64x64, so only your selected configurations for linux32x86 + # sista build not fully prepared for linux64x64, so only choose selected configurations for linux32x86 - arch: linux32x86 flavor: squeak.sista.spur heartbeat: threaded @@ -53,6 +53,15 @@ jobs: flavor: pharo.sista.spur heartbeat: threaded mode: fast + # squeak.stack.spur builds are not prepared for itimer + - arch: linux64x64 + flavor: squeak.stack.spur + heartbeat: threaded + mode: fast + - arch: linux32x86 + flavor: squeak.stack.spur + heartbeat: threaded + mode: fast runs-on: ubuntu-latest name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9cc5a4d2aa..1421bbf014 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -3,15 +3,16 @@ name: Build for macOS on: push: # All branches, but appropriate paths only. paths: - - '.github/workflows/macos.yml' # This workflow spec - - 'scripts/ci/*build.sh' # Support scripts for this workflow - - 'deploy/**' # More support scripts for this workflow - + # This workflow spec and its support scripts + - '.github/workflows/macos.yml' + - 'scripts/ci/*build.sh' + - 'deploy/**' + # Relevant sources for this platform - 'build.macos*/**' # Makefile-based build scripts - '*src/**' # Generated VMMaker sources (incl. plugins) - 'platforms/Cross/**' - 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated - + # Skip changes in documentation artifacts - '!**.md' - '!**HowToBuild' pull_request: @@ -22,7 +23,6 @@ on: - '**HowToBuild' - jobs: build: strategy: @@ -30,7 +30,7 @@ jobs: matrix: arch: - macos64x64 - # - macos32x86 + # - macos32x86 # Might be deprecated in general flavor: - squeak.cog.spur # - squeak.sista.spur # -Werror bc. decl. missing @@ -62,8 +62,8 @@ jobs: - name: Build VM run: ./scripts/ci/actions_build.sh - - name: Sign VM (secrets missing) - if: false + - name: Sign VM + continue-on-error: true # Save unsigned build artifacts run: ./deploy/sign-vm.sh env: SQUEAK_SIGN_PASSWORD: ${{ secrets.SQUEAK_SIGN_PASSWORD }} diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 03546d17d6..1dbbb6bcbd 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -3,16 +3,17 @@ name: Build for Windows on: push: # All branches, but appropriate paths only. paths: - - '.github/workflows/win.yml' # This workflow spec - - 'scripts/ci/*msys.sh' # Support scripts for this workflow + # This workflow spec and its support scripts + - '.github/workflows/win.yml' + - 'scripts/ci/*msys.sh' - 'scripts/ci/*build.sh' - 'deploy/**' - + # Relevant sources for this platform - 'build.win*/**' # Makefile-based build scripts - '*src/**' # Generated VMMaker sources (incl. plugins) - 'platforms/Cross/**' - 'platforms/win32/**' - + # Skip changes in documentation artifacts - '!**.md' - '!**HowToBuild' pull_request: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 721ae997b8..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,225 +0,0 @@ -language: c - -sudo: required - -addons: - apt: - update: true - -cache: - directories: - - armchroot - - .thirdparty-cache - -notifications: - slack: - secure: gyekIJqPdx7SxqpugvtpY5mZSg54oFkFJ+DKBPILtjyI/sDhcSwT9GwY/zoHoYkoHrPLepDxyPgkAC8JCcTiAcxOazq5zlVva6SoQRjlDnC64oCYvOj/2giuYkXLXnwvj8mIINEgXzEvLdalpHwazsY0fzKNFM1mdrkPolmf2CvaNbKCGkiagsjrxJHEEB4tLcUP4ArqVE6wb+20HXoMKlHccgCFvN67bYJrTXDnuhEgKMooQRFv0yVoimckdRn1amvIgljavPwv2yHX+V1roneyi90e4ri9AT2sROeRprGnaib9Z8p+/mgWIUnTLL7pjbNHhtvZptsj3xjanWy1Bt/4MMewTWN4REE/KKxLp79CQvGNR+Ki7mF2UpgYUtxHYpFNIGNF9VomwnfWAuYdGDAYAGY3S1W12RPo37CC7RP/lPM96L6ypW41FoQKlnhzm+StJV+mlI5C1jQBU2WKoVhaKXJpraX2mUJXyN8ilYDo7PrJe0SRLH6J2WwPM5Z/RdscBDEGAR4RhZnn++1IE7e1gZPJB4NZH/3wLBwDhz8S4kB/GB32/rz3ZaftCf2+XjAZXzF3SroUCZ/MWZPGrwchEkU/3z1Tm8FTbELxZk1rSYpdLwVnXYooo5vggqjgAZvmlTerJuufl5lOkXT44PynZAvE+I+MrD04DpKuH0w= - -aliases: - - &mac-build - os: osx - osx_image: xcode8.3 - -notifications: - email: - - vm-dev@lists.squeakfoundation.org - -jobs: - fast_finish: true - include: - - stage: "Main Squeak and Pharo builds" - env: ARCH="linux32x86" FLAVOR="squeak.cog.spur" - - env: ARCH="macos32x86" FLAVOR="squeak.cog.spur" - <<: *mac-build - - env: ARCH="linux64x64" FLAVOR="squeak.cog.spur" - - env: ARCH="macos64x64" FLAVOR="squeak.cog.spur" - <<: *mac-build - - env: ARCH="linux32x86" FLAVOR="pharo.cog.spur" HEARTBEAT="threaded" - # - env: ARCH="macos32x86" FLAVOR="pharo.cog.spur" - # <<: *mac-build - - env: ARCH="linux64x64" FLAVOR="pharo.cog.spur" HEARTBEAT="threaded" - # - env: ARCH="macos64x64" FLAVOR="pharo.cog.spur" - # <<: *mac-build - - - stage: "Minheadless CMake builds" - env: ARCH="linux32x86" FLAVOR="squeak.cog.spur" CPU_ARCH="x86" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos32x86" FLAVOR="squeak.cog.spur" CPU_ARCH="x86" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - env: ARCH="linux64x64" FLAVOR="squeak.cog.spur" CPU_ARCH="x64" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos64x64" FLAVOR="squeak.cog.spur" CPU_ARCH="x64" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - env: ARCH="linux32x86" FLAVOR="pharo.cog.spur" CPU_ARCH="x86" HEARTBEAT="threaded" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos32x86" FLAVOR="pharo.cog.spur" CPU_ARCH="x86" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - env: ARCH="linux64x64" FLAVOR="pharo.cog.spur" CPU_ARCH="x64" HEARTBEAT="threaded" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos64x64" FLAVOR="pharo.cog.spur" CPU_ARCH="x64" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - # Minheadless CMake builds with SDL2 traditional display - - env: ARCH="linux32x86" FLAVOR="squeak.cog.spur+sdl2" CPU_ARCH="x86" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos32x86" FLAVOR="squeak.cog.spur+sdl2" CPU_ARCH="x86" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - env: ARCH="linux64x64" FLAVOR="squeak.cog.spur+sdl2" CPU_ARCH="x64" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos64x64" FLAVOR="squeak.cog.spur+sdl2" CPU_ARCH="x64" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - env: ARCH="linux32x86" FLAVOR="pharo.cog.spur+sdl2" CPU_ARCH="x86" HEARTBEAT="threaded" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos32x86" FLAVOR="pharo.cog.spur+sdl2" CPU_ARCH="x86" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - env: ARCH="linux64x64" FLAVOR="pharo.cog.spur+sdl2" CPU_ARCH="x64" HEARTBEAT="threaded" BUILD_WITH_CMAKE="yes" - - env: ARCH="macos64x64" FLAVOR="pharo.cog.spur+sdl2" CPU_ARCH="x64" BUILD_WITH_CMAKE="yes" - <<: *mac-build - - - stage: "Other Linux builds" - # env: ARCH="linux64x64" FLAVOR="newspeak.cog.spur" - - env: ARCH="linux64x64" FLAVOR="pharo.cog.spur" HEARTBEAT="itimer" - # - env: ARCH="linux64x64" FLAVOR="pharo.sista.spur" HEARTBEAT="threaded" - # - env: ARCH="linux32x86" FLAVOR="newspeak.cog.spur" - - env: ARCH="linux32x86" FLAVOR="squeak.cog.v3" - - env: ARCH="linux32x86" FLAVOR="squeak.sista.spur" - - env: ARCH="linux32x86" FLAVOR="pharo.cog.spur" HEARTBEAT="itimer" - - env: ARCH="linux32x86" FLAVOR="pharo.sista.spur" HEARTBEAT="threaded" - compiler: clang - - env: ARCH="linux32x86" FLAVOR="pharo.sista.spur" HEARTBEAT="itimer" - compiler: clang - - - stage: "Other Mac builds" - # env: ARCH="macos64x64" FLAVOR="newspeak.cog.spur" - # <<: *mac-build - # - env: ARCH="macos64x64" FLAVOR="pharo.sista.spur" - # <<: *mac-build - env: ARCH="macos64x64" FLAVOR="pharo.cog.spur.lowcode" - <<: *mac-build - # - env: ARCH="macos32x86" FLAVOR="newspeak.cog.spur" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="pharo.sista.spur" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="pharo.cog.spur.lowcode" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="squeak.cog.v3" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="squeak.sista.spur" - <<: *mac-build - - - stage: "Stack builds" - env: ARCH="linux64x64" FLAVOR="squeak.stack.spur" - # - env: ARCH="linux64x64" FLAVOR="newspeak.stack.spur" - # - env: ARCH="linux32x86" FLAVOR="newspeak.stack.spur" - - env: ARCH="linux32x86" FLAVOR="squeak.stack.spur" - - env: ARCH="linux32x86" FLAVOR="squeak.stack.v3" - - env: ARCH="macos64x64" FLAVOR="pharo.stack.spur" - <<: *mac-build - - env: ARCH="macos64x64" FLAVOR="pharo.stack.spur.lowcode" - <<: *mac-build - - env: ARCH="macos64x64" FLAVOR="squeak.stack.spur" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="newspeak.stack.spur" - <<: *mac-build - # - env: ARCH="macos64x64" FLAVOR="newspeak.stack.spur" - # <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="pharo.stack.spur" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="pharo.stack.spur.lowcode" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="squeak.stack.spur" - <<: *mac-build - - env: ARCH="macos32x86" FLAVOR="squeak.stack.v3" - <<: *mac-build - - - stage: "linux32ARMv6 builds" - # env: ARCH="linux32ARMv6" FLAVOR="newspeak.cog.spur" CHROOT="schroot -p -c rpi - # -- bash -c " - # dist: trusty - # group: edge - # - env: ARCH="linux32ARMv6" FLAVOR="newspeak.stack.spur" CHROOT="schroot -p -c rpi - # -- bash -c " - # dist: trusty - # group: edge - env: ARCH="linux32ARMv6" FLAVOR="squeak.cog.spur" CHROOT="schroot -p -c rpi -- - bash -c " - dist: trusty - group: edge - - env: ARCH="linux32ARMv6" FLAVOR="pharo.cog.spur" CHROOT="schroot -p -c rpi -- - bash -c " - dist: trusty - group: edge - - env: ARCH="linux32ARMv6" FLAVOR="squeak.stack.spur" CHROOT="schroot -p -c rpi - -- bash -c " - dist: trusty - group: edge - - env: ARCH="linux32ARMv6" FLAVOR="squeak.stack.v3" CHROOT="schroot -p -c rpi -- - bash -c " - dist: trusty - group: edge - allow_failures: - - env: FLAVOR="squeak.sista.spur" - - env: FLAVOR="pharo.sista.spur" - - env: FLAVOR="squeak.cog.spur.lowcode" - - env: FLAVOR="pharo.cog.spur.lowcode" - - env: ARCH="linux64x64" FLAVOR="newspeak.cog.spur" - - env: ARCH="linux32x86" FLAVOR="newspeak.cog.spur" - - env: ARCH="macos64x64" FLAVOR="newspeak.cog.spur" - - env: ARCH="macos32x86" FLAVOR="newspeak.cog.spur" - - env: ARCH="linux64x64" FLAVOR="newspeak.stack.spur" - - env: ARCH="linux32x86" FLAVOR="newspeak.stack.spur" - - env: ARCH="macos64x64" FLAVOR="newspeak.stack.spur" - - env: ARCH="macos32x86" FLAVOR="newspeak.stack.spur" - - env: ARCH="linux32ARMv6" FLAVOR="newspeak.cog.spur" - - env: ARCH="linux32ARMv6" FLAVOR="newspeak.stack.spur" - - env: ARCH="linux64x64" FLAVOR="pharo.cog.spur" HEARTBEAT="threaded" - - env: ARCH="linux32x86" FLAVOR="pharo.cog.spur" HEARTBEAT="threaded" - - env: ARCH="linux64x64" FLAVOR="pharo.cog.spur" HEARTBEAT="itimer" - - env: ARCH="linux32x86" FLAVOR="pharo.cog.spur" HEARTBEAT="itimer" - - env: ARCH="macos64x64" FLAVOR="pharo.cog.spur" - - env: ARCH="macos32x86" FLAVOR="pharo.cog.spur" - - env: ARCH="macos64x64" FLAVOR="pharo.cog.spur.lowcode" - - env: ARCH="macos32x86" FLAVOR="pharo.cog.spur.lowcode" - - env: ARCH="linux64x64" FLAVOR="pharo.sista.spur" HEARTBEAT="threaded" - - env: ARCH="linux32x86" FLAVOR="pharo.sista.spur" HEARTBEAT="threaded" - - env: ARCH="linux64x64" FLAVOR="pharo.sista.spur" HEARTBEAT="itimer" - - env: ARCH="linux32x86" FLAVOR="pharo.sista.spur" HEARTBEAT="itimer" - - env: ARCH="macos64x64" FLAVOR="pharo.sista.spur" - - env: ARCH="macos32x86" FLAVOR="pharo.sista.spur" - - env: ARCH="linux64x64" FLAVOR="pharo.stack.spur" - - env: ARCH="linux32x86" FLAVOR="pharo.stack.spur" - - env: ARCH="macos64x64" FLAVOR="pharo.stack.spur" - - env: ARCH="macos32x86" FLAVOR="pharo.stack.spur" - - env: ARCH="linux64x64" FLAVOR="pharo.stack.spur.lowcode" - - env: ARCH="linux32x86" FLAVOR="pharo.stack.spur.lowcode" - - env: ARCH="macos64x64" FLAVOR="pharo.stack.spur.lowcode" - - env: ARCH="macos32x86" FLAVOR="pharo.stack.spur.lowcode" - - env: ARCH="linux32ARMv6" FLAVOR="pharo.cog.spur" - - env: ARCH="linux32ARMv6" FLAVOR="pharo.stack.spur" - -install: ./scripts/ci/travis_install.sh - -before_script: $CHROOT ./scripts/ci/travis_build.sh - -script: ./scripts/ci/travis_test.sh - -after_success: (cd deploy && ./filter-exec.sh pack-vm.sh) - -deploy: - - provider: script # Deploy bleeding edge to Bintray - script: (cd deploy && ./filter-exec.sh ./bintray.sh) - skip_cleanup: true - on: - repo: OpenSmalltalk/opensmalltalk-vm - branch: Cog - - provider: script # Deploy to files.pharo.org - script: (cd deploy/pharo && ./filter-exec.sh ./deploy.sh) - skip_cleanup: true - on: - repo: OpenSmalltalk/opensmalltalk-vm - branch: Cog - condition: $FLAVOR == pharo* - - 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 - -after_deploy: (cd deploy && ./filter-exec.sh bintray-cleanup.sh) diff --git a/build.linux32ARMv6/newspeak.cog.spur/build.assert/mvm b/build.linux32ARMv6/newspeak.cog.spur/build.assert/mvm index a326033d29..d45b87fe5e 100755 --- a/build.linux32ARMv6/newspeak.cog.spur/build.assert/mvm +++ b/build.linux32ARMv6/newspeak.cog.spur/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert VM with VM profiler and threaded heartbeat INSTALLDIR=assert/nscogspurlinuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0" +OPT="-g3 -O1 -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/newspeak.cog.spur/build.debug/mvm b/build.linux32ARMv6/newspeak.cog.spur/build.debug/mvm index 6230102f16..105ca1d50a 100755 --- a/build.linux32ARMv6/newspeak.cog.spur/build.debug/mvm +++ b/build.linux32ARMv6/newspeak.cog.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/nscogspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/newspeak.stack.spur/build.assert/mvm b/build.linux32ARMv6/newspeak.stack.spur/build.assert/mvm index 0c65983d3d..610e0a3bea 100755 --- a/build.linux32ARMv6/newspeak.stack.spur/build.assert/mvm +++ b/build.linux32ARMv6/newspeak.stack.spur/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/nsstkspurlinuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0" +OPT="-g3 -O1 -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/newspeak.stack.spur/build.debug/mvm b/build.linux32ARMv6/newspeak.stack.spur/build.debug/mvm index 25efa5b365..6ef2ddf2a3 100755 --- a/build.linux32ARMv6/newspeak.stack.spur/build.debug/mvm +++ b/build.linux32ARMv6/newspeak.stack.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/nsstkspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/newspeak.stack.spur/build/mvm b/build.linux32ARMv6/newspeak.stack.spur/build/mvm index f2166fb1c0..a2bbe5322e 100755 --- a/build.linux32ARMv6/newspeak.stack.spur/build/mvm +++ b/build.linux32ARMv6/newspeak.stack.spur/build/mvm @@ -2,7 +2,7 @@ set -e # Stack Spur VM and threaded heartbeat INSTALLDIR=nsstkspurlinuxhtRPi -OPT="-m32 -g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" +OPT="-g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm b/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm index c5a177b465..045da2d100 100755 --- a/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm +++ b/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert PharoVM with VM profiler and threaded heartbeat INSTALLDIR=assert/phcogspurlinuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0 -DPharoVM" +OPT="-g3 -O1 -DDEBUGVM=0 -DPharoVM" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm b/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm index 0f959eb87e..b82030db2b 100755 --- a/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm +++ b/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug PharoVM with VM profiler and threaded heartbeat INSTALLDIR=debug/phcogspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1 -DPharoVM" +OPT="-g3 -O0 -DDEBUGVM=1 -DPharoVM" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.spur/build.assert/mvm b/build.linux32ARMv6/squeak.cog.spur/build.assert/mvm index 0254afa9f4..0e28f57503 100755 --- a/build.linux32ARMv6/squeak.cog.spur/build.assert/mvm +++ b/build.linux32ARMv6/squeak.cog.spur/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogspurlinuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0" +OPT="-g3 -O1 -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm b/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm index 764e80f084..c35c5e9f6f 100755 --- a/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm +++ b/build.linux32ARMv6/squeak.cog.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.spur/build/mvm b/build.linux32ARMv6/squeak.cog.spur/build/mvm index 7a5cbe4d5d..f16d72208d 100755 --- a/build.linux32ARMv6/squeak.cog.spur/build/mvm +++ b/build.linux32ARMv6/squeak.cog.spur/build/mvm @@ -2,7 +2,7 @@ set -e # Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogspurlinuxhtRPi -OPT=" -g -O2 -DNDEBUG -DDEBUGVM=0" +OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.v3/build.assert/mvm b/build.linux32ARMv6/squeak.cog.v3/build.assert/mvm index 70adcfadba..7f8c9ed586 100755 --- a/build.linux32ARMv6/squeak.cog.v3/build.assert/mvm +++ b/build.linux32ARMv6/squeak.cog.v3/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqcogv3linuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0" +OPT="-g3 -O1 -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.v3/build.debug/mvm b/build.linux32ARMv6/squeak.cog.v3/build.debug/mvm index 10a0b0baf3..a4129c7017 100755 --- a/build.linux32ARMv6/squeak.cog.v3/build.debug/mvm +++ b/build.linux32ARMv6/squeak.cog.v3/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug V3 VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqcogv3linuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.cog.v3/build/mvm b/build.linux32ARMv6/squeak.cog.v3/build/mvm index b107527dd6..2800e6e131 100755 --- a/build.linux32ARMv6/squeak.cog.v3/build/mvm +++ b/build.linux32ARMv6/squeak.cog.v3/build/mvm @@ -2,7 +2,7 @@ set -e # V3 VM with VM profiler and threaded heartbeat INSTALLDIR=sqcogv3linuxhtRPi -OPT="-m32 -g -O2 -DNDEBUG -DDEBUGVM=0" +OPT="-g -O2 -DNDEBUG -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.spur/build.assert/mvm b/build.linux32ARMv6/squeak.stack.spur/build.assert/mvm index 3aac75b7ce..f4d5e2ecc4 100755 --- a/build.linux32ARMv6/squeak.stack.spur/build.assert/mvm +++ b/build.linux32ARMv6/squeak.stack.spur/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstkspurlinuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0" +OPT="-g3 -O1 -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm b/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm index 57dd6a5e84..881a5be225 100755 --- a/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm +++ b/build.linux32ARMv6/squeak.stack.spur/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstkspurlinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.spur/build/mvm b/build.linux32ARMv6/squeak.stack.spur/build/mvm index 6f9a6d1816..56eff33d15 100755 --- a/build.linux32ARMv6/squeak.stack.spur/build/mvm +++ b/build.linux32ARMv6/squeak.stack.spur/build/mvm @@ -2,7 +2,7 @@ set -e # Stack Spur VM and threaded heartbeat INSTALLDIR=sqstkspurlinuxhtRPi -OPT="-m32 -g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" +OPT="-g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.v3/build.assert/mvm b/build.linux32ARMv6/squeak.stack.v3/build.assert/mvm index 20ddd48019..838c6fed9a 100755 --- a/build.linux32ARMv6/squeak.stack.v3/build.assert/mvm +++ b/build.linux32ARMv6/squeak.stack.v3/build.assert/mvm @@ -2,7 +2,7 @@ set -e # assert Stack VM with VM profiler and threaded heartbeat INSTALLDIR=assert/sqstklinuxhtRPi -OPT="-m32 -g3 -O1 -DDEBUGVM=0" +OPT="-g3 -O1 -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.v3/build.debug/mvm b/build.linux32ARMv6/squeak.stack.v3/build.debug/mvm index ac07a14ffa..467fdffa63 100755 --- a/build.linux32ARMv6/squeak.stack.v3/build.debug/mvm +++ b/build.linux32ARMv6/squeak.stack.v3/build.debug/mvm @@ -2,7 +2,7 @@ set -e # debug Stack VM with VM profiler and threaded heartbeat INSTALLDIR=debug/sqstklinuxhtRPi -OPT="-m32 -g3 -O0 -DDEBUGVM=1" +OPT="-g3 -O0 -DDEBUGVM=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv6/squeak.stack.v3/build/mvm b/build.linux32ARMv6/squeak.stack.v3/build/mvm index 1c85b53ea8..7a08e672be 100755 --- a/build.linux32ARMv6/squeak.stack.v3/build/mvm +++ b/build.linux32ARMv6/squeak.stack.v3/build/mvm @@ -2,7 +2,7 @@ set -e # Stack VM with VM profiler and threaded heartbeat INSTALLDIR=sqstklinuxhtRPi -OPT="-m32 -g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" +OPT="-g -O3 -DNDEBUG -DDEBUGVM=0 -DNO_VM_PROFILE=1" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/build.linux32ARMv7/newspeak.cog.spur/plugins.ext b/build.linux32ARMv7/newspeak.cog.spur/plugins.ext new file mode 100644 index 0000000000..f97d8b6cdd --- /dev/null +++ b/build.linux32ARMv7/newspeak.cog.spur/plugins.ext @@ -0,0 +1,3 @@ +# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext +EXTERNAL_PLUGINS = \ +SqueakSSL diff --git a/build.linux32ARMv7/newspeak.cog.spur/plugins.int b/build.linux32ARMv7/newspeak.cog.spur/plugins.int new file mode 100644 index 0000000000..cfd6f4c2c0 --- /dev/null +++ b/build.linux32ARMv7/newspeak.cog.spur/plugins.int @@ -0,0 +1,29 @@ +# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int +INTERNAL_PLUGINS = \ +AioPlugin \ +AsynchFilePlugin \ +BMPReadWriterPlugin \ +B2DPlugin \ +BitBltPlugin \ +DSAPrims \ +DropPlugin \ +FileCopyPlugin \ +FilePlugin \ +Float64ArrayPlugin \ +FloatArrayPlugin \ +FloatMathPlugin \ +HostWindowPlugin \ +ZipPlugin \ +JPEGReadWriter2Plugin \ +JPEGReaderPlugin \ +LargeIntegers \ +Matrix2x3Plugin \ +MiscPrimitivePlugin \ +IA32ABI \ +RePlugin \ +SecurityPlugin \ +SocketPlugin \ +SurfacePlugin \ +UUIDPlugin \ +UnixOSProcessPlugin \ +VMProfileLinuxSupportPlugin diff --git a/build.linux32ARMv7/newspeak.stack.spur/plugins.ext b/build.linux32ARMv7/newspeak.stack.spur/plugins.ext new file mode 100644 index 0000000000..f97d8b6cdd --- /dev/null +++ b/build.linux32ARMv7/newspeak.stack.spur/plugins.ext @@ -0,0 +1,3 @@ +# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext +EXTERNAL_PLUGINS = \ +SqueakSSL diff --git a/build.linux32ARMv7/newspeak.stack.spur/plugins.int b/build.linux32ARMv7/newspeak.stack.spur/plugins.int new file mode 100644 index 0000000000..cfd6f4c2c0 --- /dev/null +++ b/build.linux32ARMv7/newspeak.stack.spur/plugins.int @@ -0,0 +1,29 @@ +# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int +INTERNAL_PLUGINS = \ +AioPlugin \ +AsynchFilePlugin \ +BMPReadWriterPlugin \ +B2DPlugin \ +BitBltPlugin \ +DSAPrims \ +DropPlugin \ +FileCopyPlugin \ +FilePlugin \ +Float64ArrayPlugin \ +FloatArrayPlugin \ +FloatMathPlugin \ +HostWindowPlugin \ +ZipPlugin \ +JPEGReadWriter2Plugin \ +JPEGReaderPlugin \ +LargeIntegers \ +Matrix2x3Plugin \ +MiscPrimitivePlugin \ +IA32ABI \ +RePlugin \ +SecurityPlugin \ +SocketPlugin \ +SurfacePlugin \ +UUIDPlugin \ +UnixOSProcessPlugin \ +VMProfileLinuxSupportPlugin diff --git a/build.linux32x86/pharo.cog.spur.lowcode/build/mvm b/build.linux32x86/pharo.cog.spur.lowcode/build/mvm index d35a3c877a..fb59b3c605 100755 --- a/build.linux32x86/pharo.cog.spur.lowcode/build/mvm +++ b/build.linux32x86/pharo.cog.spur.lowcode/build/mvm @@ -49,6 +49,8 @@ rm -rf ../../../products/$INSTALLDIR # prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG +productDir=`find ../../../products/$INSTALLDIR -name "5.0*"` +productDir=`(cd $productDir;pwd)` for lib in ${THIRDPARTYLIBS}; do ../../third-party/mvm ${lib} install $productDir done diff --git a/build.linux32x86/pharo.stack.spur.lowcode/build/mvm b/build.linux32x86/pharo.stack.spur.lowcode/build/mvm index 07d994e668..175c862dac 100755 --- a/build.linux32x86/pharo.stack.spur.lowcode/build/mvm +++ b/build.linux32x86/pharo.stack.spur.lowcode/build/mvm @@ -49,6 +49,8 @@ rm -rf ../../../products/$INSTALLDIR # prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` # but older linux readlinks lack the -f flag make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG +productDir=`find ../../../products/$INSTALLDIR -name "5.0*"` +productDir=`(cd $productDir;pwd)` for lib in ${THIRDPARTYLIBS}; do ../../third-party/mvm ${lib} install $productDir done diff --git a/deploy/bintray-cleanup.sh b/deploy/bintray-cleanup.sh deleted file mode 100755 index 6bb724b361..0000000000 --- a/deploy/bintray-cleanup.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -e - -# Remove old versions from bintray, leaving only the last version per month -if [[ "${TRAVIS_OS_NAME}" == "linux" ]] && [[ "${ARCH}" == "linux64x64" ]] && [[ "${FLAVOR}" == "squeak.cog.spur" ]]; then - ruby -rdate -rnet/http -rjson -e "lastver=DateTime.now; - user='osvm'; - pass='${BINTRAYAPIKEY}'; - url='https://api.bintray.com/packages/opensmalltalk/vm/cog'; - uri=URI(url); - json=nil; - http=Net::HTTP.new(uri.host,uri.port); - http.use_ssl=true; - http.start { - req=Net::HTTP::Get.new(uri.request_uri); - req.basic_auth(user,pass); - resp=http.request(req); - json=JSON.parse(resp.body) - }; - (json['versions'][10..-1] || []).each { |v| - ver=DateTime.parse(v); - if ver.month != lastver.month then - lastver=ver; next - else - lastver=ver - end; - uri=URI(url+'/versions/'+v); - http=Net::HTTP.new(uri.host,uri.port); - http.use_ssl=true; - http.start { - req=Net::HTTP::Delete.new(uri.request_uri); - req.basic_auth(user,pass); - resp=http.request(req); - puts 'Deleted ' + v + ' ' + resp.body - } - }" -fi diff --git a/deploy/bintray.json b/deploy/bintray.json deleted file mode 100644 index 52ccf92350..0000000000 --- a/deploy/bintray.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "package": { - "name": "cog", - "repo": "vm", - "subject": "opensmalltalk" - }, - "version": { - "name": "$Rev$", - "desc": "Automatic build" - }, - "files": [ - {"includePattern": "../products/((newspeak|pharo|squeak).*\\.(?:gz|zip|dmg))", "uploadPattern": "$1"} - ], - "publish": true -} diff --git a/deploy/bintray.sh b/deploy/bintray.sh deleted file mode 100755 index 976cc86fcd..0000000000 --- a/deploy/bintray.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -e - -if [[ -n "${TRAVIS_TAG:-${APPVEYOR_REPO_TAG_NAME}}" ]]; then - echo "Skipping a deployment to Bintray because build was pushed by a tag." - exit -fi - -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 - -if [[ "${APPVEYOR}" ]]; then - appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem - export SSL_CERT_FILE=cacert.pem - export PATH="C:\\Ruby23\\bin:$PATH" - export CMDSHELL="cmd /C " -fi - -$CMDSHELL gem install dpl -$CMDSHELL dpl --provider=bintray --user=osvm --key=$BINTRAYAPIKEY --file=bintray.json --skip_cleanup=true diff --git a/deploy/filter-exec.sh b/deploy/filter-exec.sh deleted file mode 100755 index bec92a41d5..0000000000 --- a/deploy/filter-exec.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# Deployment filter (compatible with Travis and AppVeyor) -# -# execute script if: -# - $BINTRAYAPIKEY is set -# - REPOSITORY=OpenSmalltalk/opensmalltalk-vm -# - Build is not triggered by a pull request -# - BRANCH=Cog or TAG_NAME is not empty - -readonly REPO_NAME="${TRAVIS_REPO_SLUG:-${APPVEYOR_REPO_NAME}}" -readonly PR_SHA="${TRAVIS_PULL_REQUEST_SHA:-${APPVEYOR_PULL_REQUEST_HEAD_COMMIT}}" -readonly BRANCH_NAME="${TRAVIS_BRANCH:-${APPVEYOR_REPO_BRANCH}}" -readonly TAG_NAME="${TRAVIS_TAG:-${APPVEYOR_REPO_TAG_NAME}}" - -if [[ -z "${BINTRAYAPIKEY}" ]]; then - echo 'Skipping a deployment because $BINTRAYAPIKEY was not provided.' - exit -fi - -if [[ "${REPO_NAME}" != "OpenSmalltalk/opensmalltalk-vm" ]]; then - echo "Trying to deploy in repository: ${REPO_NAME}. Skipping." - exit -fi - -if [[ -n "${PR_SHA}" ]]; then - echo "Skipping a deployment with the script provider because PRs are not permitted." - exit -fi - -if [[ "${BRANCH_NAME}" != "Cog" ]] && [[ -z "${TAG_NAME}" ]]; then - echo "Skipping a deployment with the script provider because this branch is not permitted." - exit -fi - -`dirname $0`/$1 diff --git a/deploy/sign-vm.sh b/deploy/sign-vm.sh index e219881d35..4d97705b5b 100755 --- a/deploy/sign-vm.sh +++ b/deploy/sign-vm.sh @@ -43,6 +43,11 @@ sign_macOS() { exit 35 fi + if [[ -z "${sign_password}" ]]; then + echo "[Error] No password given to decrypt certificates for ${FLAVOR}. Cannot sign." + exit 234 + fi + echo "::group::Decrypt certificate files..." openssl aes-256-cbc \ -k "${sign_password}" \ @@ -87,11 +92,9 @@ if [[ ! -d "${PRODUCTS_PATH}" ]]; then exit 10 fi -if [[ ! $(type -t pack_$RUNNER_OS) ]]; then +if [[ ! $(type -t sign_$RUNNER_OS) ]]; then echo "Unsupported runner OS ${RUNNER_OS}." exit 99 fi -pushd "${PRODUCTS_PATH}" sign_$RUNNER_OS -popd diff --git a/scripts/ci/actions_build.sh b/scripts/ci/actions_build.sh index 6c9a3c2f36..a69f624b4b 100755 --- a/scripts/ci/actions_build.sh +++ b/scripts/ci/actions_build.sh @@ -1,17 +1,26 @@ #!/bin/bash -# Uses: +set -e + +# This script locates and executes the platform and flavor-specific +# build scripts, which are typically Makefile-based, to compile and +# link the configured VM flavor. It then copies the build artifacts to +# to the ./products directory for subsequent steps such as signing and +# packing and deploying. +# +# This script uses/requires to following variables: # - ARCH (e.g., "macos64x64") +# - ARCH_ARM (only set for ARM builds in docker container) # - FLAVOR (e.g., "squeak.cog.spur") # - RUNNER_OS (i.e., "Linux", "macOS", "Windows") # - HEARTBEAT (i.e., "threaded" or "itimer"; !! Linux only !!) -# Provides: +# +# This script provides variables for subsequent steps: # - ASSET_REVISION (e.g., "202107261048") # - ASSET_NAME (e.g., "squeak.cog.spur_macos64x64") -# - BUILD_PATH (e.g., "build.macos64x64/squeak.cog.spur") # - PRODUCTS_PATH (e.g., "products") # - APP_NAME (e.g., "vm" or "sqcogspur64linuxht" or "Squeak.app") -set -e + if [[ "${RUNNER_OS}" == "Windows" ]]; then source ./scripts/ci/actions_prepare_msys.sh @@ -44,6 +53,17 @@ skip_BochsPlugins() { sed -i 's/Bochs.* //g' plugins.int } +export_variable() { + local var_name=$1 + local var_value=$2 + if [[ ! -z "${ARCH_ARM}" ]]; then + # We are in a docker container. See https://github.com/uraimo/run-on-arch-action + echo "::set-output name=${var_name}::${var_value}" + else + echo "${var_name}=${var_value}" >> $GITHUB_ENV + fi +} + # export COGVREV="$(git describe --tags --always)" # export COGVDATE="$(git show -s --format=%cd HEAD)" # export COGVURL="$(git config --get remote.origin.url)" @@ -153,12 +173,10 @@ elif [[ "${MODE}" == "assert" ]]; then ASSET_NAME="${ASSET_NAME}_assert" fi -echo "ASSET_REVISION=${ASSET_REVISION}" >> $GITHUB_ENV -echo "ASSET_NAME=${ASSET_NAME}" >> $GITHUB_ENV +export_variable "ASSET_REVISION" "${ASSET_REVISION}" +export_variable "ASSET_NAME" "${ASSET_NAME}" -[[ ! -d "${BUILD_PATH}" ]] && exit 12 -echo "BUILD_PATH=${BUILD_PATH}" >> $GITHUB_ENV [[ ! -d "${PRODUCTS_PATH}" ]] && exit 13 -echo "PRODUCTS_PATH=${PRODUCTS_PATH}" >> $GITHUB_ENV +export_variable "PRODUCTS_PATH" "${PRODUCTS_PATH}" [[ ! -d "${PRODUCTS_PATH}/${APP_NAME}" ]] && exit 14 -echo "APP_NAME=${APP_NAME}" >> $GITHUB_ENV +export_variable "APP_NAME" "${APP_NAME}" diff --git a/scripts/ci/actions_prepare_linux_arm.sh b/scripts/ci/actions_prepare_linux_arm.sh index 1eb5b4981c..894b9a8303 100755 --- a/scripts/ci/actions_prepare_linux_arm.sh +++ b/scripts/ci/actions_prepare_linux_arm.sh @@ -1,81 +1,17 @@ +#!/bin/bash set -e -[[ "${ARCH}" != "linux32ARMv6" ]] && exit 0 +# This script installs all packages required to build the various VM +# flavors in an ARM-compatible environment such as via QEMU or on a +# Raspberry Pi. For simplicity, the packages should cover all possible +# plugins even if those are not compiled in a particular build +# configuration. +# +# Note that "libtool automake autoconf libltdl-dev" are required to +# let the configure script pass. -MIRROR=http://archive.raspbian.org/raspbian -VERSION=buster -# TOOLS_DIR=$PWD/tools -ARMCHROOT=$PWD/armchroot +apt-get update -y +apt-get install -yq --no-install-suggests --no-install-recommends build-essential git devscripts uuid-dev libcairo2-dev libpango1.0-dev libgl1-mesa-dev libgl1-mesa-glx libssl-dev libevdev-dev m4 libpulse-dev libasound2-dev libfreetype6-dev libx11-dev libxrender-dev libtool automake autoconf libltdl-dev -sudo dpkg --add-architecture i386 -sudo apt-add-repository multiverse -sudo apt-add-repository universe -sudo apt-get update -myq || true - -sudo apt-get update -y -sudo apt-get install -yq --no-install-suggests --no-install-recommends --allow-unauthenticated \ - gcc-arm-linux-gnueabi \ - gcc-arm-linux-gnueabihf \ - qemu-system \ - qemu-system-arm \ - qemu-user \ - qemu-user-static \ - sbuild \ - schroot \ - debootstrap \ - zlib1g:i386 \ - libstdc++6:i386 \ - libffi-dev:i386 \ - libssl-dev:i386 \ - libbz2-1.0:i386 \ - libc6-dev-i386 \ - libc6:i386 \ - libexpat1:i386 \ - libtinfo5:i386 \ - binfmt-support \ - build-essential \ - python-dev \ - libffi-dev \ - zlib1g-dev \ - libtool \ - automake \ - autoconf - -sudo chown $USER /etc/schroot/schroot.conf -echo " -[rpi] -directory=$ARMCHROOT -users=$USER -root-users=$USER -groups=$USER -aliases=default -type=directory -" >> /etc/schroot/schroot.conf -cat /etc/schroot/schroot.conf -sudo chown root /etc/schroot/schroot.conf - -# git clone https://github.com/raspberrypi/tools.git $TOOLS_DIR - -# chroot -if [ ! -e "$ARMCHROOT/etc/debian_chroot" ]; then - mkdir -p $ARMCHROOT - sudo qemu-debootstrap --no-check-gpg --include=fakeroot,build-essential --arch=armhf ${VERSION} ${ARMCHROOT} ${MIRROR} - sudo su -c "echo \"deb ${MIRROR} ${VERSION} main contrib rpi\" > ${ARMCHROOT}/etc/apt/sources.list" - schroot -c rpi -u root -- apt-get update - schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y \ - build-essential libcairo2-dev libpango1.0-dev libssl-dev uuid-dev uuid-runtime libasound2-dev \ - debhelper devscripts libssl-dev libfreetype6-dev libx11-dev libxext-dev libxrender-dev \ - libx11-dev libsm-dev libice-dev libgl1-mesa-dev libgl1-mesa-glx git \ - libtool automake autoconf - #needed for third-party libraries - schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y cmake curl -fi -schroot -c rpi -- uname -m - -sudo mount -o remount,size=100M /tmp || echo "No tmp size increase required" - -# Use Scratchbox2 for faster compilation -# pushd $ARMCHROOT -# sb2-init -c `which qemu-arm` rpi $TOOLS_DIR/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -# sb2-config -d rpi -# popd +# Other packages found in older build scripts, ignored for now: +# uuid-runtime libsm-dev libice-dev cmake diff --git a/scripts/ci/actions_prepare_linux_x86.sh b/scripts/ci/actions_prepare_linux_x86.sh index 2f359df885..a7b16f5a1e 100755 --- a/scripts/ci/actions_prepare_linux_x86.sh +++ b/scripts/ci/actions_prepare_linux_x86.sh @@ -1,5 +1,11 @@ +#!/bin/bash set -e +# This script installs all packages required to build the various VM +# flavors in an x86-compatible environment. It supports both 32-bit +# and #64-bit architectures, which means that the host Linux platform +# has to support the older i386 packages to make 32-bit compile. + if [[ "${ARCH}" = "linux64x64" ]]; then sudo apt-get update -y sudo apt-get install -yq --no-install-suggests --no-install-recommends --allow-unauthenticated \ diff --git a/scripts/ci/travis_build.sh b/scripts/ci/travis_build.sh deleted file mode 100755 index 946ba595af..0000000000 --- a/scripts/ci/travis_build.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/bash -set -e - -source ./scripts/ci/travis_helpers.sh - -if [[ "${APPVEYOR}" ]]; then - TRAVIS_BUILD_DIR="$(pwd)" - TRAVIS_TAG="${APPVEYOR_REPO_TAG}" - PLATFORM="windows" - - # Appveyor's GCC is pretty new, patch the Makefiles and replace the tools to - # make it work - - echo - echo "Using gcc $(i686-w64-mingw32-gcc --version)" - echo "Using 64-bit gcc $(x86_64-w64-mingw32-gcc --version)" - echo - test -d /usr/i686-w64-mingw32/sys-root/mingw/lib || echo "No lib dir" - test -d /usr/i686-w64-mingw32/sys-root/mingw/include || echo "No inc dir" -else - PLATFORM="${TRAVIS_OS_NAME}" -fi - -[[ -z "${ARCH}" ]] && exit 2 -[[ -z "${FLAVOR}" ]] && exit 3 - -if [[ "${ARCH}" == "linux32ARM"* ]]; then - # 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 $PATH -if [[ "${BUILD_WITH_CMAKE}" == "yes" ]]; then - [[ -z "${CPU_ARCH}" ]] && exit 2 - PLATFORM="minheadless_with_cmake" - BUILD_DIRECTORY="$(pwd)/build.minheadless.cmake/${CPU_ARCH}/${FLAVOR}"; -else - BUILD_DIRECTORY="$(pwd)/build.${ARCH}/${FLAVOR}"; -fi -readonly BUILD_DIRECTORY -readonly PRODUCTS_DIR="$(pwd)/products" -mkdir "${PRODUCTS_DIR}" || true # ensure PRODUCTS_DIR exists - -export COGVREV="$(git describe --tags --always)" -export COGVDATE="$(git show -s --format=%cd HEAD)" -export COGVURL="$(git config --get remote.origin.url)" -export COGVOPTS="-DCOGVREV=\"${COGVREV}\" -DCOGVDATE=\"${COGVDATE// /_}\" -DCOGVURL=\"${COGVURL//\//\\\/}\"" - -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 - travis_fold end "${fold_name}" - # cat config.log - popd -} - -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. - # HEARTBEAT can be "threaded" or "itimer" - - if [ -z "$HEARTBEAT" ] || [ "$HEARTBEAT" = "threaded" ]; then - build_linux_in "${BUILD_DIRECTORY}/build" "build_vm" - fi - - # Also build VM with itimerheartbeat if available - 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 -} - -build_osx() { - [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 50 - - pushd "${BUILD_DIRECTORY}" - - travis_fold start build_vm "Building OpenSmalltalk VM..." - bash -e ./mvm -f - travis_fold end build_vm - - mv ./*.app "${PRODUCTS_DIR}/" # Move app to PRODUCTS_DIR - popd -} - -build_windows() { - [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 100 - - pushd "${BUILD_DIRECTORY}" - echo "Removing bochs plugins..." - sed -i 's/Bochs.* //g' plugins.ext - - 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 - # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" - mv "./build/vm" "${PRODUCTS_DIR}/" # Move result to PRODUCTS_DIR - popd -} - -build_minheadless_with_cmake() { - [[ ! -d "${BUILD_DIRECTORY}" ]] && exit 150 - - local vm_variant_name="${FLAVOR}_minheadless-cmake_${ARCH}" - - pushd "${BUILD_DIRECTORY}" - travis_fold start build_vm "Building OpenSmalltalk VM..." - bash -e ./mvm -f || exit 1 - mv ./release/install-dist/* "${PRODUCTS_DIR}/" - travis_fold end build_vm - popd - -} - -if [[ ! $(type -t build_$PLATFORM) ]]; then - echo "Unsupported platform '$(uname -s)'." 1>&2 - exit 99 -fi - -build_$PLATFORM diff --git a/scripts/ci/travis_helpers.sh b/scripts/ci/travis_helpers.sh deleted file mode 100755 index fc55f44dff..0000000000 --- a/scripts/ci/travis_helpers.sh +++ /dev/null @@ -1,12 +0,0 @@ -travis_fold() { - local action=$1 - local name=$2 - local title="${3:-}" - - if [[ "${TRAVIS:-}" = "true" ]]; then - echo -en "travis_fold:${action}:${name}\r\033[0K" - fi - if [[ -n "${title}" ]]; then - echo -e "\033[34;1m${title}\033[0m" - fi -} diff --git a/scripts/ci/travis_install.sh b/scripts/ci/travis_install.sh deleted file mode 100755 index 73150eb875..0000000000 --- a/scripts/ci/travis_install.sh +++ /dev/null @@ -1,144 +0,0 @@ -set -e - -if [[ "${ARCH}" = "linux64x64" ]]; then - sudo apt-get update -y - sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ - debhelper \ - devscripts \ - libasound2-dev \ - libc6-dev \ - libssl-dev \ - libfreetype6-dev \ - libx11-dev \ - libxext-dev \ - libxrender-dev \ - libpango1.0-dev \ - libpulse-dev \ - libaudio-dev \ - libsndio-dev \ - gcc-multilib \ - uuid-dev \ - libglu1-mesa-dev \ - automake \ - autoconf \ - libtool \ - curl \ - cmake -elif [[ "${ARCH}" = "linux32x86" ]]; then - sudo apt-get update -y - sudo apt-get remove -q -y gvfs-daemons - sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ - devscripts \ - libc6-dev:i386 \ - libasound2:i386 \ - libasound2-dev:i386 \ - libssl-dev:i386 \ - libssl0.9.8:i386 \ - libpng-dev:i386 \ - libfreetype6-dev:i386 \ - libx11-dev:i386 \ - libsm-dev:i386 \ - libice-dev:i386 \ - libgl1-mesa-glx:i386 \ - libgl1-mesa-dev:i386 \ - libxext-dev:i386 \ - libxrender-dev:i386 \ - libglapi-mesa:i386 \ - libcairo2-dev:i386 \ - libpango1.0-dev:i386 \ - libglib2.0-dev:i386 \ - libxft-dev:i386 \ - gir1.2-pango-1.0:i386 \ - gir1.2-freedesktop:i386 \ - gir1.2-glib-2.0:i386 \ - libgirepository-1.0-1:i386 \ - libpulse-dev:i386 \ - libaudio-dev:i386 \ - libsndio-dev:i386 \ - gcc-multilib \ - uuid-dev:i386 \ - libcurl4-openssl-dev:i386 \ - libssh2-1-dev:i386 -fi - -[[ "${ARCH}" != "linux32ARMv6" ]] && exit 0 - -MIRROR=http://archive.raspbian.org/raspbian -VERSION=jessie -# TOOLS_DIR=$PWD/tools -ARMCHROOT=$PWD/armchroot - -sudo dpkg --add-architecture i386 -sudo apt-add-repository multiverse -sudo apt-add-repository universe -sudo apt-get update -myq || true - -sudo apt-get update -y -sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \ - gcc-arm-linux-gnueabi \ - gcc-arm-linux-gnueabihf \ - qemu-system \ - qemu-system-arm \ - qemu-user \ - qemu-user-static \ - sbuild \ - schroot \ - scratchbox2 \ - debootstrap \ - zlib1g:i386 \ - libstdc++6:i386 \ - libffi-dev:i386 \ - libffi6:i386 \ - libssl1.0.0:i386 \ - libbz2-1.0:i386 \ - libc6-dev-i386 \ - libc6:i386 \ - libexpat1:i386 \ - libtinfo5:i386 \ - binfmt-support \ - build-essential \ - python-dev \ - libffi-dev \ - zlib1g-dev \ - libtool \ - automake \ - autoconf - -sudo chown $USER /etc/schroot/schroot.conf -echo " -[rpi] -directory=$ARMCHROOT -users=$USER -root-users=$USER -groups=$USER -aliases=default -type=directory -" >> /etc/schroot/schroot.conf -cat /etc/schroot/schroot.conf -sudo chown root /etc/schroot/schroot.conf - -# git clone https://github.com/raspberrypi/tools.git $TOOLS_DIR - -# chroot -if [ ! -e "$ARMCHROOT/etc/debian_chroot" ]; then - mkdir -p $ARMCHROOT - sudo qemu-debootstrap --no-check-gpg --include=fakeroot,build-essential --arch=armhf ${VERSION} ${ARMCHROOT} ${MIRROR} - sudo su -c "echo \"deb ${MIRROR} jessie main contrib rpi\" > ${ARMCHROOT}/etc/apt/sources.list" - schroot -c rpi -u root -- apt-get update - schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y \ - build-essential libcairo2-dev libpango1.0-dev libssl-dev uuid-dev uuid-runtime libasound2-dev \ - debhelper devscripts libssl-dev libfreetype6-dev libx11-dev libxext-dev libxrender-dev \ - libx11-dev libsm-dev libice-dev libgl1-mesa-dev libgl1-mesa-glx git \ - libtool automake autoconf - #needed for third-party libraries - schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y cmake curl -fi -schroot -c rpi -- uname -m - -sudo mount -o remount,size=100M /tmp || echo "No tmp size increase required" - -# Use Scratchbox2 for faster compilation -# pushd $ARMCHROOT -# sb2-init -c `which qemu-arm` rpi $TOOLS_DIR/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -# sb2-config -d rpi -# popd From 03910648ad8292767b59a3d5395021f119de5391 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Fri, 30 Jul 2021 10:36:58 +0200 Subject: [PATCH 10/12] In all main "Build for *" workflows, add workflow_dispatch to build artifacts for release candidates per tag. --- .github/workflows/linux-arm.yml | 26 +++++++++++++++++++++++++- .github/workflows/linux.yml | 26 +++++++++++++++++++++++++- .github/workflows/macos.yml | 26 +++++++++++++++++++++++++- .github/workflows/win.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-arm.yml b/.github/workflows/linux-arm.yml index 12326ab1b2..0a008eabf7 100644 --- a/.github/workflows/linux-arm.yml +++ b/.github/workflows/linux-arm.yml @@ -22,7 +22,12 @@ on: paths-ignore: - '**.md' - '**HowToBuild' - + workflow_dispatch: + inputs: + tag: + description: "Build new release candidate for tag" + required: true + default: YYYYMMDDHHMM jobs: build: @@ -51,7 +56,14 @@ jobs: HEARTBEAT: threaded # itimer not supported steps: - name: Checkout files + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v2 + + - name: Checkout files for new release candidate + if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v2 + with: + ref: refs/tags/${{ github.event.inputs.tag }} # TODO: Can we use the same thirdparty cache for armv6, armv7, and aarch64? Are pre-compiled binaries compatible or organized differently? - name: Restore build cache @@ -116,3 +128,15 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} body: ${{ github.event.head_commit.message }} + + - name: Deploy artifact as new release candidate + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'workflow_dispatch' + with: + prerelease: true # release candidate + allowUpdates: true + replacesArtifacts: true + artifacts: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.event.inputs.tag }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7106694326..3b76ec2f4b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -22,7 +22,12 @@ on: paths-ignore: - '**.md' - '**HowToBuild' - + workflow_dispatch: + inputs: + tag: + description: "Build new release candidate for tag" + required: true + default: YYYYMMDDHHMM jobs: build: @@ -71,7 +76,14 @@ jobs: MODE: ${{ matrix.mode }} steps: - name: Checkout files + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v2 + + - name: Checkout files for new release candidate + if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v2 + with: + ref: refs/tags/${{ github.event.inputs.tag }} - name: Restore build cache uses: actions/cache@v2 @@ -111,3 +123,15 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} body: ${{ github.event.head_commit.message }} + + - name: Deploy artifact as new release candidate + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'workflow_dispatch' + with: + prerelease: true # release candidate + allowUpdates: true + replacesArtifacts: true + artifacts: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.event.inputs.tag }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1421bbf014..da41310de7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,7 +21,12 @@ on: paths-ignore: - '**.md' - '**HowToBuild' - + workflow_dispatch: + inputs: + tag: + description: "Build new release candidate for tag" + required: true + default: YYYYMMDDHHMM jobs: build: @@ -51,7 +56,14 @@ jobs: MODE: ${{ matrix.mode }} steps: - name: Checkout files + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v2 + + - name: Checkout files for new release candidate + if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v2 + with: + ref: refs/tags/${{ github.event.inputs.tag }} - name: Restore build cache uses: actions/cache@v2 @@ -96,3 +108,15 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} body: ${{ github.event.head_commit.message }} + + - name: Deploy artifact as new release candidate + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'workflow_dispatch' + with: + prerelease: true # release candidate + allowUpdates: true + replacesArtifacts: true + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.event.inputs.tag }} + body: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 1dbbb6bcbd..f8eee3144b 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -22,6 +22,13 @@ on: paths-ignore: - '**.md' - '**HowToBuild' + workflow_dispatch: + inputs: + tag: + description: "Build new release candidate for tag" + required: true + default: YYYYMMDDHHMM + jobs: build: @@ -57,7 +64,14 @@ jobs: MODE: ${{ matrix.mode }} steps: - name: Checkout files + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v2 + + - name: Checkout files for new release candidate + if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v2 + with: + ref: refs/tags/${{ github.event.inputs.tag }} - name: Restore build cache uses: actions/cache@v2 @@ -101,3 +115,15 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} body: ${{ github.event.head_commit.message }} + + - name: Deploy artifact as new release candidate + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'workflow_dispatch' + with: + prerelease: true # release candidate + allowUpdates: true + replacesArtifacts: true + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.event.inputs.tag }} + body: ${{ github.event.head_commit.message }} From d4eca9f219b8e8f533a0c28047e0664d0c924b9a Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Wed, 4 Aug 2021 10:23:40 +0200 Subject: [PATCH 11/12] Fix release update for monthly builds. --- .github/workflows/extra-arm.yml | 2 +- .github/workflows/extra.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extra-arm.yml b/.github/workflows/extra-arm.yml index 538965ab39..3d8a4d491d 100644 --- a/.github/workflows/extra-arm.yml +++ b/.github/workflows/extra-arm.yml @@ -103,7 +103,7 @@ jobs: - name: Update artifact in latest-release uses: ncipollo/release-action@v1.8.6 - if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) + if: github.event_name == 'schedule' || (github.event_name == 'push' && endsWith( github.ref , 'Cog' )) with: prerelease: true allowUpdates: true diff --git a/.github/workflows/extra.yml b/.github/workflows/extra.yml index bddaa3af1e..18f05c86ab 100644 --- a/.github/workflows/extra.yml +++ b/.github/workflows/extra.yml @@ -94,7 +94,7 @@ jobs: - name: Update artifact in latest-build uses: ncipollo/release-action@v1.8.6 - if: github.event.inputs.should-deploy == 'true' && endsWith( github.ref , 'Cog' ) + if: github.event_name == 'schedule' || (github.event.inputs.should-deploy == 'true' && endsWith( github.ref , 'Cog' )) with: prerelease: true allowUpdates: true From 7e61fe40ba7d4451e2c7a15fd11541202b800835 Mon Sep 17 00:00:00 2001 From: Marcel Taeumel Date: Wed, 4 Aug 2021 10:53:33 +0200 Subject: [PATCH 12/12] Fix Linux 32-bit builds by not loading mesa libs. Those seem to have recent package dependency issues. --- scripts/ci/actions_prepare_linux_x86.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/ci/actions_prepare_linux_x86.sh b/scripts/ci/actions_prepare_linux_x86.sh index a7b16f5a1e..f19885e44f 100755 --- a/scripts/ci/actions_prepare_linux_x86.sh +++ b/scripts/ci/actions_prepare_linux_x86.sh @@ -45,8 +45,6 @@ elif [[ "${ARCH}" = "linux32x86" ]]; then libx11-dev:i386 \ libsm-dev:i386 \ libice-dev:i386 \ - libgl1-mesa-glx:i386 \ - libgl1-mesa-dev:i386 \ libxext-dev:i386 \ libxrender-dev:i386 \ libglapi-mesa:i386 \