pyodide/.circleci/config.yml

130 lines
2.5 KiB
YAML
Raw Normal View History

2018-06-01 13:07:15 +00:00
version: 2
2018-08-17 08:29:10 +00:00
defaults: &defaults
working_directory: ~/repo
docker:
- image: iodide/pyodide-env:0.3.0
2018-06-01 13:07:15 +00:00
2018-08-17 08:29:10 +00:00
jobs:
build:
<<: *defaults
2018-06-01 13:07:15 +00:00
steps:
- checkout
2018-06-14 18:19:08 +00:00
- run:
name: lint
command: |
make lint
2018-06-01 13:07:15 +00:00
- restore_cache:
keys:
2018-10-02 17:23:26 +00:00
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v8-
2018-06-01 13:07:15 +00:00
- run:
name: build
no_output_timeout: 1200
command: |
2018-08-06 17:58:05 +00:00
ccache -z
2018-06-01 13:07:15 +00:00
make
2018-07-24 19:40:25 +00:00
ccache -s
2018-06-01 13:07:15 +00:00
2018-09-27 09:38:26 +00:00
- run:
name: check-size
command: ls -lh build/
2018-06-01 13:07:15 +00:00
- save_cache:
paths:
- ./emsdk/emsdk
2018-07-24 15:27:58 +00:00
- ~/.ccache
2018-10-02 17:23:26 +00:00
key: v1-emsdk-{{ checksum "emsdk/Makefile" }}-v8-{{ .BuildNum }}
2018-06-01 13:07:15 +00:00
2018-08-17 08:29:10 +00:00
- persist_to_workspace:
root: .
paths:
2018-08-24 14:31:28 +00:00
- ./build
2018-10-02 13:25:35 +00:00
- ./cpython/build/3.7.0/host
2018-08-17 08:29:10 +00:00
- store_artifacts:
path: /home/circleci/repo/build/
2018-08-17 08:29:10 +00:00
test-firefox:
<<: *defaults
steps:
2018-08-24 14:31:28 +00:00
- checkout
2018-08-17 08:29:10 +00:00
- attach_workspace:
at: .
2018-06-01 13:07:15 +00:00
- run:
name: test
command: |
2018-08-28 09:59:12 +00:00
pytest test -v -k firefox
2018-08-17 08:29:10 +00:00
test-chrome:
<<: *defaults
steps:
2018-08-24 14:31:28 +00:00
- checkout
2018-08-17 08:29:10 +00:00
- attach_workspace:
2018-08-24 14:31:28 +00:00
at: .
2018-08-17 08:29:10 +00:00
- run:
name: test
command: |
2018-08-28 09:59:12 +00:00
pytest test -v -k chrome
2018-06-19 17:36:14 +00:00
2018-10-15 15:04:54 +00:00
test-python:
<<: *defaults
steps:
- checkout
- run:
name: test
command: |
pytest test -v -k 'not (chrome or firefox)'
benchmark:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: benchmark
command: |
2018-10-02 01:13:32 +00:00
python benchmark/benchmark.py cpython/build/3.7.0/host/bin/python3 build/benchmarks.json
2018-10-02 13:25:35 +00:00
- store_artifacts:
2018-10-04 12:05:22 +00:00
path: /home/circleci/repo/build/benchmarks.json
2018-06-19 17:36:14 +00:00
deploy:
machine:
enabled: true
2018-08-17 08:29:10 +00:00
2018-06-19 17:36:14 +00:00
steps:
2018-08-24 14:31:28 +00:00
- checkout
- attach_workspace:
at: .
2018-06-19 17:36:14 +00:00
- run:
name: Deploy to Github Pages
command: |
2018-09-10 13:09:26 +00:00
.circleci/deploy.sh
2018-06-19 17:36:14 +00:00
workflows:
version: 2
build-and-deploy:
jobs:
- build
2018-08-17 08:29:10 +00:00
- test-chrome:
2018-06-19 17:36:14 +00:00
requires:
- build
2018-08-17 08:29:10 +00:00
- test-firefox:
requires:
- build
2018-10-15 15:04:54 +00:00
- test-python
- benchmark:
requires:
- build
2018-08-17 08:29:10 +00:00
- deploy:
requires:
- test-chrome
- test-firefox
2018-10-15 15:04:54 +00:00
- test-python
2018-06-19 17:36:14 +00:00
filters:
branches:
only: master