mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
First try with new image
Former-commit-id: 0796795e4f6c5e07101a1b5f2dbae01ce69c0038
This commit is contained in:
parent
bd01716342
commit
b9bdddf944
104
.gitlab-ci.yml
104
.gitlab-ci.yml
@ -3,72 +3,60 @@
|
|||||||
# - target/
|
# - target/
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- pre-build
|
||||||
- build
|
- build
|
||||||
# - test
|
# - test
|
||||||
# - deploy
|
# - deploy
|
||||||
# - post-run
|
# - post-run
|
||||||
|
|
||||||
rust-nightly:
|
|
||||||
stage: build
|
# our own git fetch command like https://gitlab.com/gitlab-org/gitlab-runner/blob/master/shells/abstract.go
|
||||||
image: ubuntu:latest
|
# speeds up building because we skip the git clean and dont need any gitlab caches
|
||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update
|
- if [ -d .git ]; then
|
||||||
- apt-get install curl gcc git -y
|
echo "is git dir";
|
||||||
- git submodule sync --recursive
|
else
|
||||||
- git submodule update --remote --recursive
|
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 update --init --recursive
|
||||||
|
- git status
|
||||||
|
- if [ -d target ]; then
|
||||||
|
ls -la target;
|
||||||
|
fi;
|
||||||
|
|
||||||
|
clean-code:
|
||||||
|
stage: pre-build
|
||||||
script:
|
script:
|
||||||
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
|
- rustup component add rustfmt-preview
|
||||||
- source /root/.cargo/env
|
- cargo fmt --all -- --check
|
||||||
- cargo build --target-dir="/cache"
|
allow_failure: true
|
||||||
- cargo test --verbose
|
|
||||||
|
build-voxygen:
|
||||||
|
stage: build
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci
|
||||||
|
script:
|
||||||
|
- (cd voxygen && cargo build --target-dir="/cache")
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
|
|
||||||
# # our own git fetch command like https://gitlab.com/gitlab-org/gitlab-runner/blob/master/shells/abstract.go
|
build-server-cli:
|
||||||
# # speeds up building because we skip the git clean and dont need any gitlab caches
|
stage: build
|
||||||
# variables:
|
image: registry.gitlab.com/veloren/veloren-docker-ci
|
||||||
# GIT_STRATEGY: none
|
script:
|
||||||
# before_script:
|
- (cd server-cli && cargo build --target-dir="/cache")
|
||||||
# - if [ -d .git ]; then
|
allow_failure: false
|
||||||
# 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 update --init --recursive
|
|
||||||
# - git status
|
|
||||||
# - if [ -d target ]; then
|
|
||||||
# ls -la target;
|
|
||||||
# fi;
|
|
||||||
# # - git submodule update --init --recursive
|
|
||||||
|
|
||||||
# clean-code:
|
|
||||||
# stage: build
|
|
||||||
# script:
|
|
||||||
# - rustup component add rustfmt-preview
|
|
||||||
# - cargo fmt --all -- --check
|
|
||||||
# allow_failure: true
|
|
||||||
|
|
||||||
# build-voxygen:
|
|
||||||
# stage: build
|
|
||||||
# script:
|
|
||||||
# - (cd voxygen && cargo build)
|
|
||||||
|
|
||||||
# build-server-cli:
|
|
||||||
# stage: build
|
|
||||||
# script:
|
|
||||||
# - (cd server-cli && cargo build)
|
|
||||||
|
|
||||||
# unittests:
|
# unittests:
|
||||||
# stage: test
|
# stage: test
|
||||||
|
Loading…
Reference in New Issue
Block a user