Revert "Can't find artifact debug"

This reverts commit 605514a688 [formerly 34df4943aea59339aef49ac37b3bd89d385ae976].


Former-commit-id: a11b4b01450d9a279923db308dbf6578f1403820
This commit is contained in:
Forest Anderson 2019-04-27 15:38:28 +00:00
parent b72c6b7185
commit 78cfb4ccf5

View File

@ -1,22 +1,20 @@
#cache:
# paths:
# - target/
stages: stages:
- build - build
- test - test
- deploy - post-build
- post-run - executable
# our own git fetch command like https://gitlab.com/gitlab-org/gitlab-runner/blob/master/shells/abstract.go # 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 # speeds up building because we skip the git clean and dont need any gitlab caches
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
before_script: before_script:
- mkdir -p /cache/veloren
- cd /cache/veloren
- if [ -d .git ]; then - if [ -d .git ]; then
echo "is git dir"; echo "is git dir";
else else
git clone $CI_REPOSITORY_URL . ; git clone $CI_REPOSITORY_URL . ;
fi; fi;
- rm -f .git/index.lock - rm -f .git/index.lock
- rm -f .git/shallow.lock - rm -f .git/shallow.lock
@ -26,207 +24,197 @@ before_script:
- git fetch origin --prune +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* - git fetch origin --prune +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
- git checkout -f -q $CI_COMMIT_SHA - git checkout -f -q $CI_COMMIT_SHA
- if [ ! -z "${SOURCE_PROJECT}" -a "${SOURCE_PROJECT}" != " " ]; then - if [ ! -z "${SOURCE_PROJECT}" -a "${SOURCE_PROJECT}" != " " ]; then
echo "THIS SEEMS TO BE A MERGE PIPELINE FROM ${SOURCE_PROJECT}/${SOURCE_BRANCH}"; echo "THIS SEEMS TO BE A MERGE PIPELINE FROM ${SOURCE_PROJECT}/${SOURCE_BRANCH}";
git pull "https://gitlab.com/${SOURCE_PROJECT}/veloren.git" "${SOURCE_BRANCH}"; git pull "https://gitlab.com/${SOURCE_PROJECT}/veloren.git" "${SOURCE_BRANCH}";
fi; fi;
- git submodule update --init --recursive - git submodule sync --recursive
- git submodule update --remote --recursive
- git status - git status
- if [ -d target ]; then - if [ -d target ]; then
ls -la target; ls -la target;
fi; fi;
# - git submodule update --init --recursive
clean-code: #############
stage: build # BUILD
script: #############
- rustup component add rustfmt-preview
- cargo fmt --all -- --check
allow_failure: true
build-voxygen: build-voxygen:
stage: build stage: build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd voxygen && cargo build) - (cd voxygen && cargo build)
build-server-cli: build-server-cli:
stage: build stage: build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd server-cli && cargo build) - (cd server-cli && cargo build)
#############
# TEST
#############
unittests: unittests:
stage: test stage: test
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- cargo test - cargo test
#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:
stage: deploy #############
# POST-BUILD
#############
clean-code:
stage: post-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script:
- cargo fmt --all -- --check
allow_failure: true
coverage:
stage: post-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script:
- cargo tarpaulin --skip-clean --all || echo "There is a problem in tarpaulin which sometimes fails"
allow_failure: true
clippy:
stage: post-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script:
- 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
#############
# Commit build
#############
commit-linux-debug:
stage: executable
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build) - (cd voxygen && VELOREN_ASSETS=assets cargo build)
- (cd server-cli && VELOREN_ASSETS=assets cargo build) - (cd server-cli && VELOREN_ASSETS=assets cargo build)
- rm -r -f nightly - rm -r -f commit-build
- mkdir nightly - mkdir commit-build
- cp target/debug/veloren-server-cli nightly - cp target/debug/veloren-server-cli commit-build
- cp target/debug/veloren-voxygen nightly - cp target/debug/veloren-voxygen commit-build
- cp -r assets nightly/ - cp -r assets commit-build/
- cp -r voxygen/shaders nightly/ - cp -r voxygen/shaders commit-build/
- rm -f nightly-linux-debug.tar.bz2 - rm -f commit-linux-debug.tar.bz2
- tar -cvjSf nightly-linux-debug.tar.bz2 nightly - tar -cvjSf commit-linux-debug.tar.bz2 commit-build
when: always - cp commit-linux-debug.tar.bz2 $CI_PROJECT_DIR
artifacts: artifacts:
paths: paths:
- nightly-linux-debug.tar.bz2 - commit-linux-debug.tar.bz2
expire_in: 1 week expire_in: 1 week
except:
- schedules
only: only:
refs: refs:
- master - master
- add-docker-gitlab-ci
nightly-windows-debug: commit-windows-debug:
stage: deploy stage: executable
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build --target=x86_64-pc-windows-gnu) - (cd voxygen && VELOREN_ASSETS=assets cargo build --target=x86_64-pc-windows-gnu)
- (cd server-cli && VELOREN_ASSETS=assets cargo build --target=x86_64-pc-windows-gnu) - (cd server-cli && VELOREN_ASSETS=assets cargo build --target=x86_64-pc-windows-gnu)
- rm -r -f nightly - rm -r -f commit-build
- mkdir nightly - mkdir commit-build
- cp target/x86_64-pc-windows-gnu/debug/veloren-server-cli.exe nightly - cp target/x86_64-pc-windows-gnu/debug/veloren-server-cli.exe commit-build
- cp target/x86_64-pc-windows-gnu/debug/veloren-voxygen.exe nightly - cp target/x86_64-pc-windows-gnu/debug/veloren-voxygen.exe commit-build
- cp -r assets nightly/ - cp -r assets commit-build/
- cp -r voxygen/shaders nightly/ - cp -r voxygen/shaders commit-build/
- rm -f nightly-windows-debug.zip - rm -f commit-windows-debug.zip
- zip -r nightly-windows-debug.zip nightly - zip -r commit-windows-debug.zip commit-build
- cp commit-windows-debug.zip $CI_PROJECT_DIR
artifacts: artifacts:
paths: paths:
- nightly-windows-debug.zip - commit-windows-debug.zip
expire_in: 1 week expire_in: 1 week
except:
- schedules
only: only:
refs: refs:
- master - master
- add-docker-gitlab-ci
#############
# NIGHTLY
#############
nightly-linux-optimized: nightly-linux-optimized:
stage: deploy stage: executable
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build --release) - (cd voxygen && VELOREN_ASSETS=assets cargo build --release)
- (cd server-cli && VELOREN_ASSETS=assets cargo build --release) - (cd server-cli && VELOREN_ASSETS=assets cargo build --release)
- rm -r -f nightly - rm -r -f nightly-build
- mkdir nightly - mkdir nightly-build
- cp target/release/veloren-server-cli nightly - cp target/release/veloren-server-cli nightly-build
- cp target/release/veloren-voxygen nightly - cp target/release/veloren-voxygen nightly-build
- cp -r assets nightly/ - cp -r assets nightly-build/
- cp -r voxygen/shaders nightly/ - cp -r voxygen/shaders nightly-build/
- rm -f nightly-linux-optimized.tar.bz2 - rm -f nightly-linux-optimized.tar.bz2
- tar -cvjSf nightly-linux-optimized.tar.bz2 nightly - tar -cvjSf nightly-linux-optimized.tar.bz2 nightly-build
when: manual - cp nightly-linux-optimized.zip $CI_PROJECT_DIR
artifacts: artifacts:
paths: paths:
- nightly-linux-optimized.tar.bz2 - nightly-linux-optimized.tar.bz2
expire_in: 2 days expire_in: 2 days
only: only:
refs: - schedules
- master
nightly-windows-optimized: nightly-windows-optimized:
stage: deploy stage: executable
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script: script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu) - (cd voxygen && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu)
- (cd server-cli && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu) - (cd server-cli && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu)
- rm -r -f nightly - rm -r -f nightly-build
- mkdir nightly - mkdir nightly-build
- cp target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe nightly - cp target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe nightly-build
- cp target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe nightly - cp target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe nightly-build
- cp -r assets nightly/ - cp -r assets nightly-build/
- cp -r voxygen/shaders nightly/ - cp -r voxygen/shaders nightly-build/
- rm -f nightly-windows-optimized.zip - rm -f nightly-windows-optimized.zip
- zip -r nightly-windows-optimized.zip nightly - zip -r nightly-windows-optimized.zip nightly-build
when: manual - cp nightly-windows-optimized.zip $CI_PROJECT_DIR
artifacts: artifacts:
paths: paths:
- nightly-windows-optimized.zip - nightly-windows-optimized.zip
expire_in: 2 days expire_in: 2 days
only: only:
refs: - schedules
- master
stable-linux-optimized:
stage: deploy
script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build --release)
- (cd server-cli && VELOREN_ASSETS=assets cargo build --release)
- rm -r -f stable
- mkdir stable
- cp target/release/veloren-server-cli stable
- cp target/release/veloren-voxygen stable
- cp -r assets nightly/
- cp -r voxygen/shaders nightly/
- rm -f stable-linux-optimized.tar.bz2
- tar -cvjSf stable-linux-optimized.tar.bz2 stable
artifacts:
paths:
- stable-linux-optimized.tar.bz2
expire_in: 30d
only:
refs:
- /^v[0-9]+\.[0-9]+\.[0-9]+/
stable-windows-optimized:
stage: deploy
script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu)
- (cd server-cli && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu)
- rm -r -f stable
- mkdir stable
- cp target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe stable
- cp target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe stable
- cp -r assets nightly/
- cp -r voxygen/shaders nightly/
- rm -f stable-windows-optimized.zip
- zip -r stable-windows-optimized.zip stable
artifacts:
paths:
- stable-windows-optimized.zip
expire_in: 30d
only:
refs:
- /^v[0-9]+\.[0-9]+\.[0-9]+/
# nightly-windows-release:
# stage: deploy
# script:
# - (cd voxygen && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu)
# - (cd server-cli && VELOREN_ASSETS=assets cargo build --release --target=x86_64-pc-windows-gnu)
# - rm -r -f nightly
# - mkdir nightly
# - cp target/x86_64-pc-windows-gnu/debug/veloren-server-cli.exe nightly
# - cp target/x86_64-pc-windows-gnu/debug/veloren-voxygen.exe nightly
# - cp -r assets nightly/
# - cp -r voxygen/shaders nightly/
# - cp -r voxygen/fonts nightly/
# - rm -f nightly-windows-release.zip
# - zip -r nightly-windows-release.zip nightly
# artifacts:
# paths:
# - nightly-windows-release.zip
# expire_in: 1 week
# only:
# refs:
# - master
coverage:
stage: post-run
script:
- if cargo install --list | grep -i "cargo-tarpaulin"; then
echo "tarpaulin already installed";
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:
stage: post-run
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