From 429da5fada71e7cb98a5e490a7311e4e18ae2342 Mon Sep 17 00:00:00 2001 From: Maurice Dalderup Date: Tue, 27 Aug 2019 15:14:40 +0200 Subject: [PATCH 1/3] chore(renovate): enable semantic commits --- renovate.json | 1 + 1 file changed, 1 insertion(+) diff --git a/renovate.json b/renovate.json index b17003032..3e2e14491 100644 --- a/renovate.json +++ b/renovate.json @@ -4,6 +4,7 @@ "schedule": ["on monday"], "labels": ["Renovate 🌴"], "semanticCommitType": "renovate", + "semanticCommits": true, "statusCheckVerify": true, "packageRules": [ { From 70cb4c7a21164b328b3b645deca92ee88479f106 Mon Sep 17 00:00:00 2001 From: Maurice Dalderup Date: Tue, 27 Aug 2019 15:56:28 +0200 Subject: [PATCH 2/3] chore(circleci): fix incorrect cache issue of circleci builds --- .circleci/config.yml | 119 ++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 65 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34070f725..4cfdebd47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,12 +6,12 @@ orbs: references: workspace: &workspace ~/repo - container_config: &container_config + linux_config: &linux_config docker: - image: circleci/node:10.13.0 working_directory: *workspace - win_config: &win_config + windows_config: &windows_config docker: - image: legiit/electron-builder-wine:node12 environment: @@ -24,81 +24,80 @@ references: working_directory: *workspace commands: - pre: - description: 'Setting up and building environment' - parameters: - sudo: - type: string - default: '' - windows: - type: boolean - default: false + pre-windows: + description: 'Setting up and building environment for windows' steps: - checkout - - run: chmod -R 777 ~/repo - restore_cache: keys: - - v2-dependencies-{{ arch }}-{{ checksum "package.json" }} - - v2-dependencies-{{ arch }} - - run: << parameters.sudo >> apt-get -y update - - run: << parameters.sudo >> apt-get -y install libusb-1.0-0 - - when: - condition: <> - steps: - - run: apt-get -y install libudev-dev libudev-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386 + - v2-dependencies-windows-{{ checksum "package.json" }} + - run: apt-get -y update + - run: apt-get -y install libusb-1.0-0 + - run: apt-get -y install libudev-dev libudev-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386 + - run: yarn + + pre-linux: + description: 'Setting up and building environment for linux' + steps: + - checkout + - restore_cache: + keys: + - v2-dependencies-linux-{{ checksum "package.json" }} + - run: sudo apt-get -y update + - run: sudo apt-get -y install libusb-1.0-0 + - run: yarn + + pre-mac: + description: 'Setting up and building environment for mac' + steps: + - checkout + - restore_cache: + keys: + - v2-dependencies-mac-{{ checksum "package.json" }} - run: yarn jobs: build_linux: - <<: *container_config + <<: *linux_config steps: - - pre: - sudo: 'sudo' + - pre-linux - run: yarn dist --linux - - run: chmod -R 777 ~/repo - save_cache: - key: v2-dependencies-{{ arch }}-{{ checksum "package.json" }} + key: v2-dependencies-linux-{{ checksum "package.json" }} paths: - node_modules - build_win: - <<: *win_config + build_windows: + <<: *windows_config steps: - - pre: - windows: true + - pre-windows - run: yarn dist --win --x64 --ia32 - save_cache: - key: v2-dependencies-{{ arch }}-{{ checksum "package.json" }} + key: v2-dependencies-windows-{{ checksum "package.json" }} paths: - node_modules build_mac: <<: *mac_config steps: - - checkout - - restore_cache: - keys: - - v2-dependencies-{{ arch }}-{{ checksum "package.json" }} - - v2-dependencies-{{ arch }} - - run: yarn + - pre-mac - run: yarn dist --mac - save_cache: - key: v2-dependencies-{{ arch }}-{{ checksum "package.json" }} + key: v2-dependencies-mac-{{ checksum "package.json" }} paths: - node_modules - test: - <<: *container_config + + unit_tests: + <<: *linux_config steps: - - pre: - sudo: 'sudo' + - pre-linux - run: yarn test - run: yarn codecov - codecov/upload: file: ./coverage/lcov.info - deploy_win: - <<: *win_config + deploy_windows: + <<: *windows_config steps: - - pre: - windows: true + - pre-windows - run: yarn release:win - persist_to_workspace: root: *workspace @@ -106,10 +105,9 @@ jobs: - dist/*.* deploy_linux: - <<: *container_config + <<: *linux_config steps: - - pre: - sudo: 'sudo' + - pre-linux - run: yarn release:linux - persist_to_workspace: root: *workspace @@ -119,12 +117,7 @@ jobs: deploy_mac: <<: *mac_config steps: - - checkout - - restore_cache: - keys: - - v2-dependencies-{{ arch }}-{{ checksum "package.json" }} - - v2-dependencies-{{ arch }} - - run: yarn + - pre-mac - run: yarn release:mac - persist_to_workspace: root: *workspace @@ -132,7 +125,7 @@ jobs: - ./dist/*.* calculate_checksums: - <<: *container_config + <<: *linux_config steps: - attach_workspace: at: *workspace @@ -140,26 +133,22 @@ jobs: workflows: version: 2 - build_win: - jobs: - - build_win - build_linux: + platform_builds: jobs: + - build_windows - build_linux - build_mac: - jobs: - build_mac - unit_tests: + platform_tests: jobs: - - test + - unit_tests deploy: jobs: - calculate_checksums: requires: - - deploy_win + - deploy_windows - deploy_linux - deploy_mac - - deploy_win: + - deploy_windows: filters: branches: ignore: /.*/ From 43a96e2504c98e20c62398a5ce247eddd0334761 Mon Sep 17 00:00:00 2001 From: Maurice Dalderup Date: Tue, 27 Aug 2019 17:15:56 +0200 Subject: [PATCH 3/3] chore(circleci): add fallback cache path --- .circleci/config.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4cfdebd47..88b94ff38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,8 @@ commands: - checkout - restore_cache: keys: - - v2-dependencies-windows-{{ checksum "package.json" }} + - v1-dependencies-windows-{{ checksum "package.json" }} + - v1-dependencies-windows - run: apt-get -y update - run: apt-get -y install libusb-1.0-0 - run: apt-get -y install libudev-dev libudev-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386 @@ -42,7 +43,8 @@ commands: - checkout - restore_cache: keys: - - v2-dependencies-linux-{{ checksum "package.json" }} + - v1-dependencies-linux-{{ checksum "package.json" }} + - v1-dependencies-linux - run: sudo apt-get -y update - run: sudo apt-get -y install libusb-1.0-0 - run: yarn @@ -53,7 +55,8 @@ commands: - checkout - restore_cache: keys: - - v2-dependencies-mac-{{ checksum "package.json" }} + - v1-dependencies-mac-{{ checksum "package.json" }} + - v1-dependencies-mac - run: yarn jobs: @@ -63,25 +66,27 @@ jobs: - pre-linux - run: yarn dist --linux - save_cache: - key: v2-dependencies-linux-{{ checksum "package.json" }} + key: v1-dependencies-linux-{{ checksum "package.json" }} paths: - node_modules + build_windows: <<: *windows_config steps: - pre-windows - run: yarn dist --win --x64 --ia32 - save_cache: - key: v2-dependencies-windows-{{ checksum "package.json" }} + key: v1-dependencies-windows-{{ checksum "package.json" }} paths: - node_modules + build_mac: <<: *mac_config steps: - pre-mac - run: yarn dist --mac - save_cache: - key: v2-dependencies-mac-{{ checksum "package.json" }} + key: v1-dependencies-mac-{{ checksum "package.json" }} paths: - node_modules