Files
kopia/app/Makefile
Jarek Kowalski e2b9a81ac3 Major CI/CD refactoring and re-added support for ARM/ARM64 runners (#849)
* ci: refactored CI/CD logic & Makefile

- removed all travis CI emulation environment variables and replaced with:

CI_TAG=<empty>|tag
IS_PULL_REQUEST=false|true

- refactored all OS and architecture-specific decisions to use around standard GOOS/GOARCH values instead of uname/OS
- re-added self-hosted runner for ARMHF (3 replicas)
- added brand new self-hosted runner for ARM64 (3 replicas)
- disabled attempts to publish and sign on forks
- improved integration test log output to better see timings and sub-tests
- print longest tests (unit tests and integration) after each run
- verified that all configurations build successfully on a clone (jkowalski/kopia)
- run make setup in parallel

* testing: fixed tests on ARM and ARM64

- fixed ARM-specific alignment issue
- cleaned up test logging
- fixed huge params warning threshold because it was tripping on ARM.
- reduced test complexity to make them fit in 15 minutes
2021-02-23 00:52:54 -08:00

64 lines
1.5 KiB
Makefile

SHELL:=/bin/bash
include ../tools/tools.mk
node_modules: $(npm)
$(npm) $(npm_flags) install
electron_builder_flags:=
electron_builder_flags+=-c.extraMetadata.version=$(KOPIA_VERSION:v%=%)
electron_publish_flag:=never
ifeq ($(PUBLISH_BINARIES)/$(IS_PULL_REQUEST),true/false)
electron_publish_flag=always
ifneq ($(CI_TAG),)
# tagged release - create draft release, but don't publish
electron_builder_flags+=-c.publish.releaseType=release
electron_builder_flags+=-c.publish.owner=$(REPO_OWNER)
electron_builder_flags+=-c.publish.repo=kopia
else
# post-submit run, create a release in another repo
electron_builder_flags+=-c.publish.owner=$(REPO_OWNER)
electron_builder_flags+=-c.publish.repo=kopia-ui-release
electron_builder_flags+=-c.publish.releaseType=release
endif
else
# not running on Travis, or Travis in PR mode, don't build installer and don't publish
ifneq ($(FORCE_KOPIA_UI_SIGN),)
electron_builder_flags+=--dir
endif
endif
# empty CSC_LINK, unset completely since empty value confuses electron builder.
ifeq ($(CSC_LINK),)
unexport CSC_LINK
unexport CSC_KEY_PASSWORD
endif
ifeq ($(GOOS),windows)
# disable Kopia UI code signing on Windows.
unexport CSC_LINK
unexport CSC_KEY_PASSWORD
endif
dev: node_modules
$(npm) $(npm_flags) run dev
run: build-html
$(npm) $(npm_flags) run start-electron-prebuilt
build-html: node_modules
$(npm) $(npm_flags) run build-html
build-electron: node_modules build-html
$(npm) $(npm_flags) run build-electron -- $(electron_builder_flags) -p $(electron_publish_flag)