* Make several changes in the release and CI setup. - Remove .travis/ directory completely. - Update deploy.py script to tag with major.minor version and remove the v in the tag which it didn't before. - Fix the CircleCI cron setup. * Update config.yml * Use buildkit if possible. * Use machine executor which supports buildkit. * Remove setup docker step * Use newer image. * Use buildkit syntax for caching pip dependencies. This should significantly speed up the build process by not having to build python wheels multiple times. * Use plain output from buildkit * Make deploy script work with Python 2.7 Also cache python deps across builds. * Fix more python3 things * Install dependency in python3
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
version: '2'
|
|
|
|
jobs:
|
|
build:
|
|
machine:
|
|
image: ubuntu-2004:202010-01
|
|
docker_layer_caching: true
|
|
environment:
|
|
DOCKER_BUILDKIT: 1
|
|
BUILDKIT_PROGRESS: plain
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Setup Environment
|
|
command: source setup_env.sh
|
|
- run:
|
|
name: Install Python dependencies
|
|
command: python3 -m pip install packaging
|
|
- restore_cache:
|
|
keys:
|
|
- python-deps-cache-v1
|
|
- run:
|
|
name: Building Container Images
|
|
command: ./build.sh
|
|
- save_cache:
|
|
key: python-deps-cache-v1
|
|
paths:
|
|
- /root/.cache
|
|
- run:
|
|
name: Generate Tests
|
|
command: bash tests/generate_tests.sh
|
|
- run:
|
|
environment:
|
|
DB: postgres
|
|
name: Postgres Tests
|
|
command: bash tests/test.sh
|
|
- run:
|
|
environment:
|
|
DB: mysql
|
|
name: MySQL Test
|
|
command: bash tests/test.sh
|
|
- deploy:
|
|
command: |
|
|
python3 deploy.py
|
|
|
|
workflows:
|
|
version: 2
|
|
build-and-deploy-workflow:
|
|
jobs:
|
|
- build:
|
|
filters:
|
|
tags:
|
|
only: /^v\d+\.\d+\.\d+$/
|
|
|
|
cron-workflow:
|
|
triggers:
|
|
- schedule:
|
|
cron: "0 0 * * *"
|
|
filters:
|
|
branches:
|
|
only: main
|
|
jobs:
|
|
- build:
|
|
context: org-global
|
|
|
|
rolling-workflow:
|
|
jobs:
|
|
- build:
|
|
context: org-global
|
|
filters:
|
|
branches:
|
|
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
|
|
ignore: /pull\/[0-9]+/
|