Skip to content
Snippets Groups Projects
Commit 0beffd13 authored by Éloïs's avatar Éloïs
Browse files

[ref] rework ci stages

parent deeb962f
No related branches found
No related merge requests found
...@@ -2,17 +2,15 @@ stages: ...@@ -2,17 +2,15 @@ stages:
- build_and_tests - build_and_tests
- fmt - fmt
- clippy - clippy
- publish_crate
- publish_doc
- package - package
- prerelease - prerelease
- publish - release
before_script:
- export PATH="$HOME/.cargo/bin:$PATH"
variables: variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo CARGO_HOME: $CI_PROJECT_DIR/cargo
.rust_stable_env: &rust_stable_env .rust_stable_env: &rust_stable_env
tags: tags:
- redshift-rs-stable - redshift-rs-stable
...@@ -83,7 +81,36 @@ clippy: ...@@ -83,7 +81,36 @@ clippy:
- cargo install --force clippy --verbose - cargo install --force clippy --verbose
script: script:
- cargo clippy --all -- -D warnings --verbose - cargo clippy --all -- -D warnings --verbose
allow_failure: true allow_failure: true
publish:crate:
<<: *rust_stable_env
stage: publish_crate
script:
- IFS='/' read -r first a <<< "$CI_COMMIT_TAG"
- cd $first
- cargo login $DUNITER_CRATES_TOKEN
- cargo publish
only:
- tags
allow_failure: true
when: manual
pages:
<<: *rust_stable_env
stage: publish_doc
script:
- cargo doc
- mv target/doc public
- ls public
artifacts:
untracked: true
paths:
- public
allow_failure: true
when: manual
only:
- dev
package:test:linux-x64: package:test:linux-x64:
<<: *rust_stable_env <<: *rust_stable_env
...@@ -116,8 +143,8 @@ package:prod:linux-x64: ...@@ -116,8 +143,8 @@ package:prod:linux-x64:
- work/bin/ - work/bin/
expire_in: 2 weeks expire_in: 2 weeks
only: only:
- dev - tags
- tags when: manual
.release_jobs: &release_jobs .release_jobs: &release_jobs
image: tensorflow/tensorflow:latest-py3 image: tensorflow/tensorflow:latest-py3
...@@ -126,7 +153,6 @@ package:prod:linux-x64: ...@@ -126,7 +153,6 @@ package:prod:linux-x64:
script: script:
- python3 .gitlab/releaser - python3 .gitlab/releaser
only: only:
- dev
- tags - tags
prerelease: prerelease:
...@@ -136,41 +162,11 @@ prerelease: ...@@ -136,41 +162,11 @@ prerelease:
RELEASE_BIN_DIR: work/bin/ RELEASE_BIN_DIR: work/bin/
SOURCE_EXT: '["tar.gz", "zip"]' SOURCE_EXT: '["tar.gz", "zip"]'
publish:release: release:
<<: *release_jobs <<: *release_jobs
stage: publish stage: release
variables: variables:
RELEASE_BIN_DIR: work/bin/ RELEASE_BIN_DIR: work/bin/
WIKI_RELEASE: Releases WIKI_RELEASE: Releases
allow_failure: false allow_failure: false
when: manual when: manual
\ No newline at end of file
publish:crate:
<<: *rust_stable_env
stage: publish
script:
- IFS='/' read -r first a <<< "$CI_COMMIT_TAG"
- cd $first
- cargo login $DUNITER_CRATES_TOKEN
- cargo publish
only:
- publish-crate
- tags
allow_failure: false
when: manual
pages:
<<: *rust_stable_env
stage: publish
script:
- cargo doc
- mv target/doc public
- ls public
artifacts:
untracked: true
paths:
- public
allow_failure: true
when: manual
only:
- dev
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment