Skip to content

Commit 57082bc

Browse files
authored
Merge pull request #306 from roadrunner-server/release/v2025.1.7
release: v2025.1.7
2 parents 79b01fd + b0529a2 commit 57082bc

20 files changed

Lines changed: 103 additions & 154 deletions

File tree

.github/workflows/linters.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
name: Linters
2-
32
on: [push, pull_request]
4-
53
jobs:
64
golangci-lint:
75
name: Golang-CI (lint)
86
runs-on: ubuntu-latest
97
steps:
108
- name: Check out code
11-
uses: actions/checkout@v4
12-
9+
uses: actions/checkout@v6
1310
- name: Set up Go
14-
uses: actions/setup-go@v5 # action page: <https://github.com/actions/setup-go>
11+
uses: actions/setup-go@v6 # action page: <https://github.com/actions/setup-go>
1512
with:
1613
go-version: stable
17-
1814
- name: Run linter
19-
uses: golangci/golangci-lint-action@v8 # Action page: <https://github.com/golangci/golangci-lint-action>
15+
uses: golangci/golangci-lint-action@v9 # Action page: <https://github.com/golangci/golangci-lint-action>
2016
with:
2117
only-new-issues: false # show only new issues if it's a pull request
2218
args: --timeout=10m --build-tags=race

.github/workflows/linux.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Linux
2-
32
on:
43
push:
54
branches:
@@ -10,7 +9,6 @@ on:
109
schedule:
1110
# * is a special character in YAML so you have to quote this string
1211
- cron: "30 5 * * *"
13-
1412
jobs:
1513
golang:
1614
name: Build (Go ${{ matrix.go }}, OS ${{matrix.os}})
@@ -23,26 +21,21 @@ jobs:
2321
os: ["ubuntu-latest"]
2422
steps:
2523
- name: Set up Go ${{ matrix.go }}
26-
uses: actions/setup-go@v5 # action page: <https://github.com/actions/setup-go>
24+
uses: actions/setup-go@v6 # action page: <https://github.com/actions/setup-go>
2725
with:
2826
go-version: ${{ matrix.go }}
29-
3027
- name: Check out code
31-
uses: actions/checkout@v4
32-
28+
uses: actions/checkout@v6
3329
- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
34-
uses: actions/cache@v4
30+
uses: actions/cache@v5
3531
with:
3632
path: ~/go/pkg/mod
3733
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3834
restore-keys: ${{ runner.os }}-go-
39-
4035
- name: Install Go dependencies
4136
run: go mod download
42-
4337
- name: Run golang tests with coverage
4438
run: make test
45-
4639
build-sample-rr:
4740
name: Build (Go ${{ matrix.go }}, OS ${{matrix.os}})
4841
runs-on: ${{ matrix.os }}
@@ -54,23 +47,19 @@ jobs:
5447
os: ["ubuntu-latest"]
5548
steps:
5649
- name: Set up Go ${{ matrix.go }}
57-
uses: actions/setup-go@v5 # action page: <https://github.com/actions/setup-go>
50+
uses: actions/setup-go@v6 # action page: <https://github.com/actions/setup-go>
5851
with:
5952
go-version: ${{ matrix.go }}
60-
6153
- name: Check out code
62-
uses: actions/checkout@v4
63-
54+
uses: actions/checkout@v5
6455
- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
65-
uses: actions/cache@v4
56+
uses: actions/cache@v5
6657
with:
6758
path: ~/go/pkg/mod
6859
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
6960
restore-keys: ${{ runner.os }}-go-
70-
7161
- name: Install Go dependencies
7262
run: go mod download
73-
7463
- name: Build RoadRunner
7564
env:
7665
RT_TOKEN: ${{ secrets.RT_TOKEN }}

.github/workflows/release.yml

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: release
2-
32
on:
43
release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
54
types: [published]
6-
75
jobs:
86
build:
97
name: Build for ${{ matrix.os }} (${{ matrix.arch }}, ${{ matrix.compiler }})
@@ -34,54 +32,58 @@ jobs:
3432
arch: amd64
3533
steps:
3634
- name: Set up Go
37-
uses: actions/setup-go@v5
35+
uses: actions/setup-go@v6
3836
with:
3937
go-version: stable
40-
4138
- name: Check out code
42-
uses: actions/checkout@v4
43-
39+
uses: actions/checkout@v6
4440
- name: Install musl
4541
if: matrix.compiler == 'musl-gcc'
4642
run: sudo apt-get install -y musl-tools
47-
4843
- name: Download dependencies
4944
run: go mod download # `-x` means "verbose" mode
50-
5145
- name: Generate builder values
5246
id: values
5347
run: |
5448
echo "version=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//')" >> $GITHUB_OUTPUT
5549
echo "timestamp=$(echo $(date +%FT%T%z))" >> $GITHUB_OUTPUT
5650
echo "binary-name=$(echo $(echo vx`[ ${{ matrix.os }} = 'windows' ] && echo '.exe'`))" >> $GITHUB_OUTPUT
57-
5851
- name: Compile binary file
5952
env:
6053
GOOS: ${{ matrix.os }}
6154
GOARCH: ${{ matrix.arch }}
6255
CC: ${{ matrix.compiler }}
6356
CGO_ENABLED: 0
6457
LDFLAGS: >-
65-
-s
66-
-X github.com/roadrunner-server/velox/v2025/internal/version.version=${{ steps.values.outputs.version }}
67-
-X github.com/roadrunner-server/velox/v2025/internal/version.buildTime=${{ steps.values.outputs.timestamp }}
58+
-s -X github.com/roadrunner-server/velox/v2025/internal/version.version=${{ steps.values.outputs.version }} -X github.com/roadrunner-server/velox/v2025/internal/version.buildTime=${{ steps.values.outputs.timestamp }}
6859
run: |
6960
go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/vx
7061
stat "./${{ steps.values.outputs.binary-name }}"
71-
7262
- name: Generate distributive directory name
7363
id: dist-dir
7464
run: >
7565
echo "name=$(echo velox-${{ steps.values.outputs.version }}-$(
66+
67+
68+
69+
7670
[ ${{ matrix.os }} != '' ] && echo '${{ matrix.os }}' || echo 'unknown'
7771
)$(
72+
73+
74+
75+
7876
[ ${{ matrix.compiler }} = 'musl-gcc' ] && echo '-musl'
7977
))-${{ matrix.arch }}" >> $GITHUB_OUTPUT
8078
8179
- name: Generate distributive archive name
8280
id: dist-arch
8381
run: >
8482
echo "name=$(echo ${{ steps.dist-dir.outputs.name }}.$(
83+
84+
85+
86+
8587
case ${{ matrix.archiver }} in
8688
zip) echo 'zip';;
8789
tar) echo 'tar.gz';;
@@ -94,63 +96,52 @@ jobs:
9496
mkdir ${{ steps.dist-dir.outputs.name }}
9597
mv "./${{ steps.values.outputs.binary-name }}" ./${{ steps.dist-dir.outputs.name }}/
9698
cp ./README.md ./LICENSE ./velox.toml ./${{ steps.dist-dir.outputs.name }}/
97-
9899
- name: Pack distributive using tar
99100
if: matrix.archiver == 'tar'
100101
run: tar -zcf "${{ steps.dist-arch.outputs.name }}" "${{ steps.dist-dir.outputs.name }}"
101-
102102
- name: Pack distributive using zip
103103
if: matrix.archiver == 'zip'
104104
run: zip -r -q "${{ steps.dist-arch.outputs.name }}" "${{ steps.dist-dir.outputs.name }}"
105-
106105
- name: Upload artifact
107106
uses: actions/upload-artifact@v4
108107
with:
109108
name: ${{ steps.dist-dir.outputs.name }}
110109
path: ${{ steps.dist-arch.outputs.name }}
111110
if-no-files-found: error
112111
retention-days: 30
113-
114112
- name: Upload binaries to release
115113
uses: svenstaro/upload-release-action@v2
116114
with:
117115
repo_token: ${{ secrets.GITHUB_TOKEN }}
118116
file: ${{ steps.dist-arch.outputs.name }}
119117
asset_name: ${{ steps.dist-arch.outputs.name }}
120118
tag: ${{ github.ref }}
121-
122119
docker:
123120
name: Build docker image
124121
runs-on: ubuntu-latest
125122
steps:
126123
- name: Check out code
127-
uses: actions/checkout@v4
128-
124+
uses: actions/checkout@v6
129125
- name: Set up QEMU
130126
uses: docker/setup-qemu-action@v3 # Action page: <https://github.com/docker/setup-qemu-action>
131-
132127
- name: Set up Docker Buildx
133128
uses: docker/setup-buildx-action@v3 # Action page: <https://github.com/docker/setup-buildx-action>
134-
135129
- name: Login to Docker Hub
136130
uses: docker/login-action@v3
137131
with:
138132
username: ${{ secrets.DOCKER_LOGIN }}
139133
password: ${{ secrets.DOCKER_PASSWORD }}
140-
141134
- name: Login to GitHub Container Registry
142135
uses: docker/login-action@v3
143136
with:
144137
registry: ghcr.io
145138
username: ${{ secrets.GHCR_LOGIN }}
146139
password: ${{ secrets.GHCR_PASSWORD }}
147-
148140
- name: Generate builder values
149141
id: values
150142
run: |
151143
echo "version=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//')" >> $GITHUB_OUTPUT
152144
echo "timestamp=$(echo $(date +%FT%T%z))" >> $GITHUB_OUTPUT
153-
154145
- name: Build image
155146
uses: docker/build-push-action@v6 # Action page: <https://github.com/docker/build-push-action>
156147
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
**/plugins_dev.toml
2121
.vscode
2222
rr
23-
vx
23+
/vx

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ linters:
5151
simple: true
5252
range-loops: true
5353
for-loops: true
54+
revive:
55+
enable-default-rules: true
56+
rules:
57+
- name: var-naming
58+
disabled: true
5459
wsl:
5560
allow-assign-and-anything: true
5661
exclusions:

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://docs.docker.com/buildx/working-with-buildx/
22
# TARGETPLATFORM if not empty OR linux/amd64 by default
3-
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.25-alpine AS builder
3+
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.26-alpine AS builder
44

55
# app version and build date must be passed during image building (version without any prefix).
66
# e.g.: `docker build --build-arg "APP_VERSION=1.2.3" --build-arg "BUILD_TIME=$(date +%FT%T%z)" .`
@@ -12,8 +12,8 @@ WORKDIR /src
1212

1313
# arguments to pass on each go tool link invocation
1414
ENV LDFLAGS="-s \
15-
-X github.com/roadrunner-server/velox/v2025/internal/version.version=$APP_VERSION \
16-
-X github.com/roadrunner-server/velox/v2025/internal/version.buildTime=$BUILD_TIME"
15+
-X github.com/roadrunner-server/velox/v2025/internal/version.version=$APP_VERSION \
16+
-X github.com/roadrunner-server/velox/v2025/internal/version.buildTime=$BUILD_TIME"
1717

1818
# verbose
1919
RUN set -x
@@ -22,21 +22,21 @@ RUN go mod tidy
2222

2323
RUN CGO_ENABLED=0 go build -trimpath -ldflags "$LDFLAGS" -o ./velox ./cmd/vx
2424

25-
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.25-alpine
25+
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.26-alpine
2626

2727
# use same build arguments for image labels
2828
ARG APP_VERSION="undefined"
2929
ARG BUILD_TIME="undefined"
3030

3131
LABEL \
32-
org.opencontainers.image.title="velox" \
33-
org.opencontainers.image.description="Automated build system for the RR and roadrunner-plugins" \
34-
org.opencontainers.image.url="https://roadrunner.dev" \
35-
org.opencontainers.image.source="https://github.com/roadrunner-server/velox" \
36-
org.opencontainers.image.vendor="SpiralScout" \
37-
org.opencontainers.image.version="$APP_VERSION" \
38-
org.opencontainers.image.created="$BUILD_TIME" \
39-
org.opencontainers.image.licenses="MIT"
32+
org.opencontainers.image.title="velox" \
33+
org.opencontainers.image.description="Automated build system for the RR and roadrunner-plugins" \
34+
org.opencontainers.image.url="https://roadrunner.dev" \
35+
org.opencontainers.image.source="https://github.com/roadrunner-server/velox" \
36+
org.opencontainers.image.vendor="SpiralScout" \
37+
org.opencontainers.image.version="$APP_VERSION" \
38+
org.opencontainers.image.created="$BUILD_TIME" \
39+
org.opencontainers.image.licenses="MIT"
4040

4141
# copy required files from builder image
4242
COPY --from=builder /src/velox /usr/bin/vx

builder/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func (b *Builder) getDepsReplace(repl string) []*templates.Entry {
332332
return nil
333333
}
334334

335-
var result []*templates.Entry //nolint:prealloc
335+
var result []*templates.Entry
336336
replaces := replaceRegexp.FindAllStringSubmatch(string(modFile), -1)
337337
for i := range replaces {
338338
split := strings.Split(strings.TrimSpace(replaces[i][0]), " => ")

builder/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Package builder builds RoadRunner binaries with selected plugins and target platform options.
2+
package builder

builder/templates/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Package templates provides template data structures and compilers for generated RoadRunner sources.
2+
package templates

builder/templates/templateV2025.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import (
88
const GoModTemplateV2025 string = `
99
module github.com/roadrunner-server/roadrunner/{{.ModuleVersion}}
1010
11-
go 1.25.4
11+
go 1.26
1212
1313
require (
14-
github.com/olekukonko/tablewriter v1.1.0
14+
github.com/olekukonko/tablewriter v1.1.3
1515
github.com/buger/goterm v1.0.4
1616
github.com/dustin/go-humanize v1.0.1
1717
github.com/fatih/color v1.18.0
1818
github.com/joho/godotenv v1.5.1
19-
github.com/spf13/cobra v1.10.1
19+
github.com/spf13/cobra v1.10.2
2020
github.com/spf13/viper v1.21.0
21-
github.com/stretchr/testify v1.10.0
21+
github.com/stretchr/testify v1.11.1
2222
github.com/roadrunner-server/informer/v5 latest
2323
github.com/roadrunner-server/resetter/v5 latest
2424
github.com/roadrunner-server/config/v5 latest

0 commit comments

Comments
 (0)