Uncommented lots of the tasks

Former-commit-id: 21bc41fbcfe580c0465a0cfd0053569a1b59186f
This commit is contained in:
Forest Anderson 2019-04-24 11:10:12 -04:00
parent 3231541b3e
commit 2fdd7fca32

View File

@ -5,17 +5,46 @@
stages: stages:
- pre-build - pre-build
- build - build
# - test - test
# - deploy - post-run
# - post-run
before_script: before_script:
# our own git fetch command like https://gitlab.com/gitlab-org/gitlab-runner/blob/master/shells/abstract.go
# speeds up building because we skip the git clean and dont need any gitlab caches
variables:
GIT_STRATEGY: none
before_script:
- cd /cache
- if [ -d .git ]; then
echo "is git dir";
else
git clone $CI_REPOSITORY_URL . ;
fi;
- rm -f .git/index.lock
- rm -f .git/shallow.lock
- rm -f .git/HEAD.lock
- rm -f .git/hocks/post-checkout
- git remote set-url origin $CI_REPOSITORY_URL
- git fetch origin --prune +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
- git checkout -f -q $CI_COMMIT_SHA
- if [ ! -z "${SOURCE_PROJECT}" -a "${SOURCE_PROJECT}" != " " ]; then
echo "THIS SEEMS TO BE A MERGE PIPELINE FROM ${SOURCE_PROJECT}/${SOURCE_BRANCH}";
git pull "https://gitlab.com/${SOURCE_PROJECT}/veloren.git" "${SOURCE_BRANCH}";
fi;
- git submodule sync --recursive - git submodule sync --recursive
- git submodule update --remote --recursive - git submodule update --remote --recursive
- git status
- if [ -d target ]; then
ls -la target;
fi;
clean-code: clean-code:
stage: pre-build stage: pre-build
image: registry.gitlab.com/veloren/veloren-docker-ci image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- rustup component add rustfmt-preview - rustup component add rustfmt-preview
- cargo fmt --all -- --check - cargo fmt --all -- --check
@ -24,26 +53,38 @@ clean-code:
build-voxygen: build-voxygen:
stage: build stage: build
image: registry.gitlab.com/veloren/veloren-docker-ci image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd voxygen && cargo build --target-dir="/cache") - (cd voxygen && cargo build)
allow_failure: false allow_failure: false
build-server-cli: build-server-cli:
stage: build stage: build
image: registry.gitlab.com/veloren/veloren-docker-ci image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd server-cli && cargo build --target-dir="/cache") - (cd server-cli && cargo build)
allow_failure: false allow_failure: false
# unittests: unittests:
# stage: test stage: test
# script: image: registry.gitlab.com/veloren/veloren-docker-ci
# - cargo test tags:
- docker
script:
- cargo test
allow_failure: false
# #benchmarktests: benchmarktests:
# # stage: test stage: test
# # script: image: registry.gitlab.com/veloren/veloren-docker-ci
# # - cargo bench tags:
- docker
script:
- cargo bench
allow_failure: true
# nightly-linux-debug: # nightly-linux-debug:
# stage: deploy # stage: deploy
@ -196,19 +237,25 @@ build-server-cli:
# # refs: # # refs:
# # - master # # - master
# coverage: coverage:
# stage: post-run stage: post-run
# script: image: registry.gitlab.com/veloren/veloren-docker-ci
# - if cargo install --list | grep -i "cargo-tarpaulin"; then tags:
# echo "tarpaulin already installed"; - docker
# else script:
# RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin; - if cargo install --list | grep -i "cargo-tarpaulin"; then
# fi echo "tarpaulin already installed";
# - cargo tarpaulin --skip-clean --all || echo "There is a problem in tarpaulin which sometimes fails" else
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin;
fi
- cargo tarpaulin --skip-clean --all || echo "There is a problem in tarpaulin which sometimes fails"
# clippy: clippy:
# stage: post-run stage: post-run
# script: image: registry.gitlab.com/veloren/veloren-docker-ci
# - rustup component add clippy-preview --toolchain=nightly tags:
# - cargo clippy --all -- -D clippy || echo "This job is disabled, because we are not activly using it now, so we dont want to see yellow failed partly" - docker
# allow_failure: true script:
- rustup component add clippy-preview --toolchain=nightly
- cargo clippy --all -- -D clippy || echo "This job is disabled, because we are not activly using it now, so we dont want to see yellow failed partly"
allow_failure: true