Skip to content

Commit 5131395

Browse files
authored
Merge pull request #55 from stefannica/fuseml-cli
Rename fuseml_core-cli fuseml and create release archives
2 parents 7b3691f + f8aa263 commit 5131395

File tree

6 files changed

+29
-20
lines changed

6 files changed

+29
-20
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
target: ["all", "test"]
15+
target: ["release", "test"]
1616
steps:
1717
- uses: actions/checkout@v2
1818

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ jobs:
3232
- name: Build binaries
3333
if: steps.branch.outputs.BRANCH_NAME == 'main'
3434
run: |
35-
make all
36-
- name: Create CHECKSUMS
37-
if: steps.branch.outputs.BRANCH_NAME == 'main'
38-
run: ( cd bin; sha256sum -b fuseml_core* > SHA256SUM.txt )
35+
make release
3936
- name: Generate Changelog
4037
uses: heinrichreimer/[email protected]
4138
with:

Makefile

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ else
88
GOBIN=$(shell go env GOBIN)
99
endif
1010

11+
GOOS:=$(shell go env GOOS)
12+
GOARCH:=$(shell go env GOARCH)
13+
1114
GO_LDFLAGS:=-ldflags '-s -w'
1215

13-
all: fuseml_all
16+
all: fuseml
1417

1518
# Run tests
1619
test: generate lint
@@ -19,34 +22,43 @@ test: generate lint
1922
# Generate code, run linter and build FuseML binaries
2023
fuseml: generate lint build
2124

22-
fuseml_all: generate lint build_all
23-
24-
build: build_server build_client_local
25+
# Generate code, run linter, build FuseML release-ready archived binaries for all supported ARCHs and OSs
26+
release: generate lint release_all
2527

26-
build_all: build_server build_client-amd64 build_client-windows build_client-darwin-amd64
28+
build: build_server build_client
2729

2830
build_server:
2931
go build ${GO_LDFLAGS} -o bin/fuseml_core ./cmd/fuseml_core
3032

31-
build_client_local:
32-
go build ${GO_LDFLAGS} -o bin/fuseml_core-cli ./cmd/fuseml_core-cli
33+
build_client:
34+
GOOS=$(GOOS) GOARCH=$(GOARCH) go build ${GO_LDFLAGS} -o bin/fuseml ./cmd/fuseml_cli
35+
36+
release_all: server_release client_release-amd64 client_release-windows client_release-darwin-amd64
37+
38+
server_release: build_server
39+
tar zcf bin/fuseml_core.tar.gz -C bin/ --remove-files --transform="s#\.\/##" ./fuseml_core
40+
cd bin && sha256sum -b fuseml_core.tar.gz > fuseml_core.tar.gz.sha256
41+
42+
client_release: build_client
43+
tar zcf bin/fuseml-$(GOOS)-$(GOARCH).tar.gz -C bin/ --remove-files --transform="s#\.\/##" ./fuseml
44+
cd bin && sha256sum -b fuseml-$(GOOS)-$(GOARCH).tar.gz > fuseml-$(GOOS)-$(GOARCH).tar.gz.sha256
3345

34-
build_client-amd64:
35-
GOARCH="amd64" GOOS="linux" go build ${GO_LDFLAGS} -o bin/fuseml_core-cli-linux-amd64 ./cmd/fuseml_core-cli
46+
client_release-amd64:
47+
$(MAKE) GOARCH="amd64" GOOS="linux" client_release
3648

37-
build_client-windows:
38-
GOARCH="amd64" GOOS="windows" go build ${GO_LDFLAGS} -o bin/fuseml_core-cli-windows-amd64 ./cmd/fuseml_core-cli
49+
client_release-windows:
50+
$(MAKE) GOARCH="amd64" GOOS="windows" client_release
3951

40-
build_client-darwin-amd64:
41-
GOARCH="amd64" GOOS="darwin" go build ${GO_LDFLAGS} -o bin/fuseml_core-cli-darwin-amd64 ./cmd/fuseml_core-cli
52+
client_release-darwin-amd64:
53+
$(MAKE) GOARCH="amd64" GOOS="darwin" client_release
4254

4355
# Run fuseml_core
4456
runcore: generate lint
4557
go run ./cmd/fuseml_core
4658

47-
# Run fuseml_core-cli
59+
# Run fuseml_cli
4860
runcli: generate lint
49-
go run ./cmd/fuseml_core-cli
61+
go run ./cmd/fuseml_cli
5062

5163
# Generate code
5264
generate:
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)