Branch
Hash :
7d23c2d2
Author :
Date :
2023-02-09T06:01:37
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
version: 2.1
defaults: &defaults
working_directory: ~/repo
docker:
# Built from:
# https://github.com/pyodide/pyodide/blob/2ab4b0ab6aefe99fd994bb4f9ab086e5c0aebb7b/Dockerfile
- image: pyodide/pyodide-env:20230126-chrome109-firefox109-py311
jobs:
install-emsdk:
<<: *defaults
steps:
- checkout
- run:
name: install emsdk
command: |
git clone https://github.com/emscripten-core/emsdk.git --depth=1
cd emsdk
./emsdk install 3.1.30
./emsdk activate 3.1.30
- persist_to_workspace:
root: .
paths:
- emsdk
build:
parameters:
wasm-bigint:
description: Should we build with wasm-bigint?
type: string
default: ""
environment:
WASM_BIGINT: << parameters.wasm-bigint >>
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: build
command: |
source ./emsdk/emsdk_env.sh
./testsuite/emscripten/build.sh
- run:
name: build tests
command: |
source ./emsdk/emsdk_env.sh
cp -r testsuite/libffi.call testsuite/libffi.call.test
cp -r testsuite/libffi.closures testsuite/libffi.closures.test
./testsuite/emscripten/build-tests.sh testsuite/libffi.call.test
./testsuite/emscripten/build-tests.sh testsuite/libffi.closures.test
- persist_to_workspace:
root: .
paths:
- target
- testsuite
test:
parameters:
test-params:
description: The tests to run.
type: string
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: run tests
command: |
git reset --hard
cd testsuite/emscripten/
mkdir test-results
pytest \
--junitxml=test-results/junit.xml \
test_libffi.py \
<< parameters.test-params >>
- store_test_results:
path: testsuite/emscripten/test-results
test-dejagnu:
parameters:
params:
description: Parameters to node-tests
type: string
default: ""
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: run tests
command: |
source ./emsdk/emsdk_env.sh
testsuite/emscripten/node-tests.sh << parameters.params >>
workflows:
version: 2
build-and-test:
jobs:
- install-emsdk
- build:
name: build
requires:
- install-emsdk
- build:
name: build-bigint
wasm-bigint: "true"
requires:
- install-emsdk
- test:
name: test-firefox
test-params: -k firefox
requires:
- build
- test:
name: test-chrome
test-params: -k chrome
requires:
- build
- test:
name: test-firefox-bigint
test-params: -k firefox
requires:
- build-bigint
- test:
name: test-chrome-bigint
test-params: -k chrome
requires:
- build-bigint
- test-dejagnu:
name: test-dejagnu
requires:
- install-emsdk
- test-dejagnu:
name: test-dejagnu-bigint
params: --wasm-bigint
requires:
- install-emsdk