Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 2

# Version updates use GitHub's default three-day cooldown; security fixes do not.
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
groups:
minor-and-patch:
applies-to: version-updates
update-types:
- minor
- patch
security-updates:
applies-to: security-updates
patterns:
- "*"
open-pull-requests-limit: 5

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions:
patterns:
- "*"

- package-ecosystem: docker
directory: /docker
schedule:
interval: weekly
# Keep Ubuntu digest updates; release changes are deliberate platform choices.
ignore:
- dependency-name: ubuntu
update-types:
- version-update:semver-major
- version-update:semver-minor
- version-update:semver-patch
groups:
docker:
patterns:
- "*"
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ permissions:
jobs:
test:
runs-on: ubuntu-26.04
env:
GOTOOLCHAIN: local
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: '1.27.3'
go-version-file: go.mod
cache: true
- name: SDK fixture paths
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
REF_NAME: ${{ github.ref_name }}
run: |
commit=$(git rev-parse HEAD)
go_version=$(awk '$1 == "go" {print $2}' go.mod)
release=$(< VERSION)
[[ "$release" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]] || {
echo 'VERSION must be MAJOR.MINOR.PATCH, without a v prefix, leading zeroes, prerelease suffixes, or build metadata.' >&2
Expand All @@ -72,6 +73,7 @@ jobs:
fi
{
echo "version=$version"
echo "go=$go_version"
echo "commit=$commit"
echo "epoch=$(git show -s --format=%ct HEAD)"
echo "bundle=livepeer-${version}-linux-${ARCH}"
Expand Down Expand Up @@ -105,14 +107,15 @@ jobs:
env:
RELEASE_VERSION: ${{ steps.metadata.outputs.version }}
RELEASE_COMMIT: ${{ steps.metadata.outputs.commit }}
RELEASE_GO_VERSION: ${{ steps.metadata.outputs.go }}
SOURCE_DATE_EPOCH: ${{ steps.metadata.outputs.epoch }}
BUNDLE: ${{ steps.metadata.outputs.bundle }}
run: |
mkdir -p dist "$RUNNER_TEMP/package/$BUNDLE/bin"
cp "$RUNNER_TEMP/bin/"* "$RUNNER_TEMP/package/$BUNDLE/bin/"
cp LICENSE "$RUNNER_TEMP/package/$BUNDLE/"
printf 'version=%s\ncommit=%s\ngo=go1.27.3\nos=linux\narch=%s\n' \
"$RELEASE_VERSION" "$RELEASE_COMMIT" "$ARCH" > "$RUNNER_TEMP/package/$BUNDLE/VERSION"
printf 'version=%s\ncommit=%s\ngo=go%s\nos=linux\narch=%s\n' \
"$RELEASE_VERSION" "$RELEASE_COMMIT" "$RELEASE_GO_VERSION" "$ARCH" > "$RUNNER_TEMP/package/$BUNDLE/VERSION"
(
cd "$RUNNER_TEMP/package/$BUNDLE"
sha256sum bin/* > SHA256SUMS
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ configuration.

## Build

Install Go 1.27.3 or newer, then run from the repository root:
Install the Go version declared in [go.mod](go.mod) or newer, then run from the repository root:

```sh
make build
Expand Down
6 changes: 5 additions & 1 deletion cmd/livepeer/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,12 @@ func checkGoSDK(t *testing.T, root, serviceURL, runnerURL string) {
if sdkDir == "" {
return
}
module := exec.Command("go", "list", "-m", "-f", "{{.GoVersion}}")
module.Dir = root
goVersion, err := module.Output()
require.NoError(t, err)
dir := t.TempDir()
goMod := "module sdkcompat\n\ngo 1.27.3\n\nrequire github.com/livepeer/golang-runner v0.0.0\n\nreplace github.com/livepeer/golang-runner => " + sdkDir + "\n"
goMod := fmt.Sprintf("module sdkcompat\n\ngo %s\n\nrequire github.com/livepeer/golang-runner v0.0.0\n\nreplace github.com/livepeer/golang-runner => %s\n", strings.TrimSpace(string(goVersion)), sdkDir)
require.NoError(t, os.WriteFile(filepath.Join(dir, "go.mod"), []byte(goMod), 0600))
source, err := os.ReadFile(filepath.Join(root, "cmd", "livepeer", "testdata", "go_sdk_compat.go"))
require.NoError(t, err)
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ ENV CGO_ENABLED=0 GOTOOLCHAIN=local GOENV=off GOWORK=off \
WORKDIR /src
COPY go.mod go.sum ./
RUN sha256sum go.mod go.sum > /tmp/modules.sha256 && \
test "$(go env GOVERSION)" = go1.27.3 && go mod download && go mod verify && \
test "$(go env GOVERSION)" = "go$(awk '$1 == "go" {print $2}' go.mod)" && \
go mod download && go mod verify && \
sha256sum -c /tmp/modules.sha256
COPY . .
ARG TARGETOS
Expand Down
4 changes: 3 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Development

The module requires Go 1.27.3 or newer. Build all executables with:
The minimum Go version is declared in [go.mod](../go.mod). CI and release metadata
use that version; keep the digest-pinned Go builder in `docker/Dockerfile` aligned
with it. Build all executables with:

```sh
make build
Expand Down
Loading