|
| 1 | +version: 2.1 |
| 2 | + |
| 3 | +orbs: |
| 4 | + |
| 5 | + |
| 6 | +executors: |
| 7 | + bionic: |
| 8 | + docker: |
| 9 | + - image: buildpack-deps:bionic |
| 10 | + |
| 11 | +jobs: |
| 12 | + flake8: |
| 13 | + executor: bionic |
| 14 | + steps: |
| 15 | + - checkout |
| 16 | + - run: |
| 17 | + name: install pip |
| 18 | + command: | |
| 19 | + apt-get update -q |
| 20 | + apt-get install -q -y python-pip python3-pip |
| 21 | + - run: python2 -m pip install --upgrade pip |
| 22 | + - run: python3 -m pip install --upgrade pip |
| 23 | + - run: python2 -m pip install flake8==3.7.8 |
| 24 | + - run: python3 -m pip install flake8==3.7.8 |
| 25 | + - run: python2 -m flake8 --show-source --statistics |
| 26 | + - run: python3 -m flake8 --show-source --statistics |
| 27 | + test-linux: |
| 28 | + executor: bionic |
| 29 | + environment: |
| 30 | + EMSDK_NOTTY: "1" |
| 31 | + # I don't know why circleci VMs pretent to have 36 cores but its a lie. |
| 32 | + EMSDK_NUM_CORES: "4" |
| 33 | + steps: |
| 34 | + - checkout |
| 35 | + - run: |
| 36 | + name: Install debian packages |
| 37 | + command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless ksh zsh |
| 38 | + - run: test/test.sh |
| 39 | + - run: test/test_source_env.sh |
| 40 | + - run: |
| 41 | + name: test.py |
| 42 | + command: | |
| 43 | + source emsdk_env.sh |
| 44 | + test/test.py |
| 45 | + test-mac: |
| 46 | + macos: |
| 47 | + xcode: "12.2.0" |
| 48 | + environment: |
| 49 | + EMSDK_NOTTY: "1" |
| 50 | + # Without this, any `brew installl` command will result in self-update of |
| 51 | + # brew itself which takes more than 4 minutes. |
| 52 | + HOMEBREW_NO_AUTO_UPDATE: "1" |
| 53 | + steps: |
| 54 | + - checkout |
| 55 | + - run: |
| 56 | + name: Install cmake |
| 57 | + command: brew install cmake |
| 58 | + - run: test/test.sh |
| 59 | + - run: |
| 60 | + name: test.py |
| 61 | + command: | |
| 62 | + source emsdk_env.sh |
| 63 | + test/test.py |
| 64 | + test-windows: |
| 65 | + executor: |
| 66 | + name: win/vs2019 |
| 67 | + shell: bash.exe |
| 68 | + environment: |
| 69 | + # We need python installed before we can test anytyhing. |
| 70 | + # There seems to be undocument copy of python installed here. Hopefully |
| 71 | + # if this disappears there will be another way of getting a re-installed |
| 72 | + # version. |
| 73 | + PYTHON_BIN: "C:\\Python27amd64" |
| 74 | + PYTHONUNBUFFERED: "1" |
| 75 | + EMSDK_NOTTY: "1" |
| 76 | + steps: |
| 77 | + - checkout |
| 78 | + - run: |
| 79 | + name: Add python to bash path |
| 80 | + command: echo "export PATH=\"$PATH:/c/python27amd64/\"" >> $BASH_ENV |
| 81 | + - run: |
| 82 | + name: Install latest |
| 83 | + shell: cmd.exe |
| 84 | + command: test\test.bat |
| 85 | + - run: |
| 86 | + name: test.py |
| 87 | + command: | |
| 88 | + source emsdk_env.sh |
| 89 | + python test/test.py |
| 90 | +
|
| 91 | + - run: |
| 92 | + name: flagless (process/shell) test |
| 93 | + shell: powershell.exe |
| 94 | + command: | |
| 95 | + test/test_activation.ps1 |
| 96 | +
|
| 97 | + - run: |
| 98 | + name: --permanent test |
| 99 | + shell: powershell.exe |
| 100 | + command: | |
| 101 | + $env:PERMANENT_FLAG="--permanent" |
| 102 | + test/test_activation.ps1 |
| 103 | +
|
| 104 | + - run: |
| 105 | + name: --system test |
| 106 | + shell: powershell.exe |
| 107 | + command: | |
| 108 | + $env:SYSTEM_FLAG="--system" |
| 109 | + test/test_activation.ps1 |
| 110 | +
|
| 111 | + - run: |
| 112 | + name: Process/Shell PATH preservation test |
| 113 | + shell: powershell.exe |
| 114 | + command: | |
| 115 | + test/test_path_preservation.ps1 |
| 116 | +
|
| 117 | + - run: |
| 118 | + name: User PATH preservation test |
| 119 | + shell: powershell.exe |
| 120 | + command: | |
| 121 | + $env:PERMANENT_FLAG="--permanent" |
| 122 | + test/test_path_preservation.ps1 |
| 123 | +
|
| 124 | + - run: |
| 125 | + name: System PATH preservation test |
| 126 | + shell: powershell.exe |
| 127 | + command: | |
| 128 | + $env:SYSTEM_FLAG="--system" |
| 129 | + test/test_path_preservation.ps1 |
| 130 | +
|
| 131 | + build-docker-image: |
| 132 | + executor: bionic |
| 133 | + steps: |
| 134 | + - checkout |
| 135 | + - run: |
| 136 | + name: install docker |
| 137 | + command: apt-get update -q && apt-get install -q -y docker.io |
| 138 | + - setup_remote_docker: |
| 139 | + version: 19.03.13 |
| 140 | + # Build and test the tip-of-tree build of EMSDK |
| 141 | + - run: |
| 142 | + name: build |
| 143 | + command: make -C ./docker version=tot build |
| 144 | + - run: |
| 145 | + name: test |
| 146 | + command: make -C ./docker version=tot test |
| 147 | + |
| 148 | + publish-docker-image: |
| 149 | + executor: bionic |
| 150 | + steps: |
| 151 | + - checkout |
| 152 | + - run: |
| 153 | + name: install docker |
| 154 | + command: apt-get update -q && apt-get install -q -y docker.io |
| 155 | + - setup_remote_docker: |
| 156 | + version: 19.03.13 |
| 157 | + - run: |
| 158 | + name: build |
| 159 | + command: make -C ./docker version=${CIRCLE_TAG} build |
| 160 | + - run: |
| 161 | + name: test |
| 162 | + command: make -C ./docker version=${CIRCLE_TAG} test |
| 163 | + - run: |
| 164 | + name: push image |
| 165 | + command: | |
| 166 | + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" |
| 167 | + make -C ./docker version=${CIRCLE_TAG} alias=latest push |
| 168 | +
|
| 169 | + test-bazel-linux: |
| 170 | + executor: bionic |
| 171 | + steps: |
| 172 | + - checkout |
| 173 | + - run: apt-get install -q -y curl gnupg |
| 174 | + - run: curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg |
| 175 | + - run: mv bazel.gpg /etc/apt/trusted.gpg.d/ |
| 176 | + - run: echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list |
| 177 | + - run: |
| 178 | + name: install pip |
| 179 | + command: | |
| 180 | + apt-get update -q |
| 181 | + apt-get install -q -y python3-pip |
| 182 | + - run: pip3 install absl-py |
| 183 | + - run: |
| 184 | + name: install bazel |
| 185 | + command: | |
| 186 | + apt-get install -q -y bazel |
| 187 | + - run: test/test_bazel.sh |
| 188 | + |
| 189 | + test-bazel-mac: |
| 190 | + macos: |
| 191 | + xcode: "12.2.0" |
| 192 | + environment: |
| 193 | + EMSDK_NOTTY: "1" |
| 194 | + HOMEBREW_NO_AUTO_UPDATE: "1" |
| 195 | + steps: |
| 196 | + - checkout |
| 197 | + - run: brew install grep |
| 198 | + - run: |
| 199 | + name: install bazel |
| 200 | + command: | |
| 201 | + brew install bazel |
| 202 | + - run: test/test_bazel_mac.sh |
| 203 | + |
| 204 | +workflows: |
| 205 | + flake8: |
| 206 | + jobs: |
| 207 | + - flake8 |
| 208 | + test-linux: |
| 209 | + jobs: |
| 210 | + - test-linux |
| 211 | + test-mac: |
| 212 | + jobs: |
| 213 | + - test-mac |
| 214 | + test-windows: |
| 215 | + jobs: |
| 216 | + - test-windows |
| 217 | + build-docker-image: |
| 218 | + jobs: |
| 219 | + - build-docker-image |
| 220 | + - publish-docker-image: |
| 221 | + filters: |
| 222 | + branches: |
| 223 | + ignore: /.*/ |
| 224 | + tags: |
| 225 | + only: /.*/ |
| 226 | + test-bazel-linux: |
| 227 | + jobs: |
| 228 | + - test-bazel-linux |
| 229 | + test-bazel-mac: |
| 230 | + jobs: |
| 231 | + - test-bazel-mac |
0 commit comments