Repository navigation
[AI-1892] Publish the Go SDK from main (sdks/go v0.1.0) #1814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+126,723
−1
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
785a8c4
feat(sdks/go): the Go SDK, copied from accelerate
bokan 5623769
ci: check sdks/go alone on Go 1.25, and verify its tags via the proxy
bokan ab85585
ci(release): publish the Python packages only for a v tag
bokan 52f871d
docs: CLAUDE.md says how sdks/go is released from main
bokan 02a855d
ci(release-sdk-go): accept only sdks/go/vX.Y.Z; say how accelerate me…
bokan ed9c60d
feat(sdks/go): copy again from ai-1892-go-sdk-docs f1ab6da6c
bokan 266839f
chore(sdks/go): copy sdks/go from accelerate cf2e643db (after #1812 a…
bokan 2bd1b95
chore(sdks/go): copy sdks/go from accelerate 68ffd61c2 (Leave reports…
bokan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| plugins/getstream/vision_agents/plugins/getstream/sfu_events.py linguist-generated=true | ||
| sdks/go/acceleration/generated.go linguist-generated=true |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: Release Go SDK (verify) | ||
|
|
||
| # A Go module is released by its tag: pushing sdks/go/vX.Y.Z is the release, and the Go module | ||
| # proxy fetches it the first time anybody asks for it. This checks the tagged copy, then asks | ||
| # for it from an empty module outside this repository, as a consumer would. It publishes | ||
| # nothing and creates no GitHub Release: release.yml publishes the Python packages on any | ||
| # published release. | ||
| on: | ||
| push: | ||
| tags: [ 'sdks/go/v*' ] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: An existing tag to verify again, such as sdks/go/v0.1.0 | ||
| required: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: release-sdk-go-${{ inputs.tag || github.ref_name }} | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| TAG: ${{ inputs.tag || github.ref_name }} | ||
| GOWORK: 'off' | ||
| GOTOOLCHAIN: local | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/tags/${{ env.TAG }} | ||
| # The whole history, to see that the tag is on main. | ||
| fetch-depth: 0 | ||
|
|
||
| - name: The tag names a version on main | ||
| run: | | ||
| if ! printf '%s' "$TAG" | grep -Eq '^sdks/go/v[0-9]+\.[0-9]+\.[0-9]+$'; then | ||
| echo "$TAG is not sdks/go/vX.Y.Z" | ||
| exit 1 | ||
| fi | ||
| git merge-base --is-ancestor HEAD origin/main || { echo "$TAG is not on main"; exit 1; } | ||
|
|
||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.25.0' | ||
| cache: false | ||
|
|
||
| - name: The tagged copy is tidy, vets and passes | ||
| working-directory: sdks/go | ||
| env: | ||
| GOFLAGS: '' | ||
| run: | | ||
| go mod tidy -diff | ||
| go mod verify | ||
| go vet ./... | ||
| go test -race ./... | ||
|
|
||
| consumer: | ||
| needs: check | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GOFLAGS: -mod=mod | ||
| GOPROXY: https://proxy.golang.org | ||
| GOSUMDB: sum.golang.org | ||
| GOPRIVATE: '' | ||
| GONOSUMDB: '' | ||
| GONOPROXY: '' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/tags/${{ env.TAG }} | ||
| path: source | ||
|
|
||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.25.0' | ||
| cache: false | ||
|
|
||
| - name: Install the tagged version through the proxy and build the quickstart with it | ||
| run: | | ||
| version="${TAG#sdks/go/}" | ||
| consumer="$RUNNER_TEMP/consumer" | ||
| mkdir -p "$consumer" | ||
| cd "$consumer" | ||
| go mod init example.com/consumer | ||
| cp "$GITHUB_WORKSPACE/source/sdks/go/examples/quickstart/main.go" . | ||
| # The proxy fetches a new tag on the first request and can take minutes to answer | ||
| # for it, so the first attempts may find nothing yet. | ||
| for attempt in $(seq 1 20); do | ||
| if go get "github.com/GetStream/Vision-Agents/sdks/go@$version"; then | ||
| break | ||
| fi | ||
| if [ "$attempt" = 20 ]; then | ||
| echo "proxy.golang.org never served $version" | ||
| exit 1 | ||
| fi | ||
| sleep 30 | ||
| done | ||
| go build ./... | ||
| go list -m github.com/GetStream/Vision-Agents/sdks/go |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Go SDK | ||
|
|
||
| # sdks/go here is a copy of sdks/go on accelerate, where the SDK is developed (see the | ||
| # Versioning section of sdks/go/README.md). This checks the copy the way a consumer gets it: | ||
| # alone, with no go.work, on the oldest Go its go directive allows. GOTOOLCHAIN=local keeps | ||
| # 1.25 from switching to a newer toolchain, which would prove nothing about 1.25. | ||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| paths: | ||
| - 'sdks/go/**' | ||
| - '.github/workflows/sdk-go.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'sdks/go/**' | ||
| - '.github/workflows/sdk-go.yml' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
|
bokan marked this conversation as resolved.
Resolved
|
||
| group: sdk-go-${{ github.head_ref || github.ref_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: sdks/go | ||
| env: | ||
| GOWORK: 'off' | ||
| GOTOOLCHAIN: local | ||
| GOFLAGS: '' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.25.0' | ||
| cache-dependency-path: sdks/go/go.sum | ||
|
|
||
| - name: Check formatting | ||
| run: test -z "$(gofmt -l .)" | ||
|
|
||
| - name: Check go.mod and go.sum are tidy and verified | ||
| run: | | ||
| go mod tidy -diff | ||
| go mod verify | ||
|
|
||
| - name: Vet, the end-to-end suite included | ||
| run: | | ||
| go vet ./... | ||
| go vet -tags e2e . | ||
|
|
||
| - name: Test | ||
| run: go test -race ./... | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| spec ed7c3387375e2128c9749eadf5eab87ed2e2eeac | ||
| skill 681bc49c6f0625c505a3464b8c1edc7d533469d6 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.