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

Initial support sccache for windows build #10520

Merged
merged 5 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
20 changes: 18 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ variables:

.docker-cache-status: &docker-cache-status
variables:
CARGO_HOME: "/cargo/${CI_JOB_NAME}"
CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}"
TriplEight marked this conversation as resolved.
Show resolved Hide resolved
before_script:
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=debug sccache --start-server
- sccache -s
Expand Down Expand Up @@ -152,13 +152,29 @@ build-windows:
only: *releaseable_branches
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
CARGO_HOME: "C:/ci-cache/parity-ethereum/cargo/%CI_JOB_NAME%"
TriplEight marked this conversation as resolved.
Show resolved Hide resolved
RUSTC_WRAPPER: sccache
SCCACHE_DIR: "C:/ci-cache/parity-ethereum/sccache"
script:
- sh scripts/gitlab/build-windows.sh
tags:
- rust-windows
<<: *collect_artifacts

# test-windows:
# stage: test
# only:
# - master
# variables:
# CARGO_TARGET: x86_64-pc-windows-msvc
# CARGO_HOME: C:/ci-cache/parity-ethereum/cargo/%CI_JOB_NAME%
# RUSTC_WRAPPER: sccache
# SCCACHE_DIR: C:/ci-cache/parity-ethereum/sccache
# script:
# - sh scripts/gitlab/test-linux.sh
# tags:
# - rust-windows
TriplEight marked this conversation as resolved.
Show resolved Hide resolved

publish-docker:
stage: publish
only: *releaseable_branches
Expand Down
5 changes: 5 additions & 0 deletions scripts/gitlab/build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ set -u # treat unset variables as error

set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs2015\VC\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"
set LIB="C:\vs2015\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64"
sccache -s

echo "__________Show ENVIROMENT__________"
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
echo "CARGO_HOME: " $CARGO_HOME
echo "CARGO_TARGET: " $CARGO_TARGET
echo "RUSTC_WRAPPER: " $RUSTC_WRAPPER
echo "SCCACHE_DIR: " $SCCACHE_DIR

echo "_____ Building target: "$CARGO_TARGET" _____"
time cargo build --target $CARGO_TARGET --release --features final
Expand Down Expand Up @@ -44,3 +47,5 @@ do
done
cp parity.exe.sha256 parity.sha256
cp parity.exe.sha3 parity.sha3

sccache -s