SettingsActivity: render non-string setting values as text (fixes "app threw an exception" on settings pages) #458
Workflow file for this run
This file contains hidden or 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: Build web target and deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: # allow manual workflow starts | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| concurrency: | |
| group: web-build-${{ github.ref }} | |
| cancel-in-progress: true | |
| outputs: | |
| os-version: ${{ steps.version.outputs.OS_VERSION }} | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Install and cache APT dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 | |
| with: | |
| packages: build-essential libffi-dev pkg-config cmake ninja-build | |
| version: apt-v2-ubuntu-24.04-${{ runner.arch }} | |
| execute_install_scripts: true | |
| - name: Set up Emscripten SDK | |
| # Puts emcc/em++/emar on PATH so build_mpos.sh skips its in-tree | |
| # emsdk lookup. Bump the version if the build needs a newer toolchain. | |
| uses: mymindstorm/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16 | |
| with: | |
| version: 6.0.0 | |
| actions-cache-folder: emsdk-cache | |
| - name: Extract OS version | |
| id: version | |
| run: | | |
| OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"') | |
| echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $OS_VERSION" | |
| - name: Build web (WebAssembly/Emscripten) target | |
| run: ./scripts/build_mpos.sh web | |
| - name: Cache Puppeteer dependencies | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.npm | |
| ~/.cache/puppeteer | |
| key: puppeteer-v1-${{ runner.os }}-${{ runner.arch }}-25.4.0 | |
| - name: Smoke-test the _webterm stdio bridge on the built artifact | |
| # Boots the built export headless, installs Module.__webterm.onOutput, | |
| # sends the raw-REPL handshake and asserts the CRLF banner arrives. | |
| # Catches a dead stdout mirror or wrong line endings before deploy. | |
| run: | | |
| npm install --no-save --prefer-offline puppeteer@25.4.0 | |
| node tests/web_bridge_smoke.mjs web | |
| - name: Upload built web export as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: MicroPythonOS_web_${{ steps.version.outputs.OS_VERSION }}.zip | |
| path: web/ | |
| retention-days: 7 | |
| deploy-pages: | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: web-pages-production | |
| cancel-in-progress: false | |
| steps: | |
| - name: Download built web export | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: MicroPythonOS_web_${{ needs.build.outputs.os-version }}.zip | |
| path: web | |
| - name: Deploy to gh-pages branch | |
| uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./web | |
| publish_branch: gh-pages | |
| enable_jekyll: false | |
| force_orphan: true | |
| deploy-preview: | |
| needs: build | |
| if: >- | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| concurrency: | |
| group: web-preview-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Download built web export | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: MicroPythonOS_web_${{ needs.build.outputs.os-version }}.zip | |
| path: web | |
| - name: Deploy preview to Netlify | |
| uses: nwtgck/actions-netlify@d22a32a27c918fe470bbc562e984f80ec48c2668 # v4.0.0 | |
| with: | |
| publish-dir: ./web | |
| production-deploy: false | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| enable-pull-request-comment: true | |
| enable-commit-comment: false | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |