Commit 6153e635 authored by Michael Droettboom's avatar Michael Droettboom

Add Circle-CI configuration

parent 4df291a5
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6.5-stretch-browsers
working_directory: ~/repo
steps:
- checkout
- run:
name: dependencies
command: |
sudo apt-get install node-less cmake build-essential
# We need at least g++-8, but stretch comes with g++-6
# Set up the Debian testing repo, and then install g++ from there...
sudo bash -c "echo \"deb http://ftp.us.debian.org/debian testing main contrib non-free\" >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get install -t testing g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo update-alternatives --set gcc /usr/bin/gcc-8
sudo pip install pytest-xdist selenium
# Get recent version of Firefox and geckodriver
wget -O firefox.tar.bz2 https://download.mozilla.org/\?product\=firefox-nightly-latest-ssl\&os\=linux64\&lang\=en-US
tar jxf firefox.tar.bz2
wget https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz
tar zxf geckodriver-v0.20.1-linux64.tar.gz -C firefox
# This Debian is so old, it doesn't know about wasm as a mime type, which then
# causes Firefox to complain when loading it. Let's just add the new mime type.
sudo bash -c "echo 'application/wasm wasm' >> /etc/mime.types"
- restore_cache:
keys:
- v1-emsdk-{{ checksum "emsdk/Makefile" }}
# fallback to using the latest cache if no exact match is found
- v1-emsdk-
- run:
name: build
no_output_timeout: 1200
command: |
make
- save_cache:
paths:
- ./emsdk/emsdk
key: v1-emsdk-{{ checksum "emsdk/Makefile" }}
- run:
name: test
command: |
export PATH=$PWD/firefox:$PATH
make test
all: emsdk/emsdk
# We hack the CPU_CORES, because if you use all of the cores on Circle-CI, you
# run out of memory
emsdk/emsdk:
git clone https://github.com/juj/emsdk.git
sed -i -e "s#CPU_CORES = max(multiprocessing.cpu_count()-1, 1)#CPU_CORES = 3#g" emsdk/emsdk
( \
cd emsdk ; \
./emsdk install --build=Release sdk-tag-1.38.4-64bit binaryen-tag-1.38.4-64bit ; \
cd .. ; \
(cat patches/*.patch | patch -p1) ; \
cd emsdk ; \
./emsdk install --build=Release sdk-tag-1.37.39-64bit binaryen-tag-1.38.4-64bit ; \
cd emsdk/binaryen/tag-1.38.4_64bit_binaryen/ ; \
make ; \
cd ../.. ; \
./emsdk activate --embedded --build=Release sdk-tag-1.38.4-64bit binaryen-tag-1.38.4-64bit \
)
......
......@@ -26,7 +26,7 @@
"displayName": "python",
"codeMirrorMode": "python",
"keybinding": "p",
"url": "./pyodide_dev.js",
"url": "https://iodide-project.github.io/pyodide-demo/pyodide.js",
"module": "pyodide",
"evaluator": "runPython",
"pluginType": "language"
......@@ -41,7 +41,7 @@
"displayName": "python",
"codeMirrorMode": "python",
"keybinding": "p",
"url": "./pyodide_dev.js",
"url": "https://iodide-project.github.io/pyodide-demo/pyodide.js",
"module": "pyodide",
"evaluator": "runPython",
"pluginType": "language"
......
......@@ -26,7 +26,7 @@
"displayName": "python",
"codeMirrorMode": "python",
"keybinding": "p",
"url": "./pyodide_dev.js",
"url": "https://iodide-project.github.io/pyodide-demo/pyodide.js",
"module": "pyodide",
"evaluator": "runPython",
"pluginType": "language"
......@@ -54,7 +54,7 @@ First, let's use a plugin cell to load the Python interpreter and tell Iodide ab
"displayName": "python",
"codeMirrorMode": "python",
"keybinding": "p",
"url": "./pyodide_dev.js",
"url": "https://iodide-project.github.io/pyodide-demo/pyodide.js",
"module": "pyodide",
"evaluator": "runPython",
"pluginType": "language"
......
......@@ -302,7 +302,7 @@ test_macurl2path
test_mailbox crash
test_mailcap unknown
test_marshal
test_math
test_math floating-point
test_memoryio
test_memoryview
test_metaclass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment