Skip to content

Commit

Permalink
revert everthing and add go mod tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
momentmaker committed Jan 26, 2024
1 parent 43d13a9 commit 8dc6294
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 242 deletions.
199 changes: 0 additions & 199 deletions .goreleaser.develop.local.yaml

This file was deleted.

31 changes: 13 additions & 18 deletions .goreleaser.develop.ci.yaml → .goreleaser.develop.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# For building binaries in github actions CI
## goreleaser <1.14.0
project_name: chainlink

env:
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }}
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }}
- IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}localhost:5001{{ end }}
- IMAGE_LABEL_DESCRIPTION="node of the decentralized oracle network, bridging on and off-chain computation"
- IMAGE_LABEL_LICENSES="MIT"
Expand All @@ -15,8 +15,8 @@ before:

# See https://goreleaser.com/customization/build/
builds:
- id: linux-arm64
binary: "{{ .ProjectName }}"
- binary: chainlink
id: linux-arm64
goos:
- linux
goarch:
Expand All @@ -34,9 +34,8 @@ builds:
- -s -w -r=$ORIGIN/libs
- -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.CHAINLINK_VERSION }}
- -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }}

- id: linux-amd64
binary: "{{ .ProjectName }}"
- binary: chainlink
id: linux-amd64
goos:
- linux
goarch:
Expand Down Expand Up @@ -64,8 +63,6 @@ dockers:
goarch: amd64
extra_files:
- tmp/linux_amd64/libs
- tmp/linux_amd64/chainlink-feeds
- tmp/linux_amd64/chainlink-solana
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
Expand All @@ -81,16 +78,13 @@ dockers:
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop-root-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}-root-amd64"

- id: root-linux-arm64
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: arm64
extra_files:
- tmp/linux_arm64/libs
- tmp/linux_arm64/chainlink-feeds
- tmp/linux_arm64/chainlink-solana
build_flag_templates:
- "--platform=linux/arm64"
- "--pull"
Expand All @@ -106,16 +100,13 @@ dockers:
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop-root-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}-root-arm64"

- id: linux-amd64
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: amd64
extra_files:
- tmp/linux_amd64/libs
- tmp/linux_amd64/chainlink-feeds
- tmp/linux_amd64/chainlink-solana
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
Expand All @@ -132,16 +123,13 @@ dockers:
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}-amd64"

- id: linux-arm64
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: arm64
extra_files:
- tmp/linux_arm64/libs
- tmp/linux_arm64/chainlink-feeds
- tmp/linux_arm64/chainlink-solana
build_flag_templates:
- "--platform=linux/arm64"
- "--pull"
Expand Down Expand Up @@ -183,6 +171,13 @@ docker_signs:
- artifacts: all
stdin: "{{ .Env.COSIGN_PASSWORD }}"

archives:
- rlcp: true
files:
- src: tmp/{{ .Os }}_{{ .Arch }}/libs/*
dst: libs
strip_parent: true

checksum:
name_template: "checksums.txt"

Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ mockery 2.38.0
nodejs 16.16.0
postgres 13.3
helm 3.10.3
zig 0.11.0
zig 0.10.1
golangci-lint 1.55.2
3 changes: 0 additions & 3 deletions core/chainlink.goreleaser.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
COPY ./chainlink /usr/local/bin/
# Copy native libs if cgo is enabled
COPY ./tmp/linux_${TARGETARCH}/libs /usr/local/bin/libs
# Copy LOOP plugins
COPY ./tmp/linux_${TARGETARCH}/chainlink-feeds /usr/local/bin/
COPY ./tmp/linux_${TARGETARCH}/chainlink-solana /usr/local/bin/

RUN if [ ${CHAINLINK_USER} != root ]; then \
useradd --uid 14933 --create-home ${CHAINLINK_USER}; \
Expand Down
21 changes: 0 additions & 21 deletions tools/bin/goreleaser_utils
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ _get_wasmvm_lib_path() {
echo "$shared_lib_dir/${lib_name}.$lib_extension"
}

# install LOOP plugins
_install_plugins() {
go_path=$(go env GOPATH)
go mod download
make install-chainlink
go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds | xargs -I % ln -s % ./chainlink-feeds
go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-solana | xargs -I % ln -s % ./chainlink-solana
cd chainlink-feeds && go install ./cmd/chainlink-feeds && cd ..
cd chainlink-solana && go install ./pkg/solana/cmd/chainlink-solana && cd ..
}

# global goreleaser before hook
# moves native libraries to temp directories used by docker images / archives
before_hook() {
Expand All @@ -66,20 +55,12 @@ before_hook() {

mkdir -p "$lib_path/linux_amd64/libs"
cp -f "$wasmvm_lib_path_linux_amd64" "$lib_path/linux_amd64/libs"
# cp -f "$go_path/bin/chainlink-feeds" "$lib_path/linux_amd64/chainlink-feeds"
# cp -f "$go_path/bin/chainlink-solana" "$lib_path/linux_amd64/chainlink-solana"
mkdir -p "$lib_path/linux_arm64/libs"
cp -f "$wasmvm_lib_path_linux_arm64" "$lib_path/linux_arm64/libs"
# cp -f "$go_path/bin/chainlink-feeds" "$lib_path/linux_arm64/chainlink-feeds"
# cp -f "$go_path/bin/chainlink-solana" "$lib_path/linux_arm64/chainlink-solana"
mkdir -p "$lib_path/darwin_amd64/libs"
cp -f "$wasmvm_lib_path_darwin_amd64" "$lib_path/darwin_amd64/libs"
# cp -f "$go_path/bin/chainlink-feeds" "$lib_path/darwin_amd64/chainlink-feeds"
# cp -f "$go_path/bin/chainlink-solana" "$lib_path/darwin_amd64/chainlink-solana"
mkdir -p "$lib_path/darwin_arm64/libs"
cp -f "$wasmvm_lib_path_darwin_arm64" "$lib_path/darwin_arm64/libs"
# cp -f "$go_path/bin/chainlink-feeds" "$lib_path/darwin_arm64/chainlink-feeds"
# cp -f "$go_path/bin/chainlink-solana" "$lib_path/darwin_arm64/chainlink-solana"
}

# binary build post hook
Expand All @@ -93,8 +74,6 @@ build_post_hook() {
local -r wasmvm_lib_path=$(_get_wasmvm_lib_path "$platform" "$arch")
mkdir -p "$lib_path"
cp "$wasmvm_lib_path" "$lib_path"
# cp "tmp/${platform}_${arch}/chainlink-feeds" "$dist_path"
# cp "tmp/${platform}_${arch}/chainlink-solana" "$dist_path"
}

"$@"

0 comments on commit 8dc6294

Please sign in to comment.