feat!: add WASIX asset pipeline and protocol recovery #2
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: Assets | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/assets.yml" | |
| - "Cargo.lock" | |
| - "Cargo.toml" | |
| - "assets/**" | |
| - "crates/aot/**" | |
| - "crates/assets/**" | |
| - "xtask/**" | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "17 3 * * 1" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: assets-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| ASSET_PROFILE: release-o3 | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| portable-wasix: | |
| name: Build portable WASIX assets | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 360 | |
| permissions: | |
| contents: read | |
| actions: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: 1.92 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f | |
| - name: Build WASIX builder image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| context: assets/wasix-build/docker | |
| file: assets/wasix-build/docker/Dockerfile | |
| tags: pglite-oxide-wasix-build:ci | |
| load: true | |
| cache-from: type=gha,scope=wasix-builder | |
| cache-to: type=gha,mode=max,scope=wasix-builder | |
| - name: Validate pinned asset sources | |
| run: cargo run -p xtask -- assets check --strict-local --strict-generated | |
| - name: Build portable WASIX modules and package runtime assets | |
| env: | |
| IMAGE: pglite-oxide-wasix-build:ci | |
| run: | | |
| cargo run -p xtask -- assets release-build \ | |
| --profile "$ASSET_PROFILE" \ | |
| --target-triple x86_64-unknown-linux-gnu \ | |
| --skip-aot \ | |
| --skip-package-size | |
| - name: Upload portable WASIX build outputs | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| with: | |
| name: pglite-oxide-portable-wasix | |
| path: | | |
| assets/wasix-build/build/** | |
| crates/assets/assets/** | |
| assets/generated/** | |
| if-no-files-found: error | |
| native-aot: | |
| name: Build native AOT (${{ matrix.target }}) | |
| needs: portable-wasix | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 180 | |
| permissions: | |
| contents: read | |
| actions: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-15 | |
| target: aarch64-apple-darwin | |
| package: pglite-oxide-aot-aarch64-apple-darwin | |
| - os: macos-15-intel | |
| target: x86_64-apple-darwin | |
| package: pglite-oxide-aot-x86_64-apple-darwin | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| package: pglite-oxide-aot-x86_64-unknown-linux-gnu | |
| - os: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| package: pglite-oxide-aot-aarch64-unknown-linux-gnu | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| package: pglite-oxide-aot-x86_64-pc-windows-msvc | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Download portable WASIX build outputs | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | |
| with: | |
| name: pglite-oxide-portable-wasix | |
| path: . | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: 1.92 | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Generate and package target AOT artifacts | |
| run: | | |
| cargo run -p xtask -- assets aot --target-triple "${{ matrix.target }}" | |
| cargo run -p xtask -- assets package --target-triple "${{ matrix.target }}" | |
| cargo run -p xtask -- assets check --strict-local --strict-generated | |
| - name: Check target AOT crate | |
| run: cargo check -p "${{ matrix.package }}" --locked | |
| - name: Package target AOT crate | |
| run: cargo package -p "${{ matrix.package }}" --locked --no-verify | |
| - name: Check package sizes | |
| run: cargo run -p xtask -- package-size --enforce | |
| - name: Run asset smoke tests | |
| run: cargo run -p xtask -- assets smoke | |
| - name: Upload target artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| with: | |
| name: pglite-oxide-aot-${{ matrix.target }} | |
| path: | | |
| target/package/*.crate | |
| crates/aot/${{ matrix.target }}/artifacts/** | |
| crates/aot/${{ matrix.target }}/src/lib.rs | |
| crates/assets/assets/manifest.json | |
| if-no-files-found: error |