Skip to content
Snippets Groups Projects
Commit 40c206bd authored by Björn Brandenburg's avatar Björn Brandenburg
Browse files

CI: don't run expensive jobs in wip- branches

parent 1cfa5d27
No related branches found
No related tags found
No related merge requests found
###################### Global Config ######################
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
when: never
- if: '$CI_COMMIT_BRANCH'
stages: stages:
- build - build
- process - process
###################### Rules and Scripts ##################
.not_in_wip_branches:
rules:
- if: ($CI_COMMIT_BRANCH !~ /^wip-.*$/) || ($CI_PIPELINE_SOURCE == "merge_request_event")
.build-common: .build-common:
stage: build stage: build
script: script:
...@@ -21,14 +36,14 @@ stages: ...@@ -21,14 +36,14 @@ stages:
image: mathcomp/mathcomp-dev:${CI_JOB_NAME} image: mathcomp/mathcomp-dev:${CI_JOB_NAME}
extends: .build-common extends: .build-common
.build-for-process: .compile:
stage: build stage: build
image: mathcomp/mathcomp:1.12.0-coq-8.13 image: mathcomp/mathcomp:1.12.0-coq-8.13
script: script:
- ./create_makefile.sh --without-classic - ./create_makefile.sh --without-classic
- make -j ${NJOBS} - make -j ${NJOBS}
.build-for-process-classic: .compile-classic:
stage: build stage: build
image: mathcomp/mathcomp:1.12.0-coq-8.13 image: mathcomp/mathcomp:1.12.0-coq-8.13
script: script:
...@@ -63,26 +78,50 @@ stages: ...@@ -63,26 +78,50 @@ stages:
- "*/*/*/*/*/*/*/*/*/*.glob" - "*/*/*/*/*/*/*/*/*/*.glob"
expire_in: 1 week expire_in: 1 week
.doc:
extends:
- .preferred-stable-version
stage: process
script:
- make html -j ${NJOBS}
- mv html with-proofs
- make gallinahtml -j ${NJOBS}
- mv html without-proofs
- make htmlpretty -j ${NJOBS}
- mv html pretty
###################### The Jobs ######################
1.10.0-coq-8.11: 1.10.0-coq-8.11:
extends: .build extends:
- .build
- .not_in_wip_branches
1.11.0-coq-8.11: 1.11.0-coq-8.11:
extends: .build extends:
- .build
- .not_in_wip_branches
1.11.0-coq-8.12: 1.11.0-coq-8.12:
extends: .build extends:
- .build
- .not_in_wip_branches
1.12.0-coq-8.13: 1.12.0-coq-8.13:
extends: .build extends:
- .build
- .not_in_wip_branches
build-for-process: compile:
extends: extends:
- .build-for-process - .compile
- .collect-vo-files - .collect-vo-files
build-for-process-classic: compile-classic:
extends: extends:
- .build-for-process-classic - .not_in_wip_branches
- .compile-classic
- .collect-vo-files - .collect-vo-files
proof-length: proof-length:
...@@ -92,59 +131,55 @@ proof-length: ...@@ -92,59 +131,55 @@ proof-length:
- scripts/proofloc.py --check --long-proofs scripts/known-long-proofs.json `find . -iname *.v` - scripts/proofloc.py --check --long-proofs scripts/known-long-proofs.json `find . -iname *.v`
spell-check: spell-check:
extends:
- .not_in_wip_branches
stage: build stage: build
image: bbbrandenburg/aspell-ci image: bbbrandenburg/aspell-ci
script: script:
- scripts/flag-typos-in-comments.sh `find . -iname '*.v' ! -path './classic/*'` - scripts/flag-typos-in-comments.sh `find . -iname '*.v' ! -path './classic/*'`
# mathcomp-dev with stable Coq 8.13
coq-8.13: coq-8.13:
extends: extends:
- .build-dev - .build-dev
- .not_in_wip_branches
# it's ok to fail with an unreleased version of ssreflect # it's ok to fail with an unreleased version of ssreflect
allow_failure: true allow_failure: true
# mathcomp-dev with coq-dev
coq-dev: coq-dev:
extends: extends:
- .build-dev - .build-dev
- .not_in_wip_branches
# it's ok to fail with an unreleased version of ssreflect and Coq # it's ok to fail with an unreleased version of ssreflect and Coq
allow_failure: true allow_failure: true
validate: validate:
extends: extends:
- .not_in_wip_branches
- .preferred-stable-version - .preferred-stable-version
stage: process stage: process
needs: ["build-for-process"] needs: ["compile"]
dependencies: dependencies:
- build-for-process - compile
script: make validate script: make validate
validate-classic: validate-classic:
extends: extends:
- .not_in_wip_branches
- .preferred-stable-version - .preferred-stable-version
stage: process stage: process
needs: ["build-for-process-classic"] needs: ["compile-classic"]
dependencies: dependencies:
- build-for-process-classic - compile-classic
script: make validate script: make validate
.doc:
extends:
- .preferred-stable-version
stage: process
script:
- make html -j ${NJOBS}
- mv html with-proofs
- make gallinahtml -j ${NJOBS}
- mv html without-proofs
- make htmlpretty -j ${NJOBS}
- mv html pretty
doc: doc:
extends: extends:
- .doc - .doc
needs: ["build-for-process"] needs: ["compile"]
dependencies: dependencies:
- build-for-process - compile
artifacts: artifacts:
name: "prosa-spec-$CI_COMMIT_REF_NAME" name: "prosa-spec-$CI_COMMIT_REF_NAME"
paths: paths:
...@@ -155,10 +190,11 @@ doc: ...@@ -155,10 +190,11 @@ doc:
doc-classic: doc-classic:
extends: extends:
- .not_in_wip_branches
- .doc - .doc
needs: ["build-for-process-classic"] needs: ["compile-classic"]
dependencies: dependencies:
- build-for-process-classic - compile-classic
artifacts: artifacts:
name: "prosa-classic-spec-$CI_COMMIT_REF_NAME" name: "prosa-classic-spec-$CI_COMMIT_REF_NAME"
paths: paths:
...@@ -169,11 +205,12 @@ doc-classic: ...@@ -169,11 +205,12 @@ doc-classic:
proof-state: proof-state:
extends: extends:
- .not_in_wip_branches
- .preferred-stable-version - .preferred-stable-version
stage: process stage: process
needs: ["build-for-process"] needs: ["compile"]
dependencies: dependencies:
- build-for-process - compile
script: script:
- make alectryon - make alectryon
- mv html ../with-proofs-and-proof-state - mv html ../with-proofs-and-proof-state
......
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