Fix ten hosted cargo redirect bugs found by a real-cargo matrix #15
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: Go patch compatibility | |
| # Real Go releases (1.18 = first with go.work, 1.21, 1.24 = the CI pin, | |
| # 1.26 = newest) through the hermetic hosted, vendored, go.work and | |
| # go-patches capstones, each ending in the manifest-less VEX step. The | |
| # suites use a file GOPROXY, so no network beyond the toolchain download. | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/go-compatibility.yml' | |
| - 'crates/socket-patch-core/src/vendor/go*.rs' | |
| - 'crates/socket-patch-core/src/vendor/golang.rs' | |
| - 'crates/socket-patch-core/src/patch/redirect/**' | |
| - 'crates/socket-patch-core/src/crawlers/go_crawler.rs' | |
| - 'crates/socket-patch-core/src/vex/**' | |
| - 'crates/socket-patch-cli/src/commands/vex*.rs' | |
| - 'crates/socket-patch-cli/src/commands/vendor*' | |
| - 'crates/socket-patch-cli/tests/e2e_golang_*build.rs' | |
| - 'crates/socket-patch-cli/tests/e2e_vendor_golang_build.rs' | |
| - 'crates/socket-patch-cli/tests/golang_e2e_matrix/**' | |
| - 'crates/socket-patch-cli/tests/e2e_vex_lockfile/golang.rs' | |
| - 'crates/socket-patch-cli/tests/vex_e2e_common/**' | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: go-compat-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| SOCKET_NO_CONFIG: '1' | |
| SOCKET_NO_UPDATE_CHECK: '1' | |
| jobs: | |
| go: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| go: ['1.18.10', '1.21.13', '1.24.13', '1.26.3'] | |
| include: | |
| # macOS-latest dyld refuses binaries without LC_UUID (Go < 1.24 | |
| # linkers; see ci.yml's vexctl step). | |
| - {os: macos-latest, go: '1.24.13'} | |
| - {os: macos-latest, go: '1.26.3'} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - run: rustup show | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| key: go-compat | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: false | |
| - name: Real-go hosted + vendored flows with manifest-less VEX | |
| env: | |
| SOCKET_PATCH_GO_E2E_VERSION: ${{ matrix.go }} | |
| SOCKET_PATCH_GO_E2E_REQUIRED: '1' | |
| # The hermetic manifest-less VEX cells are the `golang::` module of | |
| # the shared `e2e_vex_lockfile` binary; its filter goes in a second | |
| # command so it does not also filter the build suites' tests. | |
| run: | | |
| cargo test -p socket-patch-cli --no-fail-fast \ | |
| --test e2e_golang_hosted_build --test e2e_vendor_golang_build \ | |
| --test e2e_golang_build --test e2e_golang_workspace_build -- --nocapture | |
| cargo test -p socket-patch-cli --test e2e_vex_lockfile -- golang:: --nocapture |