Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating the ci #50

Merged
merged 7 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: linux
dist: bionic
dist: focal
language: generic
addons:
apt:
Expand All @@ -11,12 +11,16 @@ services:
env:
global:
- CONTAINER_JAVA_VER="openjdk-8-jdk"
- CONTAINER_RUST_VER="1.51.0"
jobs:
- name: rust_1.51
env: CONTAINER_RUST_VER='1.51.0'
- name: rust_nightly
env: CONTAINER_RUST_VER='nightly-2021-04-25' RUSTFLAGS='-C target-feature=+bmi2,+adx --emit=asm'

script: >-
source ci/setup_env.sh &&
docker build --pull --no-cache -t zencash/zendoo-sc-cryptolib-builder ./ci &&
bash -c "docker run --rm -v $(pwd):/build -v ${HOME}/key.asc:/key.asc --tmpfs /tmp:uid=$(id -u),gid=$(id -g),exec,mode=1777 \
--tmpfs /run:uid=$(id -u),gid=$(id -g),exec,mode=1777 -e LOCAL_USER_ID=$(id -u) -e LOCAL_GRP_ID=$(id -g) \
--tmpfs /run:uid=$(id -u),gid=$(id -g),exec,mode=1777 -e RUSTFLAGS -e LOCAL_USER_ID=$(id -u) -e LOCAL_GRP_ID=$(id -g) \
$(env | grep -E '^CONTAINER_' | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' ') \
zencash/zendoo-sc-cryptolib-builder /build/ci/start_ci.sh"
5 changes: 2 additions & 3 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

MAINTAINER infrastructure@zensystem.io

Expand All @@ -10,7 +10,7 @@ COPY entrypoint.sh entrypoint_setup_gpg.sh /usr/local/bin/
RUN set -eux && export GOSU_VERSION=1.12 && export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends build-essential ca-certificates curl dirmngr \
gcc-mingw-w64-x86-64 gnupg2 gnupg-curl wget; \
gcc-mingw-w64-x86-64 gnupg2 gnupg1-curl wget; \
# save list of currently installed packages for later so we can clean up
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
Expand Down Expand Up @@ -54,4 +54,3 @@ RUN set -eux && export GOSU_VERSION=1.12 && export DEBIAN_FRONTEND=noninteractiv
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

2 changes: 2 additions & 0 deletions ci/build_jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euo pipefail

cargo test --all-features

cargo clean

cargo build -j$(($(nproc)+1)) --release --target=x86_64-pc-windows-gnu
Expand Down
27 changes: 17 additions & 10 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@ if [ ! -z "${TRAVIS_TAG}" ]; then
echo "Tagged build, fetching maintainer keys."
gpg -v --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys $MAINTAINER_KEYS ||
gpg -v --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys $MAINTAINER_KEYS ||
gpg -v --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys $MAINTAINER_KEYS
gpg -v --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys $MAINTAINER_KEYS ||
gpg -v --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $MAINTAINER_KEYS ||
gpg -v --batch --keyserver hkp://ha.pool.sks-keyservers.net --recv-keys $MAINTAINER_KEYS ||
gpg -v --batch --keyserver keyserver.pgp.com --recv-keys $MAINTAINER_KEYS ||
gpg -v --batch --keyserver pgp.key-server.io --recv-keys $MAINTAINER_KEYS
if git verify-tag -v "${TRAVIS_TAG}"; then
echo "Valid signed tag"
if [ "${TRAVIS_TAG}" != "${pom_version}" ]; then
echo "Aborting, tag differs from the pom file."
exit 1
else
export CONTAINER_PUBLISH="true"
echo "Fetching gpg signing keys."
curl -sLH "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw" "$MAVEN_KEY_ARCHIVE_URL" |
openssl enc -d -aes-256-cbc -md sha256 -pass pass:$MAVEN_KEY_ARCHIVE_PASSWORD |
tar -xzf- -C "${HOME}"
if [[ "${CONTAINER_RUST_VER}" != *"nightly"* ]]; then
echo "Publishing - this is a release"
if [ "${TRAVIS_TAG}" != "${pom_version}" ]; then
echo "Aborting, tag differs from the pom file."
exit 1
else
export CONTAINER_PUBLISH="yes"
lander86 marked this conversation as resolved.
Show resolved Hide resolved
echo "Fetching gpg signing keys."
curl -sLH "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw" "$MAVEN_KEY_ARCHIVE_URL" |
openssl enc -d -aes-256-cbc -md sha256 -pass pass:$MAVEN_KEY_ARCHIVE_PASSWORD |
tar -xzf- -C "${HOME}"
fi
fi
fi
fi
Expand Down