language: c dist: trusty addons: apt: sources: - sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main' key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg' - sourceline: 'deb https://deb.nodesource.com/node_10.x trusty main' key_url: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key' packages: - nodejs - yarn - build-essential env: global: - GOV=1.10.2 - GOSHA="4b677d698c65370afa33757b6954ade60347aaca310ea92a63ed717d7cb0c2ff go${GOV}.linux-amd64.tar.gz" - GOPATH="${HOME}/go" - GOROOT="${HOME}/${GOV}/go" - PATH="${GOROOT}/bin:${PATH}:${GOPATH}/bin" - SRCROOT="${GOPATH}/src/github.com/mattermost" - GOARM=7 matrix: - V=5.0.0 before_install: - install -d "${GOPATH}/bin" "${GOROOT}" "${SRCROOT}/mattermost-"{server,webapp} # download & extract golang - wget -q "https://storage.googleapis.com/golang/go${GOV}.linux-amd64.tar.gz" - sha256sum --check <<< "${GOSHA}" - tar -C "${HOME}/${GOV}" -xzf "go${GOV}.linux-amd64.tar.gz" # download & extract mattermost-server - wget -q "https://github.com/mattermost/mattermost-server/archive/v${V}.tar.gz" -O mattermost-server.tar.gz - tar -C "${SRCROOT}/mattermost-server" --strip-components=1 -xf mattermost-server.tar.gz # download & extract mattermost-webapp - wget -q "https://github.com/mattermost/mattermost-webapp/archive/v${V}.tar.gz" -O mattermost-webapp.tar.gz - tar -C "${SRCROOT}/mattermost-webapp" --strip-components=1 -xf mattermost-webapp.tar.gz script: - make build -C "${SRCROOT}/mattermost-webapp" # workaround (instead of patch): platform binary is in GOOS_GOARCH, Makefile expects it in linux_amd64 - ln -s "${GOPATH}/bin/linux_arm" "${GOPATH}/bin/linux_amd64" # adapt and revert reverted commit, https://github.com/mattermost/mattermost-server/pull/8537 - patch -d "${SRCROOT}/mattermost-server" -p1 < "${TRAVIS_BUILD_DIR}/build-release.patch" # workaround (instead of patch): overwrite GO variable to enforce desired GOARCH - make config-reset build-linux package-linux -C "${SRCROOT}/mattermost-server" GO="GOARCH=arm $(which go)" BUILD_NUMBER="dev-arm-tag${V}" # workaround (instead of patch): Makefile creates *-amd64.tar.gz - mv "${SRCROOT}/mattermost-server/dist/mattermost-team-linux-amd64.tar.gz" "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz" - sha512sum "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz" | tee "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz.sha512sum" deploy: provider: releases api_key: "${GITHUB_OAUTH_TOKEN}" file: - "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz" - "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz.sha512sum" skip_cleanup: true