Mercurial
comparison third_party/emsdk/.circleci/config.yml @ 179:8d17f6e6e290
[ThirdParty] Added emsdk bazel rules that can be supported by bazel 9.0.0
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Thu, 22 Jan 2026 21:23:17 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 178:94705b5986b3 | 179:8d17f6e6e290 |
|---|---|
| 1 version: 2.1 | |
| 2 | |
| 3 orbs: | |
| 4 win: circleci/[email protected] | |
| 5 | |
| 6 executors: | |
| 7 ubuntu: | |
| 8 docker: | |
| 9 - image: buildpack-deps:jammy | |
| 10 mac_arm64: | |
| 11 environment: | |
| 12 EMSDK_NOTTY: "1" | |
| 13 # Without this, any `brew install` command will result in self-update of | |
| 14 # brew itself which takes more than 4 minutes. | |
| 15 HOMEBREW_NO_AUTO_UPDATE: "1" | |
| 16 macos: | |
| 17 # Corresponds to macOS 13.2.1 | |
| 18 # See https://circleci.com/docs/guides/execution-managed/using-macos/#supported-xcode-versions | |
| 19 xcode: "14.3.1" | |
| 20 resource_class: m4pro.medium | |
| 21 linux_arm64: | |
| 22 machine: | |
| 23 image: ubuntu-2004:2023.07.1 | |
| 24 resource_class: arm.medium | |
| 25 | |
| 26 commands: | |
| 27 setup-macos: | |
| 28 steps: | |
| 29 - checkout | |
| 30 - run: | |
| 31 name: Install CMake | |
| 32 command: brew install cmake | |
| 33 test-macos: | |
| 34 steps: | |
| 35 - run: | |
| 36 name: test.sh | |
| 37 command: test/test.sh | |
| 38 - run: | |
| 39 name: test.py | |
| 40 command: | | |
| 41 source emsdk_env.sh | |
| 42 test/test.py | |
| 43 test-bazel-linux: | |
| 44 steps: | |
| 45 - checkout | |
| 46 - run: | |
| 47 name: install bazelisk | |
| 48 command: | | |
| 49 wget https://github.com/bazelbuild/bazelisk/releases/download/v1.25.0/bazelisk-linux-amd64 | |
| 50 chmod +x bazelisk-linux-amd64 | |
| 51 mv bazelisk-linux-amd64 /usr/local/bin/bazel | |
| 52 - run: test/test_bazel.sh | |
| 53 test-bazel-mac: | |
| 54 steps: | |
| 55 - checkout | |
| 56 - run: | |
| 57 name: install bazelisk | |
| 58 command: | | |
| 59 brew install bazelisk | |
| 60 - run: test/test_bazel_mac.sh | |
| 61 test-bazel-windows: | |
| 62 steps: | |
| 63 - checkout | |
| 64 - run: | |
| 65 name: Download Bazelisk | |
| 66 shell: powershell.exe | |
| 67 command: | | |
| 68 $ProgressPreference = "SilentlyContinue" | |
| 69 Invoke-WebRequest -Uri https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-windows-amd64.exe -OutFile ( New-Item -Path "temp\bazel\bazel.exe" -Force ) | |
| 70 - run: | |
| 71 name: Run Tests | |
| 72 shell: powershell.exe | |
| 73 command: | | |
| 74 $env:Path += ";C:\Python27amd64;$pwd\temp\bazel" | |
| 75 .\test\test_bazel.ps1 | |
| 76 | |
| 77 jobs: | |
| 78 lint: | |
| 79 executor: ubuntu | |
| 80 steps: | |
| 81 - checkout | |
| 82 - run: | |
| 83 name: install python deps | |
| 84 command: | | |
| 85 apt-get update -q | |
| 86 apt-get install -q -y python3-pip | |
| 87 - run: | |
| 88 name: python lint | |
| 89 command: | | |
| 90 python3 -m pip install --upgrade pip | |
| 91 python3 -m pip install flake8==7.1.1 ruff==0.14.1 | |
| 92 python3 -m flake8 --show-source --statistics --extend-exclude=./scripts | |
| 93 python3 -m ruff check | |
| 94 test-linux: | |
| 95 executor: ubuntu | |
| 96 environment: | |
| 97 EMSDK_NOTTY: "1" | |
| 98 # This is needed because the old gcc-7 that is installed on debian/bionic | |
| 99 # generates warnings about unused variables when doing C++17 | |
| 100 # destructuring: | |
| 101 # https://github.com/WebAssembly/binaryen/issues/4353 | |
| 102 CXXFLAGS: "-Wno-unused-variable" | |
| 103 # I don't know why circleci VMs pretent to have 36 cores but its a lie. | |
| 104 EMSDK_NUM_CORES: "4" | |
| 105 steps: | |
| 106 - checkout | |
| 107 - run: | |
| 108 name: Install debian packages | |
| 109 command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless ksh zsh | |
| 110 - run: test/test_node_path.sh | |
| 111 - run: test/test.sh | |
| 112 - run: test/test_source_env.sh | |
| 113 - run: | |
| 114 name: test.py | |
| 115 command: | | |
| 116 source emsdk_env.sh | |
| 117 test/test.py | |
| 118 test-linux-arm64: | |
| 119 executor: linux_arm64 | |
| 120 steps: | |
| 121 - checkout | |
| 122 - run: | |
| 123 name: Install debian packages | |
| 124 command: sudo apt-get update -q && sudo apt-get install -q cmake build-essential openjdk-8-jre-headless | |
| 125 - run: test/test.sh | |
| 126 test-mac-arm64: | |
| 127 executor: mac_arm64 | |
| 128 steps: | |
| 129 - setup-macos | |
| 130 - test-macos | |
| 131 test-windows: | |
| 132 executor: | |
| 133 name: win/server-2019 | |
| 134 shell: bash.exe | |
| 135 environment: | |
| 136 PYTHONUNBUFFERED: "1" | |
| 137 EMSDK_NOTTY: "1" | |
| 138 steps: | |
| 139 - checkout | |
| 140 - run: where python | |
| 141 | |
| 142 - run: | |
| 143 name: Install latest | |
| 144 shell: cmd.exe | |
| 145 command: test\test.bat | |
| 146 | |
| 147 - run: | |
| 148 name: test.py | |
| 149 command: | | |
| 150 source emsdk_env.sh | |
| 151 python test/test.py | |
| 152 | |
| 153 - run: | |
| 154 name: flagless (process/shell) test | |
| 155 shell: powershell.exe | |
| 156 command: | | |
| 157 test/test_activation.ps1 | |
| 158 | |
| 159 - run: | |
| 160 name: --permanent test | |
| 161 shell: powershell.exe | |
| 162 command: | | |
| 163 $env:PERMANENT_FLAG="--permanent" | |
| 164 test/test_activation.ps1 | |
| 165 | |
| 166 - run: | |
| 167 name: --system test | |
| 168 shell: powershell.exe | |
| 169 command: | | |
| 170 $env:SYSTEM_FLAG="--system" | |
| 171 test/test_activation.ps1 | |
| 172 | |
| 173 - run: | |
| 174 name: Process/Shell PATH preservation test | |
| 175 shell: powershell.exe | |
| 176 command: | | |
| 177 test/test_path_preservation.ps1 | |
| 178 | |
| 179 - run: | |
| 180 name: User PATH preservation test | |
| 181 shell: powershell.exe | |
| 182 command: | | |
| 183 $env:PERMANENT_FLAG="--permanent" | |
| 184 test/test_path_preservation.ps1 | |
| 185 | |
| 186 - run: | |
| 187 name: System PATH preservation test | |
| 188 shell: powershell.exe | |
| 189 command: | | |
| 190 $env:SYSTEM_FLAG="--system" | |
| 191 test/test_path_preservation.ps1 | |
| 192 | |
| 193 build-docker-image-x64: | |
| 194 executor: ubuntu | |
| 195 steps: | |
| 196 - checkout | |
| 197 - run: | |
| 198 name: install docker | |
| 199 command: | | |
| 200 apt-get update -q | |
| 201 apt-get install -q -y ca-certificates curl gnupg lsb-release | |
| 202 mkdir -p /etc/apt/keyrings | |
| 203 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| 204 echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| 205 apt-get update -q | |
| 206 apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin | |
| 207 - setup_remote_docker | |
| 208 # Build the `latest` version of EMSDK as docker image | |
| 209 - run: | |
| 210 name: build | |
| 211 command: make -C ./docker version=latest build | |
| 212 - run: | |
| 213 name: test | |
| 214 command: make -C ./docker version=latest test | |
| 215 | |
| 216 publish-docker-image-x64: | |
| 217 executor: ubuntu | |
| 218 steps: | |
| 219 - checkout | |
| 220 - run: | |
| 221 name: install docker | |
| 222 command: | | |
| 223 apt-get update -q | |
| 224 apt-get install -q -y ca-certificates curl gnupg lsb-release | |
| 225 mkdir -p /etc/apt/keyrings | |
| 226 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| 227 echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| 228 apt-get update -q | |
| 229 apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin | |
| 230 - setup_remote_docker | |
| 231 - run: | |
| 232 name: build | |
| 233 command: make -C ./docker version=${CIRCLE_TAG} build | |
| 234 - run: | |
| 235 name: test | |
| 236 command: make -C ./docker version=${CIRCLE_TAG} test | |
| 237 - run: | |
| 238 name: push image | |
| 239 command: | | |
| 240 docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" | |
| 241 make -C ./docker version=${CIRCLE_TAG} tag=${CIRCLE_TAG}-x64 push | |
| 242 | |
| 243 publish-docker-image-arm64: | |
| 244 executor: linux_arm64 | |
| 245 steps: | |
| 246 - checkout | |
| 247 - run: | |
| 248 name: build | |
| 249 command: make -C ./docker version=${CIRCLE_TAG} build | |
| 250 - run: | |
| 251 name: test | |
| 252 command: make -C ./docker version=${CIRCLE_TAG} test | |
| 253 - run: | |
| 254 name: push image | |
| 255 command: | | |
| 256 docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" | |
| 257 make -C ./docker version=${CIRCLE_TAG} tag=${CIRCLE_TAG}-arm64 push | |
| 258 | |
| 259 publish-docker-image-multiplatform: | |
| 260 executor: linux_arm64 | |
| 261 steps: | |
| 262 - checkout | |
| 263 - run: | |
| 264 name: push image | |
| 265 command: | | |
| 266 docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" | |
| 267 make -C ./docker version=${CIRCLE_TAG} tag=${CIRCLE_TAG} push-multiplatform | |
| 268 make -C ./docker version=${CIRCLE_TAG} tag="latest" push-multiplatform | |
| 269 | |
| 270 test-bazel7-linux: | |
| 271 executor: ubuntu | |
| 272 environment: | |
| 273 USE_BAZEL_VERSION: "7.x" | |
| 274 steps: | |
| 275 - test-bazel-linux | |
| 276 | |
| 277 test-bazel-latest-linux: | |
| 278 executor: ubuntu | |
| 279 steps: | |
| 280 - test-bazel-linux | |
| 281 | |
| 282 test-bazel7-mac-arm64: | |
| 283 executor: mac_arm64 | |
| 284 environment: | |
| 285 USE_BAZEL_VERSION: "7.x" | |
| 286 steps: | |
| 287 - test-bazel-mac | |
| 288 | |
| 289 test-bazel-latest-mac-arm64: | |
| 290 executor: mac_arm64 | |
| 291 steps: | |
| 292 - test-bazel-mac | |
| 293 | |
| 294 test-bazel7-windows: | |
| 295 executor: | |
| 296 name: win/server-2019 | |
| 297 shell: powershell.exe -ExecutionPolicy Bypass | |
| 298 environment: | |
| 299 PYTHONUNBUFFERED: "1" | |
| 300 EMSDK_NOTTY: "1" | |
| 301 # For some reason version resolution with "7.x" does not work on Windows, | |
| 302 # so we have to specify a full version. | |
| 303 USE_BAZEL_VERSION: "7.6.1" | |
| 304 steps: | |
| 305 - test-bazel-windows | |
| 306 | |
| 307 test-bazel-latest-windows: | |
| 308 executor: | |
| 309 name: win/server-2019 | |
| 310 shell: powershell.exe -ExecutionPolicy Bypass | |
| 311 environment: | |
| 312 PYTHONUNBUFFERED: "1" | |
| 313 EMSDK_NOTTY: "1" | |
| 314 steps: | |
| 315 - test-bazel-windows | |
| 316 | |
| 317 workflows: | |
| 318 lint: | |
| 319 jobs: | |
| 320 - lint | |
| 321 test-linux: | |
| 322 jobs: | |
| 323 - test-linux | |
| 324 test-linux-arm64: | |
| 325 jobs: | |
| 326 - test-linux-arm64 | |
| 327 test-mac-arm64: | |
| 328 jobs: | |
| 329 - test-mac-arm64 | |
| 330 test-windows: | |
| 331 jobs: | |
| 332 - test-windows | |
| 333 build-docker-image: | |
| 334 jobs: | |
| 335 - build-docker-image-x64 | |
| 336 - publish-docker-image-x64: | |
| 337 filters: | |
| 338 branches: | |
| 339 ignore: /.*/ | |
| 340 tags: | |
| 341 only: /.*/ | |
| 342 - publish-docker-image-arm64: | |
| 343 filters: | |
| 344 branches: | |
| 345 ignore: /.*/ | |
| 346 tags: | |
| 347 only: /.*/ | |
| 348 - publish-docker-image-multiplatform: | |
| 349 filters: | |
| 350 tags: | |
| 351 only: /.*/ | |
| 352 requires: | |
| 353 - publish-docker-image-x64 | |
| 354 - publish-docker-image-arm64 | |
| 355 | |
| 356 test-bazel7-linux: | |
| 357 jobs: | |
| 358 - test-bazel7-linux | |
| 359 test-bazel-latest-linux: | |
| 360 jobs: | |
| 361 - test-bazel-latest-linux | |
| 362 test-bazel7-mac-arm64: | |
| 363 jobs: | |
| 364 - test-bazel7-mac-arm64 | |
| 365 test-bazel-latest-mac-arm64: | |
| 366 jobs: | |
| 367 - test-bazel-latest-mac-arm64 | |
| 368 test-bazel7-windows: | |
| 369 jobs: | |
| 370 - test-bazel7-windows | |
| 371 test-bazel-latest-windows: | |
| 372 jobs: | |
| 373 - test-bazel-latest-windows |