Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

WIP: ci uses new docker image #236

Merged
merged 3 commits into from May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 13 additions & 22 deletions .gitlab-ci.yml
Expand Up @@ -13,19 +13,19 @@ stages:
- publish
- deploy

image: parity/rust:nightly
image: parity/rust-builder:latest

variables:
GIT_STRATEGY: fetch
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
SCCACHE_CACHE_SIZE: 50G
CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
# have OS based build containers in the future
DOCKER_OS: "ubuntu:xenial"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"



cache: {}

.collect-artifacts: &collect-artifacts
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
Expand Down Expand Up @@ -62,13 +62,8 @@ check-merge-conflict:



test-linux-stable: &test
test-linux-stable: &test
stage: test
cache:
key: "${CI_JOB_NAME}-test"
paths:
- ${CARGO_HOME}
- ./target
variables:
RUST_TOOLCHAIN: stable
# Enable debug assertions since we are running optimized builds for testing
Expand All @@ -87,12 +82,11 @@ test-linux-stable: &test
variables:
- $DEPLOY_TAG
before_script:
- test -d ${CARGO_HOME} -a -d ./target &&
echo "build cache size:" &&
du -h --max-depth=2 ${CARGO_HOME} ./target
- sccache -s
- ./scripts/build.sh
script:
- time cargo test --all --release --verbose --locked
- sccache -s



Expand All @@ -107,11 +101,6 @@ test-linux-stable: &test

build-linux-release: &build
stage: build
cache:
key: "${CI_JOB_NAME}-build"
paths:
- ${CARGO_HOME}
- ./target
<<: *collect-artifacts
<<: *build-only
except:
Expand All @@ -120,7 +109,8 @@ build-linux-release: &build
tags:
- linux-docker
before_script:
- ./scripts/build.sh
- sccache -s
- ./scripts/build.sh
script:
- time cargo build --release --verbose
- mkdir -p ./artifacts
Expand All @@ -135,6 +125,7 @@ build-linux-release: &build
fi
- sha256sum ./artifacts/polkadot | tee ./artifacts/polkadot.sha256
- cp -r scripts/docker/* ./artifacts
- sccache -s



Expand All @@ -143,7 +134,7 @@ build-linux-release: &build
stage: publish
dependencies:
- build-linux-release
cache: {}
cache: {}
<<: *build-only
<<: *kubernetes-build

Expand Down
6 changes: 4 additions & 2 deletions scripts/init.sh
Expand Up @@ -4,8 +4,10 @@ set -e

echo "*** Initializing WASM build environment"

rustup update nightly
rustup update stable
if [ -z $CI_PROJECT_NAME ] ; then
rustup update nightly
rustup update stable
fi

rustup target add wasm32-unknown-unknown --toolchain nightly

Expand Down