job.sh (759B)
1 #!/bin/bash 2 set -exuo pipefail 3 4 # Update system 5 apt-get update -yq 6 apt-get upgrade -yq 7 8 ./bootstrap 9 10 # Build package 11 VERSION="$(./contrib/ci/version.sh)" 12 export VERSION 13 : "${VERSION:?version generation returned an empty version}" 14 echo "Building package version ${VERSION}" 15 EMAIL=none gbp dch --dch-opt=-b --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}" 16 make deb 17 18 # Test package 19 sudo ./contrib/ci/deb-test.sh 20 21 # Cross-compile the other supported architecture. 22 case "$(dpkg --print-architecture)" in 23 amd64) make deb DEB_HOST_ARCH=arm64 ;; 24 arm64) make deb DEB_HOST_ARCH=amd64 ;; 25 esac 26 27 # Move to artifact 28 ls -alh ../*.deb 29 mkdir -p /artifacts/taler-rust/${CI_COMMIT_REF} 30 mv ../*.deb /artifacts/taler-rust/${CI_COMMIT_REF}