Skip to content
Snippets Groups Projects
Commit 82c6ce0a authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Move script update to outside before_*.sh scripts; Clean-up CI templates

parent 96353bac
No related branches found
No related tags found
No related merge requests found
...@@ -3,5 +3,4 @@ ...@@ -3,5 +3,4 @@
source $(dirname ${0})/functions.sh source $(dirname ${0})/functions.sh
run_cmd rm -rf ${CI_PROJECT_DIR}/install.sh
run_cmd rm -rf ${PREFIX} run_cmd rm -rf ${PREFIX}
#!/usr/bin/env bash #!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST # Wed 21 Sep 2016 13:08:05 CEST
# Refreshes build scripts if necessary
$(dirname ${0})/install.sh $(dirname ${0})
source $(dirname ${0})/functions.sh source $(dirname ${0})/functions.sh
run_cmd rm -f ${HOME}/.pypirc run_cmd rm -f ${HOME}/.pypirc
......
#!/usr/bin/env bash #!/usr/bin/env bash
# Thu 22 Sep 2016 18:23:57 CEST # Thu 22 Sep 2016 18:23:57 CEST
# Refreshes build scripts if necessary
$(dirname ${0})/install.sh $(dirname ${0})
source $(dirname ${0})/functions.sh source $(dirname ${0})/functions.sh
log_info "Not implemented"
#!/usr/bin/env bash #!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST # Wed 21 Sep 2016 13:08:05 CEST
# Refreshes build scripts if necessary
$(dirname ${0})/install.sh $(dirname ${0})
source $(dirname ${0})/functions.sh source $(dirname ${0})/functions.sh
run_cmd $(dirname ${0})/before_build.sh run_cmd $(dirname ${0})/before_build.sh
......
#!/usr/bin/env bash #!/usr/bin/env bash
# Thu 22 Sep 2016 18:23:57 CEST # Thu 22 Sep 2016 18:23:57 CEST
# Refreshes build scripts if necessary
$(dirname ${0})/install.sh $(dirname ${0})
source $(dirname ${0})/functions.sh source $(dirname ${0})/functions.sh
log_info "Not implemented"
# This build file is defined in two parts: 1) a generic set of instructions you # This build file heavily uses template features from YAML so it is generic
# probably **don't** need to change and 2) a part you may have to tune to your # enough for any Bob project. Don't modify it unless you know what you're
# project. It heavily uses template features from YAML to help you in only # doing.
# changing a minimal part of it and avoid code duplication to a maximum while
# still providing a nice pipeline display on your package.
# 1) Generic instructions (only change if you know what you're doing)
# -------------------------------------------------------------------
# Definition of our build pipeline # Definition of our build pipeline
stages: stages:
- build - build
...@@ -17,33 +12,39 @@ stages: ...@@ -17,33 +12,39 @@ stages:
- deploy - deploy
# ---------
# Templates
# ---------
# Template for the build stage # Template for the build stage
# Needs to run on all supported architectures, platforms and python versions # Needs to run on all supported architectures, platforms and python versions
.build_template: &build_job .build_template: &build_job
stage: build stage: build
before_script: before_script:
- git clean -ffdx - git clean -ffdx
- curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > install.sh - mkdir _ci
- chmod 755 ./install.sh - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- ./install.sh _ci - chmod 755 _ci/install.sh
- ./_ci/install.sh _ci #updates
- ./_ci/before_build.sh - ./_ci/before_build.sh
script: script:
- ./_ci/build.sh - ./_ci/build.sh
after_script: after_script:
- ./_ci/after_build.sh - ./_ci/after_build.sh
artifacts: artifacts:
expire_in: 1 day expire_in: 1 week
paths: paths:
- _ci/ - _ci/
- dist/ - dist/
- sphinx/ - sphinx/
# Template for the test stage - re-install from uploaded wheels # Template for the test stage - re-installs from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions # Needs to run on all supported architectures, platforms and python versions
.test_template: &test_job .test_template: &test_job
stage: test stage: test
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_test.sh - ./_ci/before_test.sh
script: script:
- ./_ci/test.sh - ./_ci/test.sh
...@@ -52,9 +53,7 @@ stages: ...@@ -52,9 +53,7 @@ stages:
# Template for the wheel uploading stage # Template for the wheel uploading stage
# Needs to run against one combination of python 2.x and 3.x if it is a python # Needs to run against all combinations of python and operating systems
# only package, otherwise, needs to run in both pythons to all supported
# architectures (Linux and Mac OSX 64-bit)
.wheels_template: &wheels_job .wheels_template: &wheels_job
stage: wheels stage: wheels
environment: intranet environment: intranet
...@@ -62,6 +61,7 @@ stages: ...@@ -62,6 +61,7 @@ stages:
- master - master
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_wheels.sh - ./_ci/before_wheels.sh
script: script:
- ./_ci/wheels.sh - ./_ci/wheels.sh
...@@ -77,6 +77,7 @@ stages: ...@@ -77,6 +77,7 @@ stages:
only: only:
- master - master
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_docs.sh - ./_ci/before_docs.sh
script: script:
- ./_ci/docs.sh - ./_ci/docs.sh
...@@ -84,8 +85,10 @@ stages: ...@@ -84,8 +85,10 @@ stages:
- ./_ci/after_docs.sh - ./_ci/after_docs.sh
# Template for the pypi stage - re-install from uploaded wheels # Template for the deployment stage - re-installs from uploaded wheels
# Needs to run on a single architecture # Needs to run on a single architecture only
# Will deploy your package to PyPI and other required services
# Only runs for tags
.deploy_template: &deploy_job .deploy_template: &deploy_job
stage: deploy stage: deploy
environment: internet environment: internet
...@@ -94,6 +97,7 @@ stages: ...@@ -94,6 +97,7 @@ stages:
except: except:
- branches - branches
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_deploy.sh - ./_ci/before_deploy.sh
script: script:
- ./_ci/deploy.sh - ./_ci/deploy.sh
...@@ -101,10 +105,11 @@ stages: ...@@ -101,10 +105,11 @@ stages:
- ./_ci/after_deploy.sh - ./_ci/after_deploy.sh
# 2) Package specific instructions (you may tune this if needed) # -------------
# -------------------------------------------------------------- # Build Targets
# -------------
# Linux + Python 2.7: Builds, tests, uploads wheel # Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed)
build_linux_27: build_linux_27:
<<: *build_job <<: *build_job
variables: &linux_27_build_variables variables: &linux_27_build_variables
...@@ -162,7 +167,7 @@ wheels_linux_34: ...@@ -162,7 +167,7 @@ wheels_linux_34:
- conda-linux - conda-linux
# Linux + Python 3.5: Builds, tests, uploads wheel and deploys # Linux + Python 3.5: Builds, tests and uploads wheel
build_linux_35: build_linux_35:
<<: *build_job <<: *build_job
variables: &linux_35_build_variables variables: &linux_35_build_variables
......
# This build file is defined in two parts: 1) a generic set of instructions you # This build file heavily uses template features from YAML so it is generic
# probably **don't** need to change and 2) a part you may have to tune to your # enough for any Bob project. Don't modify it unless you know what you're
# project. It heavily uses template features from YAML to help you in only # doing.
# changing a minimal part of it and avoid code duplication to a maximum while
# still providing a nice pipeline display on your package.
# 1) Generic instructions (only change if you know what you're doing)
# -------------------------------------------------------------------
# Definition of our build pipeline # Definition of our build pipeline
stages: stages:
- build - build
...@@ -17,33 +12,39 @@ stages: ...@@ -17,33 +12,39 @@ stages:
- deploy - deploy
# ---------
# Templates
# ---------
# Template for the build stage # Template for the build stage
# Needs to run on all supported architectures, platforms and python versions # Needs to run on all supported architectures, platforms and python versions
.build_template: &build_job .build_template: &build_job
stage: build stage: build
before_script: before_script:
- git clean -ffdx - git clean -ffdx
- curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > install.sh - mkdir _ci
- chmod 755 ./install.sh - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- ./install.sh _ci - chmod 755 _ci/install.sh
- ./_ci/install.sh _ci #updates
- ./_ci/before_build.sh - ./_ci/before_build.sh
script: script:
- ./_ci/build.sh - ./_ci/build.sh
after_script: after_script:
- ./_ci/after_build.sh - ./_ci/after_build.sh
artifacts: artifacts:
expire_in: 1 day expire_in: 1 week
paths: paths:
- _ci/ - _ci/
- dist/ - dist/
- sphinx/ - sphinx/
# Template for the test stage - re-install from uploaded wheels # Template for the test stage - re-installs from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions # Needs to run on all supported architectures, platforms and python versions
.test_template: &test_job .test_template: &test_job
stage: test stage: test
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_test.sh - ./_ci/before_test.sh
script: script:
- ./_ci/test.sh - ./_ci/test.sh
...@@ -52,9 +53,7 @@ stages: ...@@ -52,9 +53,7 @@ stages:
# Template for the wheel uploading stage # Template for the wheel uploading stage
# Needs to run against one combination of python 2.x and 3.x if it is a python # Needs to run against one supported architecture, platform and python version
# only package, otherwise, needs to run in both pythons to all supported
# architectures (Linux and Mac OSX 64-bit)
.wheels_template: &wheels_job .wheels_template: &wheels_job
stage: wheels stage: wheels
environment: intranet environment: intranet
...@@ -62,6 +61,7 @@ stages: ...@@ -62,6 +61,7 @@ stages:
- master - master
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_wheels.sh - ./_ci/before_wheels.sh
script: script:
- ./_ci/wheels.sh - ./_ci/wheels.sh
...@@ -77,6 +77,7 @@ stages: ...@@ -77,6 +77,7 @@ stages:
only: only:
- master - master
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_docs.sh - ./_ci/before_docs.sh
script: script:
- ./_ci/docs.sh - ./_ci/docs.sh
...@@ -84,8 +85,10 @@ stages: ...@@ -84,8 +85,10 @@ stages:
- ./_ci/after_docs.sh - ./_ci/after_docs.sh
# Template for the pypi stage - re-install from uploaded wheels # Template for the deployment stage - re-installs from uploaded wheels
# Needs to run on a single architecture # Needs to run on a single architecture only
# Will deploy your package to PyPI and other required services
# Only runs for tags
.deploy_template: &deploy_job .deploy_template: &deploy_job
stage: deploy stage: deploy
environment: internet environment: internet
...@@ -94,6 +97,7 @@ stages: ...@@ -94,6 +97,7 @@ stages:
except: except:
- branches - branches
before_script: before_script:
- ./_ci/install.sh #updates
- ./_ci/before_deploy.sh - ./_ci/before_deploy.sh
script: script:
- ./_ci/deploy.sh - ./_ci/deploy.sh
...@@ -101,10 +105,11 @@ stages: ...@@ -101,10 +105,11 @@ stages:
- ./_ci/after_deploy.sh - ./_ci/after_deploy.sh
# 2) Package specific instructions (you may tune this if needed) # -------------
# -------------------------------------------------------------- # Build Targets
# -------------
# Linux + Python 2.7: Builds, tests, uploads wheel # Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed)
build_linux_27: build_linux_27:
<<: *build_job <<: *build_job
variables: &linux_27_build_variables variables: &linux_27_build_variables
...@@ -156,7 +161,7 @@ test_linux_34: ...@@ -156,7 +161,7 @@ test_linux_34:
- conda-linux - conda-linux
# Linux + Python 3.5: Builds, tests, uploads wheel and deploys # Linux + Python 3.5: Builds, tests and uploads wheel
build_linux_35: build_linux_35:
<<: *build_job <<: *build_job
variables: &linux_35_build_variables variables: &linux_35_build_variables
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment