mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-10 15:10:54 +00:00
merge template updates and refill vars
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
version: 2.0
|
||||
version: 2.1
|
||||
|
||||
# heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
|
||||
|
||||
@ -14,64 +14,233 @@ common: &common
|
||||
command: ./.circleci/merge_pr.sh
|
||||
when: on_fail
|
||||
- run:
|
||||
name: merge pull request base (3nd try)
|
||||
name: merge pull request base (3rd try)
|
||||
command: ./.circleci/merge_pr.sh
|
||||
when: on_fail
|
||||
- restore_cache:
|
||||
keys:
|
||||
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||
- run:
|
||||
name: install dependencies
|
||||
command: pip install --user tox
|
||||
command: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install tox
|
||||
- run:
|
||||
name: run tox
|
||||
command: ~/.local/bin/tox -r
|
||||
command: python -m tox run -r
|
||||
- save_cache:
|
||||
paths:
|
||||
- .hypothesis
|
||||
- .tox
|
||||
- ~/.cache/pip
|
||||
- ~/.local
|
||||
- ./eggs
|
||||
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||
|
||||
orbs:
|
||||
win: circleci/windows@5.0.0
|
||||
|
||||
windows-wheel-steps:
|
||||
windows-wheel-setup: &windows-wheel-setup
|
||||
executor:
|
||||
name: win/default
|
||||
shell: bash.exe
|
||||
working_directory: C:\Users\circleci\project\py-libp2p
|
||||
environment:
|
||||
TOXENV: windows-wheel
|
||||
restore-cache-step: &restore-cache-step
|
||||
restore_cache:
|
||||
keys:
|
||||
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||
install-pyenv-step: &install-pyenv-step
|
||||
run:
|
||||
name: install pyenv
|
||||
command: |
|
||||
pip install pyenv-win --target $HOME/.pyenv
|
||||
echo 'export PYENV="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
|
||||
echo 'export PYENV_USERPROFILE="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
|
||||
echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/bin"' >> $BASH_ENV
|
||||
echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/shims"' >> $BASH_ENV
|
||||
source $BASH_ENV
|
||||
pyenv update
|
||||
install-latest-python-step: &install-latest-python-step
|
||||
run:
|
||||
name: install latest python version and tox
|
||||
command: |
|
||||
LATEST_VERSION=$(pyenv install --list | grep -E "${MINOR_VERSION}\.[0-9]+$" | tail -1)
|
||||
echo "installing python version $LATEST_VERSION"
|
||||
pyenv install $LATEST_VERSION
|
||||
pyenv global $LATEST_VERSION
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install tox
|
||||
run-tox-step: &run-tox-step
|
||||
run:
|
||||
name: run tox
|
||||
command: |
|
||||
echo 'running tox with' $(python3 --version)
|
||||
python3 -m tox run -r
|
||||
save-cache-step: &save-cache-step
|
||||
save_cache:
|
||||
paths:
|
||||
- .tox
|
||||
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||
|
||||
docs: &docs
|
||||
docker:
|
||||
- image: common
|
||||
steps:
|
||||
- run:
|
||||
name: install latexpdf dependencies
|
||||
command: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install latexmk tex-gyre texlive-fonts-extra
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
<<: *common
|
||||
<<: *docs
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
- image: cimg/python:3.8
|
||||
environment:
|
||||
TOXENV: docs
|
||||
lint:
|
||||
|
||||
py38-core:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
- image: cimg/python:3.8
|
||||
environment:
|
||||
TOXENV: lint
|
||||
py36-core:
|
||||
TOXENV: py38-core
|
||||
py39-core:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
- image: cimg/python:3.9
|
||||
environment:
|
||||
TOXENV: py36-core
|
||||
py37-core:
|
||||
TOXENV: py39-core
|
||||
py310-core:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: circleci/python:3.7
|
||||
- image: cimg/python:3.10
|
||||
environment:
|
||||
TOXENV: py37-core
|
||||
pypy3-core:
|
||||
TOXENV: py310-core
|
||||
py311-core:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: pypy
|
||||
- image: cimg/python:3.11
|
||||
environment:
|
||||
TOXENV: pypy3-core
|
||||
TOXENV: py311-core
|
||||
py312-core:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.12
|
||||
environment:
|
||||
TOXENV: py312-core
|
||||
|
||||
py38-lint:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.8
|
||||
environment:
|
||||
TOXENV: py38-lint
|
||||
py39-lint:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.9
|
||||
environment:
|
||||
TOXENV: py39-lint
|
||||
py310-lint:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.10
|
||||
environment:
|
||||
TOXENV: py310-lint
|
||||
py311-lint:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.11
|
||||
environment:
|
||||
TOXENV: py311-lint
|
||||
py312-lint:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.12
|
||||
environment:
|
||||
TOXENV: py312-lint
|
||||
|
||||
py38-wheel:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.8
|
||||
environment:
|
||||
TOXENV: py38-wheel
|
||||
py39-wheel:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.9
|
||||
environment:
|
||||
TOXENV: py39-wheel
|
||||
py310-wheel:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.10
|
||||
environment:
|
||||
TOXENV: py310-wheel
|
||||
py311-wheel:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.11
|
||||
environment:
|
||||
TOXENV: py311-wheel
|
||||
py312-wheel:
|
||||
<<: *common
|
||||
docker:
|
||||
- image: cimg/python:3.12
|
||||
environment:
|
||||
TOXENV: py312-wheel
|
||||
|
||||
py311-windows-wheel:
|
||||
<<: *windows-wheel-setup
|
||||
steps:
|
||||
- checkout
|
||||
- <<: *restore-cache-step
|
||||
- <<: *install-pyenv-step
|
||||
- run:
|
||||
name: set minor version
|
||||
command: echo "export MINOR_VERSION='3.11'" >> $BASH_ENV
|
||||
- <<: *install-latest-python-step
|
||||
- <<: *run-tox-step
|
||||
- <<: *save-cache-step
|
||||
|
||||
py312-windows-wheel:
|
||||
<<: *windows-wheel-setup
|
||||
steps:
|
||||
- checkout
|
||||
- <<: *restore-cache-step
|
||||
- <<: *install-pyenv-step
|
||||
- run:
|
||||
name: set minor version
|
||||
command: echo "export MINOR_VERSION='3.12'" >> $BASH_ENV
|
||||
- <<: *install-latest-python-step
|
||||
- <<: *run-tox-step
|
||||
- <<: *save-cache-step
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- docs
|
||||
- lint
|
||||
- py36-core
|
||||
- py37-core
|
||||
- pypy3-core
|
||||
- py38-core
|
||||
- py39-core
|
||||
- py310-core
|
||||
- py311-core
|
||||
- py312-core
|
||||
- py38-lint
|
||||
- py39-lint
|
||||
- py310-lint
|
||||
- py311-lint
|
||||
- py312-lint
|
||||
- py38-wheel
|
||||
- py39-wheel
|
||||
- py310-wheel
|
||||
- py311-wheel
|
||||
- py312-wheel
|
||||
- py311-windows-wheel
|
||||
- py312-windows-wheel
|
||||
|
||||
Reference in New Issue
Block a user