-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from JeanChristopheMorinPerso/update_pyodide
Update pyodide and OTIO
- Loading branch information
Showing
4 changed files
with
33 additions
and
117 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,56 +18,52 @@ jobs: | |
- uses: actions/checkout@v3 | ||
|
||
- name: Clone OpenTimelineIO | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: AcademySoftwareFoundation/OpenTimelineIO | ||
repository: JeanChristopheMorinPerso/OpenTimelineIO | ||
ref: switch_to_scikit_build_core | ||
path: OpenTimelineIO | ||
submodules: 'recursive' | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
python-version: '3.12' | ||
|
||
- run: | | ||
pip install pyodide-build==0.22.1 | ||
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV | ||
- uses: mymindstorm/setup-emsdk@v12 | ||
- uses: pypa/[email protected] | ||
with: | ||
version: ${{ env.EMSCRIPTEN_VERSION }} | ||
|
||
- run: git apply < ../patch.patch | ||
working-directory: OpenTimelineIO | ||
|
||
- run: pyodide build --exports pyinit | ||
working-directory: OpenTimelineIO | ||
package-dir: OpenTimelineIO | ||
output-dir: dist | ||
env: | ||
VERBOSE: '1' | ||
OTIO_CXX_BUILD_TYPE: RelWithDebInfo | ||
|
||
- uses: actions/upload-artifact@v3 | ||
CIBW_PLATFORM: pyodide | ||
# whole_archive is needed to make all symbols available. | ||
CIBW_BUILD_FRONTEND: 'build; args: --exports=whole_archive' | ||
# Note that -fwasm-exceptions doesn't work right now. It'll cause | ||
# a bunch of issues with symbols not found. Quite weird. | ||
CIBW_ENVIRONMENT: LDFLAGS="-fexceptions" CXXFLAGS="-fexceptions" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
name: Upload wheel artifact | ||
with: | ||
name: wheel | ||
path: OpenTimelineIO/dist/*.whl | ||
path: dist/*.whl | ||
|
||
- name: Generate HTML | ||
run: | | ||
set -ex | ||
python -m pip install packaging jinja2 | ||
python generateHtml.py OpenTimelineIO/dist/*.whl pages | ||
python generateHtml.py dist/*.whl pages | ||
cp OpenTimelineIO/dist/*.whl pages/ | ||
cp dist/*.whl pages/ | ||
find public -mindepth 1 -not -name "*.in" -exec cp -v {} pages/ \; | ||
- name: Upload pages artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: pages | ||
|
||
deploy: | ||
needs: ['build'] | ||
|
||
if: github.ref_name == 'main' | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
@@ -81,8 +77,8 @@ jobs: | |
|
||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
href="https://cdn.jsdelivr.net/npm/[email protected]/css/jquery.terminal.min.css" | ||
rel="stylesheet" | ||
/> | ||
<script src="https://cdn.jsdelivr.net/pyodide/v0.21.3/full/pyodide.js"></script> | ||
<script src="https://cdn.jsdelivr.net/pyodide/v0.26.4/full/pyodide.js"></script> | ||
<style> | ||
.terminal { | ||
--size: 1.5; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<script src="https://cdn.jsdelivr.net/pyodide/v0.21.3/full/pyodide.js"></script> | ||
<script src="https://cdn.jsdelivr.net/pyodide/v0.26.4/full/pyodide.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script> | ||
|
@@ -80,8 +80,15 @@ | |
document.getElementById('spinner-message').innerHTML = "Loading Pyodide... UI will be blocked until it finishes loading"; | ||
let pyodide = await loadPyodide(); | ||
|
||
document.getElementById('spinner-message').innerHTML = "Loading OpenTimelineIO {{ version }} ({{ commit }})..."; | ||
await pyodide.loadPackage('https://jcmorin.dev/otio-wasm/{{ wheel }}'); | ||
document.getElementById('spinner-message').innerHTML = "Loading micropip"; | ||
await pyodide.loadPackage("micropip"); | ||
|
||
document.getElementById('spinner-message').innerHTML = "Loading OpenTimelineIO {{ version }} ({{ commit }}) and otio-svg-adapter..."; | ||
const micropip = pyodide.pyimport("micropip"); | ||
await micropip.install(['https://jcmorin.dev/otio-wasm/{{ wheel }}', 'otio-svg-adapter']); | ||
|
||
// This is a hack. See https://github.com/pyodide/pyodide/pull/4836 | ||
pyodide._module.reportUndefinedSymbols(); | ||
|
||
document.getElementById('spinner-group').hidden = true; | ||
|
||
|