|
1 | | -version: 2 |
2 | | -jobs: |
3 | | - build-node-common: &common-build |
4 | | - docker: |
5 | | - # The docker section here is not used, but required |
6 | | - - image: circleci/node:8.9.3 |
7 | | - |
| 1 | +aliases: |
| 2 | + - &publish-command |
| 3 | + name: Publish |
| 4 | + command: | |
| 5 | + COMMIT_MESSAGE=`git log --format=%s -n 1 $CIRCLE_SHA1` |
| 6 | + ./node_modules/.bin/node-pre-gyp rebuild package testpackage $PRE_GYP_ARGS |
| 7 | + if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then |
| 8 | + ./node_modules/.bin/node-pre-gyp package testpackage $PRE_GYP_ARGS |
| 9 | + ./node_modules/.bin/node-pre-gyp publish $PRE_GYP_ARGS |
| 10 | + else |
| 11 | + echo "Not a tagged build - not publishing" |
| 12 | + fi |
| 13 | +
|
| 14 | + - &common-build |
8 | 15 | working_directory: ~/repo |
9 | | - |
10 | 16 | steps: |
11 | 17 | - checkout |
12 | 18 | # Install git-lfs (not part of the standard Docker images) |
13 | 19 | - run: curl -sSL https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash && sudo apt-get update && sudo apt-get install -y git-lfs && git-lfs install --force && git-lfs pull |
14 | 20 | - run: npm install --build-from-source |
15 | 21 |
|
16 | 22 | - run: npm run test |
17 | | - - run: &publish-command |
18 | | - name: Publish |
19 | | - command: | |
20 | | - COMMIT_MESSAGE=`git log --format=%s -n 1 $CIRCLE_SHA1` |
21 | | - if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then |
22 | | - ./node_modules/.bin/node-pre-gyp package testpackage $PRE_GYP_ARGS |
23 | | - ./node_modules/.bin/node-pre-gyp publish $PRE_GYP_ARGS |
24 | | - else |
25 | | - echo "Not a tagged build - not publishing" |
26 | | - fi |
| 23 | + - run: *publish-command |
27 | 24 |
|
28 | 25 |
|
29 | | - build-9.3.0: |
30 | | - <<: *common-build |
| 26 | + - &common-electron-linux |
31 | 27 | docker: |
32 | | - - image: circleci/node:9.3.0 |
33 | | - |
34 | | - build-8.9.3: |
35 | | - <<: *common-build |
36 | | - docker: |
37 | | - - image: circleci/node:8.9.3 |
38 | | - |
39 | | - build-7.9.0: |
40 | | - <<: *common-build |
41 | | - docker: |
42 | | - - image: circleci/node:7.9.0 |
43 | | - |
44 | | - build-electron: |
45 | | - docker: |
46 | | - - image: circleci/node:8.9.3 |
| 28 | + - image: circleci/node:10.5.0 |
47 | 29 |
|
48 | 30 | working_directory: ~/repo |
49 | | - environment: |
50 | | - PRE_GYP_ARGS: --runtime=electron --target=1.7.9 |
51 | 31 |
|
52 | 32 | steps: |
53 | 33 | - checkout |
54 | 34 | # Install git-lfs (not part of the standard Docker images) |
55 | 35 | - run: curl -sSL https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash && sudo apt-get update && sudo apt-get install -y git-lfs && git-lfs install --force && git-lfs pull |
56 | 36 | # These are required for electron(-mocha) |
57 | | - - run: sudo apt-get install -y libgtk2.0-0 libxtst6 libxss1 libgconf2-4 libnss3 libasound2 |
| 37 | + - run: sudo apt-get install -y libgtk2.0-0 libgtk-3-dev libxtst6 libxss1 libgconf2-4 libnss3 libasound2 |
58 | 38 | - run: npm install --build-from-source |
59 | 39 | - run: ./node_modules/.bin/electron-rebuild |
60 | 40 | - run: npm run pretest |
61 | 41 | - run: xvfb-run ./node_modules/.bin/electron-mocha --timeout 480000 |
62 | | - - run: |
63 | | - <<: *publish-command |
| 42 | + - run: *publish-command |
64 | 43 |
|
65 | | - build-macos: |
| 44 | + |
| 45 | + - &common-macos |
66 | 46 | macos: |
67 | 47 | xcode: "9.1.0" # Node 8.9.0 |
68 | | - |
69 | 48 | steps: |
70 | 49 | - checkout |
71 | | - - run: brew install git-lfs openssl |
| 50 | + - run: | |
| 51 | + export HOMEBREW_NO_AUTO_UPDATE=1 |
| 52 | + brew install git-lfs openssl || true |
72 | 53 | - run: git lfs install |
73 | 54 | - run: git lfs pull |
74 | 55 | - restore_cache: |
75 | 56 | keys: |
76 | | - - v1-dependencies-osx-{{ checksum "package-lock.json" }} |
| 57 | + - v1-dependencies-macos-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }} |
77 | 58 | # fallback to using the latest cache if no exact match is found |
78 | | - - v1-dependencies-osx- |
| 59 | + - v1-dependencies-macos-{{ .Environment.CIRCLE_JOB }} |
79 | 60 |
|
80 | 61 | - run: npm install --build-from-source |
81 | 62 |
|
82 | 63 | - save_cache: |
83 | 64 | paths: |
84 | 65 | - node_modules |
85 | | - key: v1-dependencies-osx-{{ checksum "package-lock.json" }} |
| 66 | + key: v1-dependencies-macos-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }} |
86 | 67 |
|
87 | 68 | - run: npm run test |
88 | 69 | - run: ./node_modules/.bin/electron-rebuild |
89 | 70 | - run: ./node_modules/.bin/electron-mocha --timeout 480000 |
90 | 71 | - run: |
91 | 72 | <<: *publish-command |
92 | 73 |
|
| 74 | +version: 2 |
| 75 | +jobs: |
| 76 | + build-10.5.0: |
| 77 | + <<: *common-build |
| 78 | + docker: |
| 79 | + - image: circleci/node:10.5.0 |
| 80 | + |
| 81 | + build-9.3.0: |
| 82 | + <<: *common-build |
| 83 | + docker: |
| 84 | + - image: circleci/node:9.3.0 |
| 85 | + |
| 86 | + build-8.9.3: |
| 87 | + <<: *common-build |
| 88 | + docker: |
| 89 | + - image: circleci/node:8.9.3 |
| 90 | + |
| 91 | + build-7.9.0: |
| 92 | + <<: *common-build |
| 93 | + docker: |
| 94 | + - image: circleci/node:7.9.0 |
| 95 | + |
| 96 | + build-electron-2.0.4: |
| 97 | + <<: *common-electron-linux |
| 98 | + environment: |
| 99 | + PRE_GYP_ARGS: --runtime=electron --target=2.0.4 --disturl=https://atom.io/download/electron |
| 100 | + |
| 101 | + build-electron-1.8.6: |
| 102 | + <<: *common-electron-linux |
| 103 | + environment: |
| 104 | + PRE_GYP_ARGS: --runtime=electron --target=1.8.6 --disturl=https://atom.io/download/electron |
| 105 | + |
| 106 | + build-electron-1.7.11: |
| 107 | + <<: *common-electron-linux |
| 108 | + environment: |
| 109 | + PRE_GYP_ARGS: --runtime=electron --target=1.7.9 --disturl=https://atom.io/download/electron |
| 110 | + |
| 111 | + |
| 112 | + build-macos-10.1.0: |
| 113 | + <<: *common-macos |
| 114 | + macos: |
| 115 | + xcode: "9.3.1" # Node 10.3.0 |
| 116 | + |
| 117 | + build-macos-8.9.0: |
| 118 | + <<: *common-macos |
| 119 | + macos: |
| 120 | + xcode: "9.1.0" # Node 8.9.0 |
| 121 | + |
| 122 | + |
| 123 | + build-macos-electron-2.0.4: |
| 124 | + <<: *common-macos |
| 125 | + environment: |
| 126 | + PRE_GYP_ARGS: --runtime=electron --target=2.0.4 --disturl=https://atom.io/download/electron |
| 127 | + |
| 128 | + build-macos-electron-1.8.6: |
| 129 | + <<: *common-macos |
| 130 | + environment: |
| 131 | + PRE_GYP_ARGS: --runtime=electron --target=1.8.6 --disturl=https://atom.io/download/electron |
| 132 | + |
| 133 | + build-macos-electron-1.7.11: |
| 134 | + <<: *common-macos |
| 135 | + environment: |
| 136 | + PRE_GYP_ARGS: --runtime=electron --target=1.7.11 --disturl=https://atom.io/download/electron |
| 137 | + |
93 | 138 | workflows: |
94 | 139 | version: 2 |
95 | 140 | build_all: |
96 | 141 | jobs: |
| 142 | + - build-10.5.0 |
97 | 143 | - build-9.3.0 |
98 | 144 | - build-8.9.3 |
99 | 145 | - build-7.9.0 |
100 | | - - build-electron |
101 | | - - build-macos |
| 146 | + - build-electron-2.0.4 |
| 147 | + - build-electron-1.8.6 |
| 148 | + - build-electron-1.7.11 |
| 149 | + # Not working currently |
| 150 | + # - build-macos-10.1.0 |
| 151 | + - build-macos-8.9.0 |
| 152 | + - build-macos-electron-2.0.4 |
| 153 | + - build-macos-electron-1.8.6 |
| 154 | + - build-macos-electron-1.7.11 |
0 commit comments