Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update release pipeline to match non-wasm env #901

Merged
merged 6 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
make release
env:
GORELEASER_MOUNT_CONFIG: true
GORELEASER_IMAGE: line/goreleaserx-wasm:1.0.0-0.10.0
GORELEASER_IMAGE: line/goreleaserx:1.13.1-1.19.3
GORELEASER_RELEASE: true
BUILD_TAGS: static
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,62 @@ builds:
- amd64
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
- "-tags={{ .Env.BUILD_TAGS }}"
ldflags:
- "{{ .Env.BUILD_VARS }}"

- id: simd-linux-arm64
main: ./simapp/simd
binary: simd
goos:
- linux
goarch:
- arm64
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
- "-tags={{ .Env.BUILD_TAGS }}"
ldflags:
- "{{ .Env.BUILD_VARS }}"

- id: simd-darwin-amd64
main: ./simapp/simd
binary: simd
goos:
- darwin
goarch:
- amd64
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
flags:
- -mod=readonly
- -trimpath
- "-tags={{ .Env.BUILD_TAGS }}"
ldflags:
- "{{ .Env.BUILD_VARS }}"

- id: simd-darwin-arm64
main: ./simapp/simd
binary: simd
goos:
- darwin
goarch:
- arm64
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
flags:
- -mod=readonly
- -trimpath
Expand All @@ -23,6 +79,9 @@ archives:
id: bin-archive
builds:
- simd-linux-amd64
- simd-linux-arm64
- simd-darwin-amd64
- simd-darwin-arm64
format: tar.gz
name_template: "simd_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Build, CI
* (ci) [\#829](https://github.com/line/lbm-sdk/pull/829) automate release process
* (build) [\#872](https://github.com/line/lbm-sdk/pull/872) Retract v1.0.0
* (ci, build) [\#901](https://github.com/line/lbm-sdk/pull/901) Update release pipeline to match non-wasm env

### Document Updates
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,12 @@ libsodium:
GORELEASER_CONFIG ?= .goreleaser.yml

GORELEASER_BUILD_LDF = $(ldflags)
GORELEASER_BUILD_LDF += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
GORELEASER_BUILD_LDF := $(strip $(GORELEASER_BUILD_LDF))

GORELEASER_SKIP_VALIDATE ?= false
GORELEASER_DEBUG ?= false
GORELEASER_IMAGE ?= line/goreleaserx-wasm:1.0.0-0.10.0
GORELEASER_IMAGE ?= line/goreleaserx:1.13.1-1.19.3
GORELEASER_RELEASE ?= false
#GO_MOD_NAME := $(shell go list -m 2>/dev/null)
GO_MOD_NAME := github.com/line/lbm-sdk

ifeq ($(GORELEASER_RELEASE),true)
Expand Down Expand Up @@ -613,6 +611,7 @@ release-snapshot:
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--debug=$(GORELEASER_DEBUG) \
--rm-dist

release:
docker run --rm \
-e BUILD_TAGS="$(build_tags)" \
Expand All @@ -629,7 +628,4 @@ release:
--debug=$(GORELEASER_DEBUG) \
--rm-dist

build-static: go.sum
CGO_ENABLED=1 go build -mod=readonly -tags "$(build_tags)" -ldflags '$(GORELEASER_BUILD_LDF)' -trimpath -o ./build/ ./...

.PHONY: release-snapshot release build-static
.PHONY: release-snapshot release