-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Vyzaldy Sanchez <vyzaldysanchez@gmail.com> Co-authored-by: Frank Zhu <fr@nkzhu.com>
- Loading branch information
1 parent
53434d6
commit 2232d3a
Showing
13 changed files
with
912 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea | ||
coverage.txt | ||
output.txt |
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,104 @@ | ||
env: | ||
- GOPRIVATE=github.com/smartcontractkit/* | ||
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }} | ||
- IMAGE_REPO={{ if index .Env "IMAGE_REPO" }}{{ .Env.IMAGE_REPO }}{{ else }}localhost:5001/{{ .ProjectName }}{{ end }} | ||
|
||
# See https://goreleaser.com/customization/build/ | ||
builds: | ||
- binary: "{{ .ProjectName }}" | ||
id: linux-amd64 | ||
main: ./cmd | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=$ZIG_EXEC cc -target x86_64-linux-gnu | ||
- CCX=$ZIG_EXEC c++ -target x86_64-linux-gnu | ||
flags: | ||
- -trimpath | ||
- -buildmode=pie | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- binary: "{{ .ProjectName }}" | ||
id: linux-arm64 | ||
main: ./cmd | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=$ZIG_EXEC cc -target aarch64-linux-gnu | ||
- CCX=$ZIG_EXEC c++ -target aarch64-linux-gnu | ||
flags: | ||
- -trimpath | ||
- -buildmode=pie | ||
goos: | ||
- linux | ||
goarch: | ||
- arm64 | ||
|
||
# See https://goreleaser.com/customization/docker/ | ||
dockers: | ||
- id: linux-amd64 | ||
dockerfile: ./../Dockerfile | ||
use: buildx | ||
goos: linux | ||
goarch: amd64 | ||
build_flag_templates: | ||
- "--build-arg=app={{ .ProjectName }}" | ||
- "--platform=linux/amd64" | ||
- "--label=org.opencontainers.image.created={{ .Date }}" | ||
- "--label=org.opencontainers.image.name={{ .ProjectName }}" | ||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}" | ||
- "--label=org.opencontainers.image.version={{ .Version }}" | ||
- "--label=org.opencontainers.image.source={{ .GitURL }}" | ||
image_templates: | ||
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-amd64{{ end }}" | ||
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-amd64{{ end }}" | ||
|
||
- id: linux-arm64 | ||
dockerfile: ./../Dockerfile | ||
use: buildx | ||
goos: linux | ||
goarch: arm64 | ||
build_flag_templates: | ||
- "--build-arg=app={{ .ProjectName }}" | ||
- "--platform=linux/arm64" | ||
- "--label=org.opencontainers.image.created={{ .Date }}" | ||
- "--label=org.opencontainers.image.name={{ .ProjectName }}" | ||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}" | ||
- "--label=org.opencontainers.image.version={{ .Version }}" | ||
- "--label=org.opencontainers.image.source={{ .GitURL }}" | ||
image_templates: | ||
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-arm64{{ end }}" | ||
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-arm64{{ end }}" | ||
|
||
# See https://goreleaser.com/customization/docker_manifest/ | ||
docker_manifests: | ||
- name_template: "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}{{ end }}" | ||
image_templates: | ||
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-amd64{{ end }}" | ||
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-arm64{{ end }}" | ||
- name_template: "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}{{ end }}" | ||
image_templates: | ||
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-amd64{{ end }}" | ||
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-arm64{{ end }}" | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
|
||
# GitHub Release | ||
release: | ||
github: | ||
owner: smartcontractkit | ||
name: chainlink-feeds | ||
# If there is a prerelease suffix on the version tag (e.g. v1.0.0-rc1), then | ||
# the GitHub Release will be created as a "prerelease". | ||
# Default is false. | ||
prerelease: auto | ||
disable: true |
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,19 @@ | ||
# Requires GoReleaser Pro | ||
includes: | ||
- from_file: | ||
path: ./.goreleaser.yaml | ||
|
||
nightly: | ||
# This is a GoReleaser Pro feature that we use for pre-releases. | ||
# Default is `{{ incpatch .Version }}-{{ .ShortCommit }}-nightly`. | ||
name_template: '{{ incpatch .Version }}-{{ .ShortCommit }}-devel' | ||
|
||
# Tag name to create if publish_release is enabled. | ||
tag_name: devel | ||
|
||
# Creates a GitHub Release | ||
publish_release: false | ||
|
||
# Whether to delete previous pre-releases for the same `tag_name` when | ||
# releasing. | ||
keep_single_release: false |
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,10 @@ | ||
# Requires GoReleaser Pro | ||
includes: | ||
- from_file: | ||
path: ./.goreleaser-template.yaml | ||
|
||
project_name: chainlink-feeds | ||
|
||
monorepo: | ||
tag_prefix: chainlink-feeds@ | ||
dir: chainlink-feeds |
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,22 @@ | ||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: | ||
go build ./... | ||
|
||
.PHONY: test | ||
test: | ||
go test ./... | ||
|
||
.PHONY: test-ci | ||
test-ci: | ||
go test ./... -covermode=atomic -coverpkg=./... -coverprofile=./coverage.txt -json | tee output.txt | ||
|
||
.PHONY: lint | ||
lint: | ||
golangci-lint run ./... | ||
|
||
.PHONY: tidy | ||
tidy: | ||
go mod tidy |
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,3 @@ | ||
# Chainlink Feeds | ||
|
||
This repo contains the Chainlink feeds plugin. |
Oops, something went wrong.