From 0857002af4792540716a383627d11c0ed10397e9 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Mon, 25 Mar 2019 22:21:15 +0300 Subject: [PATCH 1/5] Initial support sccache for win build --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 217c49126fd..a60105e7ea4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,7 +152,9 @@ build-windows: only: *releaseable_branches variables: CARGO_TARGET: x86_64-pc-windows-msvc - CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" + CARGO_HOME: "C:/cargo/${CI_JOB_NAME}" + RUSTC_WRAPPER: sccache + SCCACHE_DIR: "C:/sccache" script: - sh scripts/gitlab/build-windows.sh tags: From baad483384602385db9433319bfecd3567832de0 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Mon, 25 Mar 2019 22:31:20 +0300 Subject: [PATCH 2/5] show sccache stats --- scripts/gitlab/build-windows.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/gitlab/build-windows.sh b/scripts/gitlab/build-windows.sh index d4176c75806..7ddf4453e50 100755 --- a/scripts/gitlab/build-windows.sh +++ b/scripts/gitlab/build-windows.sh @@ -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 @@ -44,3 +47,5 @@ do done cp parity.exe.sha256 parity.sha256 cp parity.exe.sha3 parity.sha3 + +sccache -s From d4bd9ec0ae1c6284ac3a692ad139260751644ac1 Mon Sep 17 00:00:00 2001 From: Denis P Date: Tue, 26 Mar 2019 01:21:10 +0100 Subject: [PATCH 3/5] cache paths for shared runners --- .gitlab-ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a60105e7ea4..03243a9b327 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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}" before_script: - SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=debug sccache --start-server - sccache -s @@ -152,15 +152,33 @@ build-windows: only: *releaseable_branches variables: CARGO_TARGET: x86_64-pc-windows-msvc - CARGO_HOME: "C:/cargo/${CI_JOB_NAME}" + CARGO_HOME: "C:/ci-cache/parity-ethereum/cargo/%CI_JOB_NAME%" RUSTC_WRAPPER: sccache - SCCACHE_DIR: "C:/sccache" + SCCACHE_DIR: "C:/ci-cache/parity-ethereum/sccache" script: + - sccache -s - sh scripts/gitlab/build-windows.sh + - sccache -s 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: +# - sccache -s +# - sh scripts/gitlab/test-linux.sh +# - sccache -s +# tags: +# - rust-windows + publish-docker: stage: publish only: *releaseable_branches From fc81703428e756face7ef123d20c725e612217c0 Mon Sep 17 00:00:00 2001 From: Denis P Date: Tue, 26 Mar 2019 01:29:12 +0100 Subject: [PATCH 4/5] sccache status is in the script. --- .gitlab-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03243a9b327..b1eb2d65d91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -156,9 +156,7 @@ build-windows: RUSTC_WRAPPER: sccache SCCACHE_DIR: "C:/ci-cache/parity-ethereum/sccache" script: - - sccache -s - sh scripts/gitlab/build-windows.sh - - sccache -s tags: - rust-windows <<: *collect_artifacts @@ -173,9 +171,7 @@ build-windows: # RUSTC_WRAPPER: sccache # SCCACHE_DIR: C:/ci-cache/parity-ethereum/sccache # script: -# - sccache -s # - sh scripts/gitlab/test-linux.sh -# - sccache -s # tags: # - rust-windows From 28bccd834452859816b0fbf7d2ebf437d6c77551 Mon Sep 17 00:00:00 2001 From: Denis P Date: Wed, 27 Mar 2019 00:22:17 +0100 Subject: [PATCH 5/5] removed windows test for now --- .gitlab-ci.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1eb2d65d91..33d65879428 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,18 +102,18 @@ build-android: CARGO_TARGET: armv7-linux-androideabi script: - scripts/gitlab/build-linux.sh + <<: *collect_artifacts tags: - linux-docker - <<: *collect_artifacts build-linux: &build-linux stage: build only: *releaseable_branches <<: *docker-cache-status + <<: *collect_artifacts script: - scripts/gitlab/build-linux.sh - sccache -s - <<: *collect_artifacts build-linux-i386: <<: *build-linux @@ -136,6 +136,7 @@ build-linux-armhf: build-darwin: stage: build only: *releaseable_branches + <<: *collect_artifacts variables: CARGO_TARGET: x86_64-apple-darwin CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" @@ -145,10 +146,10 @@ build-darwin: - scripts/gitlab/build-linux.sh tags: - rust-osx - <<: *collect_artifacts build-windows: stage: build + <<: *collect_artifacts only: *releaseable_branches variables: CARGO_TARGET: x86_64-pc-windows-msvc @@ -159,21 +160,6 @@ build-windows: - 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 publish-docker: stage: publish @@ -189,6 +175,7 @@ publish-docker: publish-snap: &publish-snap stage: publish only: *releaseable_branches + <<: *collect_artifacts image: snapcore/snapcraft variables: BUILD_ARCH: amd64 @@ -199,7 +186,6 @@ publish-snap: &publish-snap - linux-docker script: - scripts/gitlab/publish-snap.sh - <<: *collect_artifacts publish-snap-i386: <<: *publish-snap