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

[ci] Download and install firefox before build

parent b26f5970
No related branches found
No related tags found
1 merge request!3Support for new conda-based CI/CD pipelines
Pipeline #
...@@ -104,6 +104,10 @@ opsnr.stt ...@@ -104,6 +104,10 @@ opsnr.stt
html/ html/
record.txt record.txt
_ci/ _ci/
Firefox.app/
firefox/
firefox-*.tar.bz2
firefox-*.dmg
miniconda.sh miniconda.sh
miniconda/ miniconda/
miniconda.cached/ miniconda.cached/
......
...@@ -9,7 +9,6 @@ variables: ...@@ -9,7 +9,6 @@ variables:
# Definition of our build pipeline order # Definition of our build pipeline order
stages: stages:
- build - build
- browser-test
- deploy - deploy
- pypi - pypi
...@@ -23,12 +22,12 @@ stages: ...@@ -23,12 +22,12 @@ stages:
- chmod 755 _ci/install.sh - chmod 755 _ci/install.sh
- ./_ci/install.sh _ci master #installs ci support scripts - ./_ci/install.sh _ci master #installs ci support scripts
- ./_ci/before_build.sh - ./_ci/before_build.sh
script: - ./scripts/install_firefox.sh
- ./_ci/build.sh
after_script: after_script:
- ./_ci/after_build.sh - ./_ci/after_build.sh
cache: &build_caches cache: &build_caches
paths: paths:
- firefox-*.*
- miniconda.sh - miniconda.sh
- ${CONDA_ROOT}/pkgs/*.tar.bz2 - ${CONDA_ROOT}/pkgs/*.tar.bz2
- ${CONDA_ROOT}/pkgs/urls.txt - ${CONDA_ROOT}/pkgs/urls.txt
...@@ -39,6 +38,9 @@ stages: ...@@ -39,6 +38,9 @@ stages:
tags: tags:
- docker - docker
image: continuumio/conda-concourse-ci image: continuumio/conda-concourse-ci
script:
- export PATH=`pwd`/firefox:${PATH}
- ./_ci/build.sh
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
...@@ -53,6 +55,9 @@ stages: ...@@ -53,6 +55,9 @@ stages:
<<: *build_job <<: *build_job
tags: tags:
- macosx - macosx
script:
- export PATH=`pwd`/Firefox.app/Contents/MacOS:${PATH}
- ./_ci/build.sh
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
...@@ -63,24 +68,6 @@ stages: ...@@ -63,24 +68,6 @@ stages:
key: "macosx-cache" key: "macosx-cache"
# Docker host based testing (must be run inside dind or docker-enabled host)
.browser_test_linux_template: &linux_browser_test_job
stage: browser-test
image: docker.idiap.ch/beat/beat.env.editor:0.0.1r4
before_script:
# safe keep artifacts as before_build.sh will erase those...
- mv ${CONDA_ROOT}/conda-bld .
- ./_ci/install.sh _ci master #updates ci support scripts
- ./_ci/before_build.sh
- mv conda-bld ${CONDA_ROOT}
- ./scripts/before_test.sh
script:
- export BEAT_BROWSER_TESTS=true
- BOB_TEST_ONLY=true ./_ci/build.sh
after_script:
- ./_ci/after_build.sh
build_linux_27: build_linux_27:
<<: *linux_build_job <<: *linux_build_job
variables: variables:
...@@ -113,27 +100,6 @@ build_macosx_36: ...@@ -113,27 +100,6 @@ build_macosx_36:
PYTHON_VERSION: "3.6" PYTHON_VERSION: "3.6"
# Docker host based testing
browser_linux_27:
<<: *linux_browser_test_job
variables:
PYTHON_VERSION: "2.7"
dependencies:
- build_linux_27
tags:
- docker
browser_linux_36:
<<: *linux_browser_test_job
variables:
PYTHON_VERSION: "3.6"
dependencies:
- build_linux_36
tags:
- docker
# Deploy targets # Deploy targets
.deploy_template: &deploy_job .deploy_template: &deploy_job
stage: deploy stage: deploy
......
...@@ -15,7 +15,7 @@ build: ...@@ -15,7 +15,7 @@ build:
- cd {{ project_dir }}/conda/js - cd {{ project_dir }}/conda/js
- npm install - npm install
- npm run build - npm run build
- cd {{ project_dir }} - cd -
{% if environ.get('BUILD_EGG') %} {% if environ.get('BUILD_EGG') %}
- python setup.py sdist --formats=zip - python setup.py sdist --formats=zip
{% endif %} {% endif %}
...@@ -56,12 +56,10 @@ test: ...@@ -56,12 +56,10 @@ test:
commands: commands:
- beateditor --help - beateditor --help
{% if environ.get('BEAT_BROWSER_TESTS', False) %}
- cd {{ project_dir }}/conda/js - cd {{ project_dir }}/conda/js
- npm install - npm install
- npm test - npm test
- cd - - cd -
{% endif %}
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} - nosetests --with-coverage --cover-package={{ name }} -sv {{ name }}
- sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest {{ project_dir }}/doc sphinx - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
......
#!/usr/bin/env bash
basedir=`pwd`
source ${basedir}/_ci/functions.sh
# delete the bob packages from the cache otherwise the cache keeps increasing
# over and over. See https://gitlab.idiap.ch/bob/bob.admin/issues/65
rm -rf ${CONDA_ROOT}/pkgs/batl*.tar.bz2
rm -rf ${CONDA_ROOT}/pkgs/beat*.tar.bz2
rm -rf ${CONDA_ROOT}/pkgs/bob*.tar.bz2
rm -rf ${CONDA_ROOT}/pkgs/gridtk*.tar.bz2
# run git clean to clean everything that is not needed. This helps to keep the
# disk usage on CI machines to minimum.
git clean -ffdx \
--exclude="firefox-*.{tar.bz2,dmg}" \
--exclude="miniconda.sh" \
--exclude="miniconda/pkgs/*.tar.bz2" \
--exclude="miniconda/pkgs/urls.txt" \
--exclude="miniconda/conda-bld/linux-64/*.tar.bz2" \
--exclude="miniconda/conda-bld/osx-64/*.tar.bz2" \
--exclude="_ci" \
--exclude="dist/*.zip" \
--exclude="sphinx" > /dev/null
#!/usr/bin/env bash
basedir=`pwd`
source ${basedir}/_ci/functions.sh
# Installs firefox and creates a link to ${CONDA_ROOT}
name="firefox"
version="59.0.3"
if [[ `uname` == 'Linux' ]]; then
fn="${name}-${version}.tar.bz2"
if [ ! -r "${fn}" ]; then
run_cmd curl "https://ftp.mozilla.org/pub/${name}/releases/${version}/linux-x86_64/en-US/${name}-${version}.tar.bz2" --output "${fn}"
fi
run_cmd tar -xvj -f "${fn}"
else # macOS: `uname` == 'Darwin'
fn="${name}-${version}.dmg"
if [ ! -r "${fn}" ]; then
run_cmd curl --silent "https://ftp.mozilla.org/pub/${name}/releases/${version}/mac/en-US/Firefox%20${version}.dmg" --output "${fn}"
fi
mount=`mktemp -d`
run_cmd hdiutil attach -noautoopen -mountpoint ${mount} "${fn}"
run_cmd cp -v -a ${mount}/Firefox.app ./
run_cmd hdiutil detach ${mount}
run_cmd rm -rf ${mount}
fi
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