Repository navigation
Remove --download-mode and the diff download path (#792) #1097
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: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| 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: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| SOCKET_NO_CONFIG: '1' | |
| SOCKET_NO_UPDATE_CHECK: '1' | |
| SOCKET_TELEMETRY_DISABLED: '1' | |
| jobs: | |
| go: | |
| if: github.event.pull_request.draft != true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| go: ['1.18.10', '1.21.13', '1.24.13', '1.26.3'] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| steps: &go-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 | |
| # The macOS rows of `go`: they run on push to main (and nightly | |
| # where scheduled), not on every PR push, so PRs stop queueing on the | |
| # small macOS runner pool. | |
| go-macos: | |
| if: github.event_name != 'pull_request' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest] | |
| # macOS-latest dyld refuses binaries without LC_UUID (Go < 1.24 | |
| # linkers; see ci.yml's vexctl step). | |
| go: ['1.24.13', '1.26.3'] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| steps: *go-steps |