"include/ck/utility/workgroup_barrier.hpp" did not exist on "9195435c77b17d554fb80086686746fa20106f76"
Makefile 1.41 KB
Newer Older
1
2
CWD := $(PWD)/

3
4
5
6
7
8
9
10
11
12
13
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
	OS_SPEC := linux
	WHEEL_SPEC := manylinux1_x86_64
else ifeq ($(UNAME_S), Darwin)
	OS_SPEC := darwin
	WHEEL_SPEC := macosx_10_9_x86_64
else 
	$(error platform $(UNAME_S) not supported)
endif

goooxu's avatar
goooxu committed
14
15
NNI_VERSION_VALUE = $(shell git describe --tags)
NNI_VERSION_TEMPLATE = 999.0.0-developing
Gems Guo's avatar
Gems Guo committed
16

17
18
.PHONY: build
build:
Gems Guo's avatar
Gems Guo committed
19
	python3 -m pip install --user --upgrade setuptools wheel
20
21
22
23
	wget https://aka.ms/nni/nodejs-download/$(OS_SPEC) -O $(CWD)node-$(OS_SPEC)-x64.tar.xz
	rm -rf $(CWD)node-$(OS_SPEC)-x64
	mkdir $(CWD)node-$(OS_SPEC)-x64
	tar xf $(CWD)node-$(OS_SPEC)-x64.tar.xz -C node-$(OS_SPEC)-x64 --strip-components 1
24
25
	cd $(CWD)../../src/nni_manager && yarn && yarn build
	cd $(CWD)../../src/webui && yarn && yarn build
26
27
28
29
	rm -rf $(CWD)nni
	cp -r $(CWD)../../src/nni_manager/dist $(CWD)nni
	cp -r $(CWD)../../src/webui/build $(CWD)nni/static
	cp $(CWD)../../src/nni_manager/package.json $(CWD)nni
goooxu's avatar
goooxu committed
30
	sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' $(CWD)nni/package.json
31
	cd $(CWD)nni && yarn --prod
goooxu's avatar
goooxu committed
32
	cd $(CWD) && sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' setup.py && python3 setup.py bdist_wheel -p $(WHEEL_SPEC)
33
	cd $(CWD)
34
35
36

.PHONY: upload
upload:
Gems Guo's avatar
Gems Guo committed
37
	python3 -m pip install --user --upgrade twine
38
39
40
41
	python3 -m twine upload dist/*

.PHONY: clean
clean:
Gems Guo's avatar
Gems Guo committed
42
43
44
45
46
	rm -rf $(CWD)build
	rm -rf $(CWD)dist
	rm -rf $(CWD)nni
	rm -rf $(CWD)nni.egg-info
	rm -rf $(CWD)node-$(OS_SPEC)-x64