version: 2.1 commands: test-start: steps: - checkout - run: name: environment command: | echo 'export PATH=.:$HOME/.local/bin:$PATH' >> $BASH_ENV - run: name: Upgrade pip command: | pip install --upgrade --user pip test-min-requirements: steps: - run: name: install minimum requirements command: | # Use requirements-builder to determine the minimum versions of # all requirements and test those # We install requirements-builder itself into its own venv, since # otherwise its dependencies might install newer versions of # glean_parser's dependencies. python3 -m venv .rb .rb/bin/pip install requirements-builder .rb/bin/requirements-builder --level=min setup.py > min_requirements.txt pip install --use-feature=2020-resolver --progress-bar off --user -U -r min_requirements.txt test-python-version: parameters: requirements-file: type: string default: "requirements_dev.txt" steps: - run: name: install command: | pip install --use-feature=2020-resolver --progress-bar off --user -U -r <> sudo apt update -q sudo apt upgrade -q sudo apt install openjdk-11-jdk-headless make install-kotlin-linters - run: name: lint command: make lint - run: name: install # Set CC to something that isn't a working compiler so we # can detect if any of the dependencies require a compiler # to be installed. We can't count on a working compiler # being available to pip on all of the platforms we need to # support, so we need to make sure the dependencies are all # pure Python or provide pre-built wheels. command: CC=broken_compiler python setup.py install --user - run: name: test command: make test jobs: build-36: docker: - image: circleci/python:3.6.12 steps: - test-start - test-python-version build-36-min: docker: - image: circleci/python:3.6.12 steps: - test-start - test-min-requirements - test-python-version build-37: docker: - image: circleci/python:3.7.9 steps: - test-start - test-python-version - run: name: make-docs command: | make docs touch docs/_build/html/.nojekyll - persist_to_workspace: root: docs/_build paths: html build-38: docker: - image: circleci/python:3.8.5 steps: - test-start - test-python-version build-38-min: docker: - image: circleci/python:3.8.5 steps: - test-start - test-min-requirements - test-python-version build-39: docker: - image: circleci/python:3.9.0rc1 steps: - test-start - test-python-version docs-deploy: docker: - image: node:8.10.0 steps: - checkout - add_ssh_keys: fingerprints: - "9b:25:aa:bf:39:b6:4a:e7:c3:52:cf:ab:23:81:3d:52" - attach_workspace: at: docs/_build - run: name: install command: | npm install -g --silent gh-pages@2.0.1 git config user.email "glean-ci@nowhere.com" git config user.name "glean-ci" - run: name: deploy command: | gh-pages --dotfiles --message "[ci skip] updates" --dist docs/_build/html pypi-deploy: docker: - image: circleci/python:3.7.5 steps: - checkout - run: name: environment command: | echo 'export PATH=.:$HOME/.local/bin:$PATH' >> $BASH_ENV - run: name: Upgrade pip command: | pip install --upgrade --user pip - run: name: install command: | pip install --use-feature=2020-resolver --user -U -r requirements_dev.txt - run: name: deploy # Requires that the TWINE_USERNAME and TWINE_PASSWORD environment # variables are configured in CircleCI's environment variables. command: | make release workflows: version: 2 build: jobs: - build-36: filters: tags: only: /.*/ - build-36-min: filters: tags: only: /.*/ - build-37: filters: tags: only: /.*/ - build-38: filters: tags: only: /.*/ - build-38-min: filters: tags: only: /.*/ - build-39: filters: tags: only: /.*/ - docs-deploy: requires: - build-37 filters: branches: only: main - pypi-deploy: requires: - build-37 filters: branches: ignore: /.*/ tags: only: /v[0-9]+(\.[0-9]+)*/