Simultaneous platform tests WIP (#9557)
* look into commit changes * look into commit changes ii * all on test * build only_releaseable_branches for platforms * allow failure for check during development * windows test typo * fix sh for windows * remove check stage again * debug macos platform
This commit is contained in:
parent
0c3b70f2fb
commit
870ec89e9a
@ -60,6 +60,46 @@ test-rust-stable: &test
|
|||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
|
|
||||||
|
test-darwin-macos-x86_64:
|
||||||
|
stage: test
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: x86_64-apple-darwin
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/test.sh stable
|
||||||
|
tags:
|
||||||
|
- osx
|
||||||
|
|
||||||
|
test-linux-android-armhf:
|
||||||
|
stage: test
|
||||||
|
image: parity/rust-android:gitlab-ci
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/test.sh stable
|
||||||
|
tags:
|
||||||
|
- rust-arm
|
||||||
|
|
||||||
|
test-windows-msvc-x86_64:
|
||||||
|
stage: test
|
||||||
|
cache:
|
||||||
|
key: "%CI_JOB_NAME%"
|
||||||
|
paths:
|
||||||
|
- "%CI_PROJECT_DIR%/target/"
|
||||||
|
- "%CI_PROJECT_DIR%/cargo/"
|
||||||
|
# No cargo caching, since fetch-locking on Windows gets stuck
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
||||||
|
script:
|
||||||
|
- sh scripts/gitlab/test.sh stable
|
||||||
|
tags:
|
||||||
|
- rust-windows
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.optional_test: &optional_test
|
.optional_test: &optional_test
|
||||||
<<: *test
|
<<: *test
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
@ -139,6 +179,7 @@ build-linux-ubuntu-armhf:
|
|||||||
|
|
||||||
build-linux-android-armhf:
|
build-linux-android-armhf:
|
||||||
stage: build
|
stage: build
|
||||||
|
only: *releaseable_branches
|
||||||
image: parity/rust-android:gitlab-ci
|
image: parity/rust-android:gitlab-ci
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: armv7-linux-androideabi
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
@ -149,6 +190,7 @@ build-linux-android-armhf:
|
|||||||
|
|
||||||
build-darwin-macos-x86_64:
|
build-darwin-macos-x86_64:
|
||||||
stage: build
|
stage: build
|
||||||
|
only: *releaseable_branches
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: x86_64-apple-darwin
|
CARGO_TARGET: x86_64-apple-darwin
|
||||||
CC: gcc
|
CC: gcc
|
||||||
@ -161,6 +203,7 @@ build-darwin-macos-x86_64:
|
|||||||
|
|
||||||
build-windows-msvc-x86_64:
|
build-windows-msvc-x86_64:
|
||||||
stage: build
|
stage: build
|
||||||
|
only: *releaseable_branches
|
||||||
cache:
|
cache:
|
||||||
key: "%CI_JOB_NAME%"
|
key: "%CI_JOB_NAME%"
|
||||||
paths:
|
paths:
|
||||||
|
@ -4,25 +4,41 @@
|
|||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
|
|
||||||
rustup default $1
|
|
||||||
|
|
||||||
if [[ "$CI_COMMIT_REF_NAME" = "master" || "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
|
set -x # full command output for development
|
||||||
export GIT_COMPARE=$CI_COMMIT_REF_NAME~;
|
git log --graph --oneline --all --decorate=short -n 10
|
||||||
else
|
|
||||||
export GIT_COMPARE=master;
|
|
||||||
|
case $CI_COMMIT_REF_NAME in
|
||||||
|
(master|beta|stable)
|
||||||
|
export GIT_COMPARE=$CI_COMMIT_REF_NAME~
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
export GIT_COMPARE=master
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^scripts/ | wc -l | tr -d ' ')"
|
||||||
|
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${RUST_FILES_MODIFIED}" = "0" ]
|
||||||
|
then
|
||||||
|
echo "__________Skipping Rust tests since no Rust files modified__________";
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | wc -l)"
|
|
||||||
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
|
rustup default $1
|
||||||
|
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
rustup show
|
rustup show
|
||||||
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
|
|
||||||
then echo "__________Skipping Rust tests since no Rust files modified__________";
|
exec ./test.sh
|
||||||
else ./test.sh || exit $?;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]];
|
# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]];
|
||||||
# ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3
|
# ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3
|
||||||
# then sh scripts/aura-test.sh; # || exit $?;
|
# then sh scripts/aura-test.sh; # || exit $?;
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user