diff --git a/.gitignore b/.gitignore index 3f2f2dffa480c8f6b7a64c0ba77e65463ac94324..2e5bd3eb574ca824219f73ed0db32216fdacb36a 100644 --- a/.gitignore +++ b/.gitignore @@ -104,10 +104,6 @@ opsnr.stt html/ record.txt _ci/ -Firefox.app/ -firefox/ -firefox-*.tar.bz2 -firefox-*.dmg miniconda.sh miniconda/ miniconda.cached/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb358df1a596949eac245794c4d586a8aef72838..cbfeae8299a5a366b946b06e219eb6ea07418806 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ variables: # Definition of our build pipeline order stages: - build + - browser-test - deploy - pypi @@ -22,12 +23,12 @@ stages: - chmod 755 _ci/install.sh - ./_ci/install.sh _ci master #installs ci support scripts - ./_ci/before_build.sh - - ./scripts/install_firefox.sh + script: + - ./_ci/build.sh after_script: - ./_ci/after_build.sh cache: &build_caches paths: - - firefox-*.* - miniconda.sh - ${CONDA_ROOT}/pkgs/*.tar.bz2 - ${CONDA_ROOT}/pkgs/urls.txt @@ -38,9 +39,6 @@ stages: tags: - docker image: continuumio/conda-concourse-ci - script: - - export PATH=`pwd`/firefox:${PATH} - - ./_ci/build.sh artifacts: expire_in: 1 week paths: @@ -55,9 +53,6 @@ stages: <<: *build_job tags: - macosx - script: - - export PATH=`pwd`/Firefox.app/Contents/MacOS:${PATH} - - ./_ci/build.sh artifacts: expire_in: 1 week paths: @@ -100,6 +95,34 @@ build_macosx_36: PYTHON_VERSION: "3.6" +# Docker host based testing (must be run inside dind or docker-enabled host) +.browser_test_linux_template: &linux_browser_test_job + stage: browser-tests + 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 + + +browser_linux_36: + <<: *linux_browser_test_job + variables: + PYTHON_VERSION: "3.6" + dependencies: + - build_linux_36 + tags: + - docker + + # Deploy targets .deploy_template: &deploy_job stage: deploy diff --git a/conda/meta.yaml b/conda/meta.yaml index d97ed372b381fdae25a44cb3dac78a1bb870f6d7..5819e08e44525065812569ae20f54426ac2ecf8e 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -56,15 +56,17 @@ test: commands: - beateditor --help - - cd {{ project_dir }}/conda/js - - npm install - - npm test - - cd - - nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx - conda inspect linkages -p $PREFIX {{ name }} # [not win] - conda inspect objects -p $PREFIX {{ name }} # [osx] + {% if environ.get('BEAT_BROWSER_TESTS', False) %} + - cd {{ project_dir }}/conda/js + - npm install + - npm test + - cd - + {% endif %} about: home: https://www.idiap.ch/software/beat/ diff --git a/scripts/after_build.sh b/scripts/after_build.sh deleted file mode 100755 index fd0b3d7e76a20276b58a51b679772a5494e49fbb..0000000000000000000000000000000000000000 --- a/scripts/after_build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 diff --git a/scripts/install_firefox.sh b/scripts/install_firefox.sh deleted file mode 100755 index 6169346202282730e00bd7c2a327f6127c80fd8b..0000000000000000000000000000000000000000 --- a/scripts/install_firefox.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/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 -t "${CI_PROJECT_NAME}"` - 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