mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-14 05:38:51 +00:00
chore: update Go toolchain and Nix configuration
This commit is contained in:
8 files changed
+13
-12
No files matched your search
@@ -16,7 +16,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v7
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: 1.26.5
|
go-version-file: go.mod
|
||||||
- name: go fix
|
- name: go fix
|
||||||
run: |
|
run: |
|
||||||
go fix ./...
|
go fix ./...
|
||||||
|
|||||||
@@ -88,12 +88,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
|
echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
|
||||||
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
echo "GO_VERSION=1.26.5" >> $GITHUB_ENV
|
echo "GO_VERSION=$(sed -n 's/^go //p' go.mod)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v7
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GO_VERSION }}
|
go-version-file: go.mod
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Build binaries
|
- name: Build binaries
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
ARG GO_VERSION=1.26.5
|
ARG GO_VERSION=1.26.7
|
||||||
|
|
||||||
FROM docker.io/library/golang:${GO_VERSION}-alpine AS builder
|
FROM docker.io/library/golang:${GO_VERSION}-alpine AS builder
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ Download the latest binaries from the [releases](https://github.com/aykhans/sari
|
|||||||
<details>
|
<details>
|
||||||
<summary><b>Building from Source</b></summary>
|
<summary><b>Building from Source</b></summary>
|
||||||
|
|
||||||
Requires [Go 1.26+](https://golang.org/dl/).
|
Requires the [Go version declared in `go.mod`](go.mod).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/aykhans/sarin.git && cd sarin
|
git clone https://github.com/aykhans/sarin.git && cd sarin
|
||||||
|
|||||||
+3
-2
@@ -3,6 +3,8 @@ version: "3"
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
BIN_DIR: ./bin
|
BIN_DIR: ./bin
|
||||||
|
GO_VERSION:
|
||||||
|
sh: sed -n 's/^go //p' go.mod
|
||||||
GOLANGCI_LINT_VERSION: v2.13.2
|
GOLANGCI_LINT_VERSION: v2.13.2
|
||||||
GOLANGCI: "{{.BIN_DIR}}/golangci-lint-{{.GOLANGCI_LINT_VERSION}}"
|
GOLANGCI: "{{.BIN_DIR}}/golangci-lint-{{.GOLANGCI_LINT_VERSION}}"
|
||||||
|
|
||||||
@@ -87,7 +89,6 @@ tasks:
|
|||||||
vars:
|
vars:
|
||||||
IMAGE_NAME: '{{.IMAGE_NAME | default "sarin"}}'
|
IMAGE_NAME: '{{.IMAGE_NAME | default "sarin"}}'
|
||||||
TAG: '{{.TAG | default "latest"}}'
|
TAG: '{{.TAG | default "latest"}}'
|
||||||
GO_VERSION: '{{.GO_VERSION | default ""}}'
|
|
||||||
VERSION:
|
VERSION:
|
||||||
sh: git describe --tags --always
|
sh: git describe --tags --always
|
||||||
GIT_COMMIT:
|
GIT_COMMIT:
|
||||||
@@ -95,7 +96,7 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- >-
|
- >-
|
||||||
docker build
|
docker build
|
||||||
{{if .GO_VERSION}}--build-arg GO_VERSION={{.GO_VERSION}}{{end}}
|
--build-arg GO_VERSION={{.GO_VERSION}}
|
||||||
--build-arg VERSION={{.VERSION}}
|
--build-arg VERSION={{.VERSION}}
|
||||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}}
|
--build-arg GIT_COMMIT={{.GIT_COMMIT}}
|
||||||
-t {{.IMAGE_NAME}}:{{.TAG}}
|
-t {{.IMAGE_NAME}}:{{.TAG}}
|
||||||
|
|||||||
Generated
+3
-3
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1784796856,
|
"lastModified": 1788316716,
|
||||||
"narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=",
|
"narHash": "sha256-bc7rSpXIdn9QWGNqfWcPZWOhEVF8NoeAZkWq0XWnf/k=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e2587caef70cea85dd97d7daab492899902dbf5d",
|
"rev": "3ed67ec0a4d3c7ab4ae1f04f8ee8df07bfa506a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
apps = forAllSystems (pkgs: {
|
apps = forAllSystems (pkgs: {
|
||||||
default = {
|
default = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${self.packages.${pkgs.system}.default}/bin/sarin";
|
program = "${self.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/sarin";
|
||||||
meta.description = "High-performance HTTP load testing tool";
|
meta.description = "High-performance HTTP load testing tool";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user