CI #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
release: | |
# this runs CI only when a release is created at first (and not when it is | |
# edited or published) | |
types: [created] | |
jobs: | |
build: | |
name: Build wasm extra emsdk libraries | |
runs-on: ubuntu-22.04 | |
env: | |
SDK_VERSION: 3.1.72.2bi | |
PYBUILD: 3.13 | |
SDK_ARCHIVE: python3.13-wasm-sdk-Ubuntu-22.04.tar.lz4 | |
SDKROOT: /opt/python-wasm-sdk | |
SYS_PYTHON: /usr/bin/python3 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install python-wasm-sdk for emsdk/wasi+prebuilts + extra builder scripts | |
working-directory: / | |
run: | | |
sudo apt-get install -y lz4 wget pv bash googletest libgtest-dev libsqlite3-dev sqlite3 | |
sudo rm $(which node) $(which npm) | |
echo https://github.com/pygame-web/python-wasm-sdk/releases/download/$SDK_VERSION/$SDK_ARCHIVE | |
curl -sL --retry 5 https://github.com/pygame-web/python-wasm-sdk/releases/download/$SDK_VERSION/$SDK_ARCHIVE | tar xvP --use-compress-program=lz4 | pv -p -l -s 36000 >/dev/null | |
curl -sL --retry 5 https://github.com/pygame-web/python-wasm-sdk/releases/download/$SDK_VERSION/sdk-extra.tar.gz | tar xvPz | |
- name: Build emsdk extra | |
run: | | |
bash ./build.sh | |
- name: Package extra | |
run: | | |
bash ./pack.sh | |
- name: publish web index | |
run: | | |
bash ./publish.sh | |
- name: Upload sdk-extra to Github Releases | |
if: github.event_name == 'release' | |
uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: /tmp/sdk/*.tar.lz4 | |
file_glob: true | |
tag: ${{ github.ref }} | |
- name : "Upload to GitHub pages" | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: /tmp/web | |
- name: run tests | |
run: | | |
bash ./tests.sh | |