-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: goreleaser develop build for local and CI (#11847)
* add updated goreleaser templates * update zig 0.11.0 * update goreleaser develop * add back ldflags and rename goreleaser config file * update goreleaser build gha workflow and pin new versions * add back pre/post hooks and updated goreleaser Dockerfile to include LOOP plugins * comment out integration-tests * add back goreleaser_wrapper * fix path in goreleaser_utils * add multi-line json output support * save * revert everthing and add go mod tidy * revert zig and goreleaser config * update * zig 0.10.1 * update go.mod go version * add -shared in goreleaser * use zig 0.11.0 and update bash fail * add to cc * update name * test * test * add LD_LIBRARY_PATH in dockerfile * add _transform_path func * fix post-hook cp * remove post hooks * use zig * use older zig version * try zig 0.12.0-dev * add back posthook * use zig 0.10.1 again * update go.mod to 1.21.5 * try older zig version * another older zig version * add ldd_fix script with patchelf * uncomment * add comments and remove unnecessary * update go.mod version * update go.mod to 1.21.7 for core/scripts * update all go.mod to 1.21.7 and remove artifact outputs
- Loading branch information
1 parent
3aa93b2
commit b588371
Showing
12 changed files
with
64 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,8 +1,8 @@ | ||
golang 1.21.5 | ||
golang 1.21.7 | ||
mockery 2.38.0 | ||
nodejs 16.16.0 | ||
postgres 13.3 | ||
helm 3.10.3 | ||
zig 0.10.1 | ||
zig 0.11.0 | ||
golangci-lint 1.55.2 | ||
protoc 25.1 |
This file contains 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 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 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 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,6 +1,6 @@ | ||
module github.com/smartcontractkit/chainlink/v2 | ||
|
||
go 1.21.3 | ||
go 1.21.7 | ||
|
||
require ( | ||
github.com/Depado/ginprom v1.8.0 | ||
|
This file contains 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,4 +1,4 @@ | ||
golang 1.21.5 | ||
golang 1.21.7 | ||
k3d 5.4.6 | ||
kubectl 1.25.5 | ||
nodejs 18.13.0 | ||
|
This file contains 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 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,27 @@ | ||
#!/usr/bin/env bash | ||
# This script is used as a temp fix the ldd linking of cosm lib for binary | ||
# Currently there is an issue with the go linker not working with zig | ||
# https://github.com/ziglang/zig/issues/18922 | ||
|
||
chainlink_path="/usr/local/bin/chainlink" | ||
libs_path="/usr/local/bin/libs" | ||
|
||
line=$(ldd ${chainlink_path} | grep "github.com/!cosm!wasm/wasmvm") | ||
|
||
if [ -z "$line" ]; then | ||
echo "Error: Path containing 'github.com/!cosm!wasm/wasmvm' not found in the ldd output." | ||
exit 1 | ||
fi | ||
|
||
path=$(echo "$line" | awk '{print $1}') | ||
|
||
if [ -z "$path" ]; then | ||
echo "Error: Failed to extract the path from the line." | ||
exit 1 | ||
fi | ||
|
||
trimmed_path=${path%.so*}.so | ||
cosm_file=$(ls ${libs_path} | grep "\.so$" | head -n 1) | ||
|
||
patchelf --remove-needed "${trimmed_path}" "$chainlink_path" | ||
patchelf --add-needed "$cosm_file" "$chainlink_path" |
b588371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢提供代码。这是一大段配置文件和脚本,看起来是一个GitHub Actions工作流,用于构建、签名和发布Go项目。下面是对其中的修改和建议:
更新依赖版本:
将 "goreleaser" 的默认版本从 "1.15.2" 更新为 "1.23.0"。
将 "zig" 的默认版本从 "0.10.1" 更新为 "0.11.0"。
将 "cosign" 的默认版本从 "v1.13.1" 更新为 "v3.3.0"。
修复脚本:
在 .github/actions/goreleaser-build-sign-publish/action_utils 文件的开头,修复 ENABLE_COSIGN 和 ENABLE_GORELEASER_SNAPSHOT 变量的定义。可能是因为变量名没有加上 $ 符号。
删除不必要的 echo 语句,这些语句可能是误输入的。
更新工具版本:
更新 "Go" 版本至 "1.21.7"。
更新 "Zig" 版本至 "0.11.0"。
更新 "Node.js" 版本至 "18.13.0"。
更新 "PostgreSQL" 版本至 "13.3"。
修复链式删除:
在 .github/workflows/goreleaser-build-publish-develop.yml 文件中,更新 "Zig" 版本到 "0.11.0"。
删除 ".github/actions/goreleaser-build-sign-publish/action_utils" 文件中的一些无关的语句。
修复工具版本:
在 .工具版本 文件中,将 "Zig" 版本更新为 "0.11.0"。
修复 Dockerfile:
在 核心/chainlink.Dockerfile 和 核心/chainlink.goreleaser.Dockerfile 文件中,将 "PostgreSQL" 版本更新为 "15"。
删除不必要的 rm -rf 语句。
修复 go.mod 文件:
在 核心/脚本/go.mod 文件中,将 "Go" 版本更新为 "1.21.7"。
在 go.mod 文件中,将 "Go" 版本更新为 "1.21.7"。
修复集成测试版本:
在 集成测试/.工具版本 文件中,将 "Node.js" 版本更新为 "18.13.0"。
修复集成测试 go.mod 文件:
在 集成测试/go.mod 文件中,将 "Go" 版本更新为 "1.21.7"。
修复脚本:
在 工具/bin/ldd_fix 文件中,修复脚本错误,确保 chainlink_path 和 libs_path 的定义不包含空格。
请确保在应用这些更改之前备份代码,并根据您的需求进行适当的测试。希望这些建议对您有帮助!