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

Facing build issues in mac and windows #19

Open
praveenrudhraboina opened this issue Feb 9, 2024 · 1 comment
Open

Facing build issues in mac and windows #19

praveenrudhraboina opened this issue Feb 9, 2024 · 1 comment

Comments

@praveenrudhraboina
Copy link

Can anyone suggest or update readme which version of bazel and go to be used to have a local setup and run the instance.I am facing compataibility issues with go 1.22.0 and bazel 7.3.0 homebrew version

@gedw99
Copy link

gedw99 commented Aug 27, 2024

SRC=$(PWD)

BIN_ROOT=$(PWD)/.bin
#export PATH:=$(BIN_ROOT):$(PATH)

export LOCAL_DIR=$(PWD)

GEN_BIN_NAME=generator
GEN_CMD=./$(GEN_BIN_NAME)
SIM_BIN_NAME=simulator
SIM_CMD=./$(SIM_BIN_NAME)

all: init bin run-sim

init:
	# only run once !!
	cd cmd/generator && go mod init generator
	cd cmd/generator && go mod tidy
	cd cmd/simulator && go mod init simulator
	cd cmd/simulator && go mod tidy
bin:
	mkdir -p $(BIN_ROOT)
	cd cmd/generator && go build -o $(BIN_ROOT)/$(GEN_BIN_NAME) .
	cd cmd/simulator && go build -o $(BIN_ROOT)/$(SIM_BIN_NAME) .

	cp $(BIN_ROOT)/$(GEN_BIN_NAME) $(SRC)
	cp $(BIN_ROOT)/$(SIM_BIN_NAME) $(SRC)
bin-del:
	rm -f $(SRC)/$(GEN_BIN_NAME)
	rm -f $(SRC)/$(SIM_BIN_NAME)

test:
	cd cmd/generator && go test -v ./...
	#cd cmd/generator && go test -bench=.

	cd cmd/simulator && go test -v --local_path=$(LOCAL_DIR) .
	#cd cmd/simulator && go test -bench=.


run-docker:
	docker run --rm -it -p 8000:8000 eu.gcr.io/simhospital-images/simhospital:latest health/simulator

run-gen-h:
	$(GEN_CMD) -h
run-gen:
	$(GEN_CMD)

run-sim-h:
	$(SIM_CMD) -h
run-sim:
	# http://localhost:8000/simulated-hospital/
	$(SIM_CMD) -log_level=DEBUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants