version: 2 defaults: &defaults working_directory: ~/repo docker: - image: iodide/pyodide-env:0.3.0 jobs: build: <<: *defaults steps: - checkout - run: name: lint command: | make lint - restore_cache: keys: - v1-emsdk-{{ checksum "emsdk/Makefile" }}-v11- - 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" }}-v11-{{ .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 pyodide_build -v -k firefox test-chrome: <<: *defaults steps: - checkout - attach_workspace: at: . - run: name: test command: | pytest test pyodide_build -v -k chrome test-python: <<: *defaults steps: - checkout - run: name: deps command: | sudo pip install pytest-cov - run: name: test command: | pytest test pyodide_build -v -k 'not (chrome or firefox)' --cov=pyodide_build --cov=pyodide 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 - test-python - benchmark: requires: - build - deploy: requires: - test-chrome - test-firefox - test-python filters: branches: only: master