Cleaned, other work

Former-commit-id: e78e9d44965f86857ca99cac1e26d5406b403c14
This commit is contained in:
Forest Anderson 2019-04-24 14:47:03 -04:00 committed by Forest
parent b6fec08fb9
commit 007a7c7fe5

View File

@ -1,14 +1,8 @@
#cache:
# paths:
# - target/
stages:
- pre-build
- build
- test
- post-run
before_script:
- executable
- post-build
# 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
@ -39,16 +33,9 @@ before_script:
ls -la target;
fi;
clean-code:
stage: pre-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script:
- rustup component add rustfmt-preview
- cargo fmt --all -- --check
allow_failure: true
#############
# BUILD
#############
build-voxygen:
stage: build
@ -68,6 +55,10 @@ build-server-cli:
- (cd server-cli && cargo build)
allow_failure: false
#############
# TEST
#############
unittests:
stage: test
image: registry.gitlab.com/veloren/veloren-docker-ci
@ -86,159 +77,76 @@ benchmarktests:
- cargo bench
allow_failure: true
# nightly-linux-debug:
# stage: deploy
# script:
# - (cd voxygen && VELOREN_ASSETS=assets cargo build)
# - (cd server-cli && VELOREN_ASSETS=assets cargo build)
# - rm -r -f nightly
# - mkdir nightly
# - cp target/debug/veloren-server-cli nightly
# - cp target/debug/veloren-voxygen nightly
# - cp -r assets nightly/
# - cp -r voxygen/shaders nightly/
# - rm -f nightly-linux-debug.tar.bz2
# - tar -cvjSf nightly-linux-debug.tar.bz2 nightly
# when: always
# artifacts:
# paths:
# - nightly-linux-debug.tar.bz2
# expire_in: 1 week
# only:
# refs:
# - master
#############
# EXECUTABLE
#############
# nightly-windows-debug:
# stage: deploy
# script:
# - (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)
# - 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/
# - rm -f nightly-windows-debug.zip
# - zip -r nightly-windows-debug.zip nightly
# artifacts:
# paths:
# - nightly-windows-debug.zip
# expire_in: 1 week
# only:
# refs:
# - master
nightly-linux-optimized:
stage: executable
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script:
- (cd voxygen && VELOREN_ASSETS=assets cargo build --release)
- (cd server-cli && VELOREN_ASSETS=assets cargo build --release)
- rm -r -f nightly
- mkdir nightly
- cp target/release/veloren-server-cli nightly
- cp target/release/veloren-voxygen nightly
- cp -r assets nightly/
- cp -r voxygen/shaders nightly/
- rm -f nightly-linux-optimized.tar.bz2
- tar -cvjSf nightly-linux-optimized.tar.bz2 nightly
when: on_success
artifacts:
paths:
- nightly-linux-optimized.tar.bz2
expire_in: 2 days
only:
refs:
- master
# nightly-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 nightly
# - mkdir nightly
# - cp target/release/veloren-server-cli nightly
# - cp target/release/veloren-voxygen nightly
# - cp -r assets nightly/
# - cp -r voxygen/shaders nightly/
# - rm -f nightly-linux-optimized.tar.bz2
# - tar -cvjSf nightly-linux-optimized.tar.bz2 nightly
# when: manual
# artifacts:
# paths:
# - nightly-linux-optimized.tar.bz2
# expire_in: 2 days
# only:
# refs:
# - master
nightly-windows-optimized:
stage: executable
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
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/release/veloren-server-cli.exe nightly
- cp target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe nightly
- cp -r assets nightly/
- cp -r voxygen/shaders nightly/
- rm -f nightly-windows-optimized.zip
- zip -r nightly-windows-optimized.zip nightly
when: on_success
artifacts:
paths:
- nightly-windows-optimized.zip
expire_in: 2 days
only:
refs:
- master
# nightly-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 nightly
# - mkdir nightly
# - cp target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe nightly
# - cp target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe nightly
# - cp -r assets nightly/
# - cp -r voxygen/shaders nightly/
# - rm -f nightly-windows-optimized.zip
# - zip -r nightly-windows-optimized.zip nightly
# when: manual
# artifacts:
# paths:
# - nightly-windows-optimized.zip
# expire_in: 2 days
# only:
# refs:
# - master
#############
# POST-BUILD
#############
# 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
clean-code:
stage: post-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
script:
- rustup component add rustfmt-preview
- cargo fmt --all -- --check
allow_failure: true
coverage:
stage: post-run
stage: post-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker
@ -251,7 +159,7 @@ coverage:
- cargo tarpaulin --skip-clean --all || echo "There is a problem in tarpaulin which sometimes fails"
clippy:
stage: post-run
stage: post-build
image: registry.gitlab.com/veloren/veloren-docker-ci
tags:
- docker