summaryrefslogtreecommitdiff
path: root/node_modules/rcedit/.circleci/config.yml
blob: 8c6e6d692a83a17205a3a5484f9cccf613a936f2 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
step-env: &step-env
  run:
    # prevent Wine popup dialogs about installing additional packages
    name: Setup Environment Variables
    command: |
      echo 'export WINEDLLOVERRIDES="mscoree,mshtml="' >> $BASH_ENV
      echo 'export WINEDEBUG="-all"' >> $BASH_ENV

step-restore-brew-cache: &step-restore-brew-cache
  restore_cache:
    name: Restoring Homebrew cache
    paths:
      - /usr/local/Homebrew
    keys:
      - v1-brew-cache-{{ arch }}

step-save-brew-cache: &step-save-brew-cache
  save_cache:
    name: Persisting Homebrew cache
    paths:
      - /usr/local/Homebrew
    key: v1-brew-cache-{{ arch }}

step-restore-cache: &step-restore-cache
  restore_cache:
    keys:
      - v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
      - v1-dependencies-{{ arch }}

step-save-cache: &step-save-cache
  save_cache:
    paths:
      - node_modules
    key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}

step-install-os-dependencies: &step-install-os-dependencies
  run:
    name: Install OS Dependencies
    command: |
      case "$(uname)" in
        Linux)
          sudo dpkg --add-architecture i386
          sudo apt-get update
          sudo apt-get install --no-install-recommends -y wine64 wine32 wine
        ;;
        Darwin)
          brew install --cask xquartz wine-stable
        ;;
      esac

steps-linux-win: &steps-linux-win
  steps:
    - *step-env
    - *step-install-os-dependencies
    - checkout
    - *step-restore-cache
    - run: yarn
    - *step-save-cache
    - run: yarn test

steps-mac: &steps-mac
  steps:
    - *step-env
    - *step-restore-brew-cache
    - *step-install-os-dependencies
    - *step-save-brew-cache
    - checkout
    - *step-restore-cache
    - run: yarn
    - *step-save-cache
    - run: yarn test

version: 2.1
orbs:
  win: circleci/windows@1.0.0
jobs:
  test-linux-10:
    docker:
      - image: circleci/node:10
    <<: *steps-linux-win
  test-linux-12:
    docker:
      - image: circleci/node:12
    <<: *steps-linux-win
  test-linux-14:
    docker:
      - image: circleci/node:14
    <<: *steps-linux-win
  test-mac:
    macos:
      xcode: "10.2.0"
    <<: *steps-mac
  test-windows:
    executor:
      name: win/vs2019
      shell: bash.exe
    <<: *steps-linux-win

  release:
    docker:
      - image: circleci/node:14.15.1
    steps:
      - checkout
      - *step-restore-cache
      - run: yarn
      - run: npx semantic-release
workflows:
  version: 2
  test_and_release:
    # Run the test jobs first, then the release only when all the test jobs are successful
    jobs:
      - test-linux-10
      - test-linux-12
      - test-linux-14
      - test-mac
      - test-windows
      - release:
          requires:
            - test-linux-10
            - test-linux-12
            - test-linux-14
            - test-mac
            - test-windows
          filters:
            branches:
              only:
                - master