pyodide/.circleci/config.yml

119 lines
2.2 KiB
YAML

version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: iodide/pyodide-env:0.2.0
jobs:
build:
<<: *defaults
steps:
- checkout
- run:
name: lint
command: |
make lint
- restore_cache:
keys:
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v8-
- run:
name: build
no_output_timeout: 1200
command: |
ccache -z
make
ccache -s
- run:
name: check-size
command: ls -lh build/
- save_cache:
paths:
- ./emsdk/emsdk
- ~/.ccache
key: v1-emsdk-{{ checksum "emsdk/Makefile" }}-v8-{{ .BuildNum }}
- persist_to_workspace:
root: .
paths:
- ./build
- ./cpython/build/3.7.0/host
- store_artifacts:
path: /home/circleci/repo/build/
test-firefox:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: test
command: |
pytest test -v -k firefox
test-chrome:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: test
command: |
pytest test -v -k chrome
benchmark:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: benchmark
command: |
python benchmark/benchmark.py cpython/build/3.7.0/host/bin/python3 build/benchmarks.json
- store_artifacts:
path: /home/circleci/repo/build/benchmarks.json
deploy:
machine:
enabled: true
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Deploy to Github Pages
command: |
.circleci/deploy.sh
workflows:
version: 2
build-and-deploy:
jobs:
- build
- test-chrome:
requires:
- build
- test-firefox:
requires:
- build
- benchmark:
requires:
- build
- deploy:
requires:
- test-chrome
- test-firefox
filters:
branches:
only: master