|
| 1 | +--- |
| 2 | +name: CI |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + schedule: |
| 12 | + - cron: '30 2 * * *' |
| 13 | + workflow_dispatch: |
| 14 | + inputs: |
| 15 | + git-ref: |
| 16 | + required: false |
| 17 | + |
| 18 | +jobs: |
| 19 | + emscripten: |
| 20 | + name: "Emscripten build" |
| 21 | + runs-on: "ubuntu-latest" |
| 22 | + steps: |
| 23 | + - name: "checkout python-wasm" |
| 24 | + uses: "actions/checkout@v2" |
| 25 | + - name: "checkout CPython" |
| 26 | + uses: "actions/checkout@v2" |
| 27 | + with: |
| 28 | + repository: python/cpython |
| 29 | + path: cpython |
| 30 | + ref: main |
| 31 | + - name: "Verify checkout" |
| 32 | + run: | |
| 33 | + test -x build-python-build.sh || exit 1 |
| 34 | + test -x cpython/configure || exit 2 |
| 35 | + - name: "Pull build image" |
| 36 | + run: docker pull quay.io/tiran/cpythonbuild:ubuntu-impish-wasm |
| 37 | + - name: "Build build Python" |
| 38 | + run: docker run --rm -v $(pwd):/build -w /build quay.io/tiran/cpythonbuild:ubuntu-impish-wasm ./build-python-build.sh |
| 39 | + - name: "Build emscripten Python" |
| 40 | + run: docker run --rm -v $(pwd):/build -w /build quay.io/tiran/cpythonbuild:ubuntu-impish-wasm ./build-python-host-emscripten.sh |
| 41 | + - name: "Check artifacts" |
| 42 | + run: | |
| 43 | + ls -la --si cpython/builddir/host/python* |
| 44 | + ls -la cpython/builddir/host/Modules/ |
| 45 | + test -e cpython/builddir/host/python.data || exit 1 |
| 46 | + - name: "Upload wasm artifacts" |
| 47 | + uses: actions/upload-artifact@v2 |
| 48 | + with: |
| 49 | + name: wasm |
| 50 | + path: | |
| 51 | + cpython/builddir/host/python.wasm |
| 52 | + cpython/builddir/host/python.html |
| 53 | + cpython/builddir/host/python.js |
| 54 | + cpython/builddir/host/python.data |
| 55 | + if-no-files-found: error |
| 56 | + - name: "Upload build artifacts" |
| 57 | + uses: actions/upload-artifact@v2 |
| 58 | + with: |
| 59 | + name: build |
| 60 | + path: | |
| 61 | + cpython/builddir/host/config.log |
| 62 | + cpython/builddir/host/config.cache |
| 63 | + cpython/builddir/host/Makefile |
| 64 | + cpython/builddir/host/pyconfig.h |
| 65 | + cpython/builddir/host/libpython*.a |
| 66 | + cpython/builddir/host/Modules/Setup.local |
| 67 | + cpython/builddir/host/Modules/Setup.stdlib |
| 68 | + cpython/builddir/host/Modules/config.c |
| 69 | + cpython/builddir/host/Modules/_decimal/libmpdec/libmpdec.a |
| 70 | + cpython/builddir/host/Modules/expat/libexpat.a |
| 71 | + cpython/builddir/host/Programs/python.o |
| 72 | + if-no-files-found: error |
0 commit comments