Skip to content
Snippets Groups Projects
Verified Commit db7d54e9 authored by Geoffrey Arthaud's avatar Geoffrey Arthaud
Browse files

Separate deps fetching and linting + remove useless tasks

parent 6e25530d
Branches main
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ default:
policy: pull
stages:
- deps_and_lint
- prepare
- build_test
- release
- deploy
......@@ -67,19 +67,24 @@ release-gpd-image:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
check-format:
stage: deps_and_lint
cache-dependencies:
stage: prepare
image: ${RUST_IMAGE}:${RUST_VERSION}
script:
- cargo fetch
- cargo fmt --all -- --check
- cargo clippy -- -D warnings
cache:
key: rust-deps
paths:
- .cargo
policy: pull-push
check-format:
stage: build_test
image: ${RUST_IMAGE}:${RUST_VERSION}
script:
- cargo fmt --all -- --check
- cargo clippy -- -D warnings
test-rust-current:
stage: build_test
image: ${RUST_IMAGE}:${RUST_VERSION}
......@@ -89,11 +94,16 @@ test-rust-current:
- cargo run -- $TEST_OPTIONS --token $TEST_GL_TOKEN
- cargo run -- $CLEAN_OPTIONS
- cargo run -- $CLEAN_OPTIONS --token $TEST_GL_TOKEN
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
test-rust-nightly:
extends: test-rust-current
image: rustlang/rust:nightly
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
.rust-release:
image: ${RUST_IMAGE}:${RUST_VERSION}
......@@ -108,11 +118,6 @@ test-rust-nightly:
- export VERSION=${CI_COMMIT_TAG:-latest}
- echo "VERSION=${VERSION}" > release.env
- 'if [ -z "$DEBUG" ]; then curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $TARGET "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/$TARGET_ARCH/${VERSION}/$APP_NAME"; fi'
artifacts:
paths:
- $TARGET
reports:
dotenv: release.env
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
......@@ -130,6 +135,11 @@ release-linux:
before_script:
- apt update -y
- apt install -y musl-dev musl-tools build-essential
artifacts:
paths:
- $TARGET
reports:
dotenv: release.env
release-macos-silicon:
extends: .rust-release
......@@ -162,6 +172,8 @@ release-windows:
before_script:
- apt-get update
- apt-get install -y lld gcc-mingw-w64-x86-64
rules:
- if: $CI_COMMIT_TAG
test-release-docker:
stage: deploy_test
......
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