Fix Bun patch compatibility and annotations #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: Bun patch compatibility | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/bun-compatibility.yml' | |
| - 'scripts/backtest-bun.py' | |
| - 'crates/socket-patch-core/src/vendor/**' | |
| - 'crates/socket-patch-core/src/patch/redirect/**' | |
| - 'crates/socket-patch-cli/src/commands/get.rs' | |
| - 'crates/socket-patch-cli/src/commands/scan/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: bun-patch-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_PROFILE_DEV_DEBUG: '0' | |
| CARGO_INCREMENTAL: '0' | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| persist-credentials: false | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 | |
| with: | |
| key: bun-native | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - run: cargo build --locked -p socket-patch-cli | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| with: | |
| name: bun-cli-${{ matrix.os }} | |
| path: | | |
| target/debug/socket-patch | |
| target/debug/socket-patch.exe | |
| if-no-files-found: error | |
| retention-days: 7 | |
| native: | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| bun: ['0.8.1', '1.0.0', '1.0.36', '1.1.0', '1.1.38', '1.1.39', '1.1.45', '1.2.0', '1.2.23', '1.3.0', '1.3.14', '1.4.0', '1.4.2'] | |
| exclude: | |
| - {os: windows-latest, bun: '0.8.1'} | |
| - {os: windows-latest, bun: '1.0.0'} | |
| - {os: windows-latest, bun: '1.0.36'} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| persist-credentials: false | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | |
| with: | |
| name: bun-cli-${{ matrix.os }} | |
| path: native-cli | |
| - name: Install, verify patched bytes, reject corruption, and roll back | |
| shell: bash | |
| run: | | |
| chmod +x native-cli/socket-patch* | |
| python scripts/backtest-bun.py --cli "native-cli/socket-patch${{ runner.os == 'Windows' && '.exe' || '' }}" --cli-revision "${{ github.event.pull_request.head.sha || github.sha }}" --output native-bun --versions '${{ matrix.bun }}' --modes hosted vendored vendored-detached --jobs 3 | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| if: always() | |
| with: | |
| name: bun-results-${{ matrix.os }}-${{ matrix.bun }} | |
| include-hidden-files: true | |
| path: | | |
| native-bun/summary.json | |
| native-bun/captures/**/result.json | |
| native-bun/captures/**/cli-output.json | |
| native-bun/captures/**/tree/** | |
| native-bun/captures/**/*.log | |
| retention-days: 14 |