feat!: add WASIX asset pipeline and protocol recovery #12
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/**" | |
| push: | |
| branches: [main] | |
| 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 | |
| persist-credentials: false | |
| - name: Set up Rust tooling | |
| uses: ./.github/actions/setup-rust-tools | |
| with: | |
| cache: "false" | |
| - name: Fetch pinned asset sources | |
| run: cargo run -p xtask -- assets fetch | |
| - 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 | |
| - 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: Validate generated portable assets | |
| run: cargo run -p xtask -- assets check --strict-generated | |
| - name: Verify source-controlled asset inputs | |
| run: cargo run -p xtask -- assets verify-committed | |
| - name: Upload portable WASIX build outputs | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| with: | |
| name: pglite-oxide-portable-wasix | |
| path: | | |
| assets/wasix-build/build/** | |
| target/pglite-oxide/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: Set up Rust tooling | |
| uses: ./.github/actions/setup-rust-tools | |
| with: | |
| cache-save-if: ${{ github.ref == 'refs/heads/main' }} | |
| tools: cargo-nextest | |
| - name: Generate and package target AOT artifacts | |
| run: | | |
| cargo run -p xtask -- assets aot --target-triple "${{ matrix.target }}" | |
| cargo run -p xtask -- assets package-aot --target-triple "${{ matrix.target }}" | |
| cargo run -p xtask -- assets check --strict-generated | |
| cargo run -p xtask -- assets check-aot --target-triple "${{ matrix.target }}" | |
| - name: Check target AOT crate | |
| run: cargo check -p "${{ matrix.package }}" --locked | |
| - name: Package target AOT crate | |
| run: | | |
| cargo run -p xtask -- release stage | |
| cd target/pglite-oxide/release/workspace | |
| cargo package -p "${{ matrix.package }}" --locked --no-verify | |
| - name: Check package sizes | |
| run: | | |
| cargo run -p xtask -- release stage | |
| cd target/pglite-oxide/release/workspace | |
| 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/pglite-oxide/release/workspace/target/package/*.crate | |
| target/pglite-oxide/aot/${{ matrix.target }}/** | |
| crates/aot/${{ matrix.target }}/src/lib.rs | |
| if-no-files-found: error |