Skip to content
Snippets Groups Projects
Commit 4f6897b4 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

Merge branch 'feature/blanchard/ci/simpl-constrains' into 'master'

[ci] reorganizes schedules and release pipelines

See merge request frama-c/frama-c!4390
parents 7ced1ed8 141d24d4
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,32 @@ variables: ...@@ -25,7 +25,32 @@ variables:
OCAML: "4.13" OCAML: "4.13"
PUBLISH: "no" PUBLISH: "no"
RELEASE: "no" RELEASE: "no"
WEEKLY: "no"
################################################################################
### ONLY/EXCEPT TEMPLATES
.build_template: &manual_when_not_special_pipeline
except:
refs:
- schedules
variables:
- $RELEASE == "yes"
when: manual
.build_template: &when_release
only:
variables:
- $RELEASE == "yes"
.build_template: &when_schedules
only:
refs:
- schedules
.build_template: &when_publish
only:
variables:
- $PUBLISH == "yes"
################################################################################ ################################################################################
### PREPARE ### PREPARE
...@@ -66,9 +91,7 @@ check-publish: ...@@ -66,9 +91,7 @@ check-publish:
[[ "$RELEASE" == "no" ]] && [[ "$RELEASE" == "no" ]] &&
[[ "$DEFAULT" == "$CI_COMMIT_BRANCH" ]] && [[ "$DEFAULT" == "$CI_COMMIT_BRANCH" ]] &&
[[ "$DEFAULT" == "master" ]] [[ "$DEFAULT" == "master" ]]
only: <<: *when_publish
variables:
- $PUBLISH == "yes"
check-release: check-release:
stage: prepare stage: prepare
...@@ -78,9 +101,7 @@ check-release: ...@@ -78,9 +101,7 @@ check-release:
[[ "$DEFAULT" == "stable/$(cat VERSION_CODENAME | tr '[:upper:]' '[:lower:]')" ]] && [[ "$DEFAULT" == "stable/$(cat VERSION_CODENAME | tr '[:upper:]' '[:lower:]')" ]] &&
[[ "$(git describe --tag)" == "$(cat VERSION | sed 's/~/-/')" ]] && [[ "$(git describe --tag)" == "$(cat VERSION | sed 's/~/-/')" ]] &&
[[ "$(cat VERSION)" == "$(cat opam | grep "^version" | sed 's/version: \"\(.*\)\"/\1/')" ]] [[ "$(cat VERSION)" == "$(cat opam | grep "^version" | sed 's/version: \"\(.*\)\"/\1/')" ]]
only: <<: *when_release
variables:
- $RELEASE == "yes"
# Observed: when several shell with same dependencies are started, deadlock may # Observed: when several shell with same dependencies are started, deadlock may
# occur when building these dependencies. We build these dependencies # occur when building these dependencies. We build these dependencies
...@@ -293,12 +314,14 @@ lint: ...@@ -293,12 +314,14 @@ lint:
# Manuals # Manuals
.build_template: &manuals_template .build_template: &manuals_build_template
stage: distrib stage: distrib
variables: variables:
OUT: "manuals" OUT: "manuals"
script: script:
- ./nix/build-proxy.sh manuals - ./nix/build-proxy.sh manuals
.build_template: &manuals_artifacts_template
artifacts: artifacts:
paths: paths:
- manuals/*.pdf - manuals/*.pdf
...@@ -307,31 +330,22 @@ lint: ...@@ -307,31 +330,22 @@ lint:
expire_in: 7 days # Note: the LAST artifact of the ref is always kept expire_in: 7 days # Note: the LAST artifact of the ref is always kept
manuals: manuals:
<<: *manuals_template <<: *manuals_build_template
except:
refs:
- schedules
variables:
- $RELEASE == "yes"
when: manual
manuals-changed: manuals-artifacts:
<<: *manuals_template <<: *manuals_build_template
only: <<: *manuals_artifacts_template
changes: <<: *manual_when_not_special_pipeline
- doc/**/*
manuals-nightly: manuals-nightly:
<<: *manuals_template <<: *manuals_build_template
only: <<: *manuals_artifacts_template
- schedules <<: *when_publish
allow_failure: true
manuals-for-release: manuals-for-release:
<<: *manuals_template <<: *manuals_build_template
only: <<: *manuals_artifacts_template
variables: <<: *when_release
- $RELEASE == "yes"
# Release artifacts # Release artifacts
...@@ -349,9 +363,7 @@ release-content: ...@@ -349,9 +363,7 @@ release-content:
- wiki - wiki
- opam-repository - opam-repository
- release-data.json - release-data.json
only: <<: *when_release
variables:
- $RELEASE == "yes"
################################################################################ ################################################################################
### COMPATIBILITY ### COMPATIBILITY
...@@ -411,9 +423,7 @@ ocaml-versions-nightly: ...@@ -411,9 +423,7 @@ ocaml-versions-nightly:
<<: *ocaml_versions_template <<: *ocaml_versions_template
<<: *ocaml_always_additional_versions_template <<: *ocaml_always_additional_versions_template
# we still check them for the publisher pipeline job # we still check them for the publisher pipeline job
only: <<: *when_publish
variables:
- $PUBLISH == "yes"
# Opam pin # Opam pin
...@@ -431,24 +441,15 @@ ocaml-versions-nightly: ...@@ -431,24 +441,15 @@ ocaml-versions-nightly:
opam-pin: opam-pin:
<<: *opam_pin_template <<: *opam_pin_template
except: <<: *manual_when_not_special_pipeline
refs:
- schedules
variables:
- $RELEASE == "yes"
when: manual
opam-pin-nightly: opam-pin-nightly:
<<: *opam_pin_template <<: *opam_pin_template
only: <<: *when_schedules
refs:
- schedules
opam-pin-release: opam-pin-release:
<<: *opam_pin_template <<: *opam_pin_template
only: <<: *when_release
variables:
- $RELEASE == "yes"
.build_template: &opam_pin_minimal_template .build_template: &opam_pin_minimal_template
stage: compatibility stage: compatibility
...@@ -481,19 +482,17 @@ opam-pin-release: ...@@ -481,19 +482,17 @@ opam-pin-release:
opam-pin-minimal: opam-pin-minimal:
<<: *opam_pin_minimal_template <<: *opam_pin_minimal_template
except: <<: *manual_when_not_special_pipeline
refs:
- schedules
variables:
- $WEEKLY == "yes"
when: manual
opam-pin-minimal-weekly: opam-pin-minimal-nightly:
<<: *opam_pin_minimal_template <<: *opam_pin_minimal_template
<<: *when_schedules
timeout: 2h
opam-pin-minimal-release:
<<: *opam_pin_minimal_template
<<: *when_release
timeout: 2h timeout: 2h
only:
variables:
- $WEEKLY == "yes"
# Distrib # Distrib
...@@ -507,27 +506,19 @@ opam-pin-minimal-weekly: ...@@ -507,27 +506,19 @@ opam-pin-minimal-weekly:
src-distrib-tests: src-distrib-tests:
<<: *src_distrib_tests_template <<: *src_distrib_tests_template
except: <<: *manual_when_not_special_pipeline
refs:
- schedules
variables:
- $RELEASE == "yes"
src-distrib-tests-scheduled: src-distrib-tests-scheduled:
<<: *src_distrib_tests_template <<: *src_distrib_tests_template
<<: *when_schedules
# The Opam target may affect this job # The Opam target may affect this job
timeout: 2h timeout: 2h
only:
refs:
- schedules
src-distrib-tests-release: src-distrib-tests-release:
<<: *src_distrib_tests_template <<: *src_distrib_tests_template
<<: *when_release
# The Opam target may affect this job # The Opam target may affect this job
timeout: 2h timeout: 2h
only:
variables:
- $RELEASE == "yes"
################################################################################ ################################################################################
### RELEASE ### RELEASE
...@@ -545,9 +536,7 @@ release-branch: ...@@ -545,9 +536,7 @@ release-branch:
- (! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/$CI_COMMIT_BRANCH) - (! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/$CI_COMMIT_BRANCH)
- BRANCH="$CI_COMMIT_BRANCH" nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh' - BRANCH="$CI_COMMIT_BRANCH" nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh'
# Note: BRANCH must be defined here, since we cannot *evaluate* a variable in 'variables' # Note: BRANCH must be defined here, since we cannot *evaluate* a variable in 'variables'
only: <<: *when_release
variables:
- $RELEASE == "yes"
when: manual when: manual
interruptible: false interruptible: false
...@@ -559,9 +548,7 @@ release-create: ...@@ -559,9 +548,7 @@ release-create:
needs: needs:
- release-branch - release-branch
- release-content - release-content
only: <<: *when_release
variables:
- $RELEASE == "yes"
when: manual when: manual
interruptible: false interruptible: false
...@@ -570,9 +557,7 @@ release-opam: ...@@ -570,9 +557,7 @@ release-opam:
<<: *prepare_ssh_template <<: *prepare_ssh_template
script: script:
- nix-shell -p git git-lfs coreutils openssh --run './nix/frama-c-public/publish-opam.sh' - nix-shell -p git git-lfs coreutils openssh --run './nix/frama-c-public/publish-opam.sh'
only: <<: *when_release
variables:
- $RELEASE == "yes"
interruptible: false interruptible: false
release-website: release-website:
...@@ -580,9 +565,7 @@ release-website: ...@@ -580,9 +565,7 @@ release-website:
<<: *prepare_ssh_template <<: *prepare_ssh_template
script: script:
- nix-shell -p git git-lfs coreutils openssh --run './nix/frama-c-public/publish-website.sh' - nix-shell -p git git-lfs coreutils openssh --run './nix/frama-c-public/publish-website.sh'
only: <<: *when_release
variables:
- $RELEASE == "yes"
interruptible: false interruptible: false
release-wiki: release-wiki:
...@@ -590,9 +573,7 @@ release-wiki: ...@@ -590,9 +573,7 @@ release-wiki:
<<: *prepare_ssh_template <<: *prepare_ssh_template
script: script:
- nix-shell -p git git-lfs coreutils openssh --run './nix/frama-c-public/publish-wiki.sh' - nix-shell -p git git-lfs coreutils openssh --run './nix/frama-c-public/publish-wiki.sh'
only: <<: *when_release
variables:
- $RELEASE == "yes"
interruptible: false interruptible: false
################################################################################ ################################################################################
...@@ -621,9 +602,7 @@ publish-frama-c: ...@@ -621,9 +602,7 @@ publish-frama-c:
script: script:
- (! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/master) - (! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/master)
- nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh' - nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh'
only: <<: *when_publish
variables:
- $PUBLISH == "yes"
interruptible: false interruptible: false
publish-fclang: publish-fclang:
...@@ -634,9 +613,7 @@ publish-fclang: ...@@ -634,9 +613,7 @@ publish-fclang:
<<: *prepare_ssh_template <<: *prepare_ssh_template
script: script:
- nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh' - nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh'
only: <<: *when_publish
variables:
- $PUBLISH == "yes"
interruptible: false interruptible: false
publish-meta: publish-meta:
...@@ -647,7 +624,5 @@ publish-meta: ...@@ -647,7 +624,5 @@ publish-meta:
<<: *prepare_ssh_template <<: *prepare_ssh_template
script: script:
- nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh' - nix-shell -p coreutils openssh --run './nix/frama-c-public/publish-branch.sh'
only: <<: *when_publish
variables:
- $PUBLISH == "yes"
interruptible: false interruptible: false
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