Skip to content
Snippets Groups Projects
Commit daa6637d authored by Reviath's avatar Reviath
Browse files

Added Makefile, .gitlab-ci.yml

parent 695b0413
Branches
No related tags found
No related merge requests found
image: golang:1.16.4
cache:
key: FeelsKappa
paths:
- build/go/
stages:
- build
build:
stage: build
script:
- GOPATH=$PWD/build/go make;
- GOPATH=$PWD/build/go GOOS=windows make;
- cd build; tar zcf go-rpc.tar.gz go-rpc go-rpc; cd ../
artifacts:
paths:
- build/go-rpc
expire_in: 1 week
Makefile 0 → 100644
.NOTPARALLEL: static-arg nowindowsgui build start
SHELL = sh
all: build
static: static-arg build
run: nowindowsgui build start
.PHONY: static-arg
static-arg:
$(eval STATIC_LDFLAGS = -extldflags "-static")
.PHONY: nowindowsgui
nowindowsgui:
$(eval WINDOW_LDFLAGS = )
.PHONY: build
build:
@echo "Building to build/remiliascarlet."
@go build -tags=jsoniter -ldflags="$(LDFLAGS) $(STATIC_LDFLAGS) $(WINDOW_LDFLAGS)" -o build/gorpc$(shell go env GOEXE) main.go
@echo "Successfully builded, ready to start."
.PHONY: start
start:
@./build/gorpc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment