Skip to content

Commit 18ada94

Browse files
author
github-actions[bot]
committed
chore(utils-eslint-config): release @nanoforge-dev/utils-eslint-config@1.0.2
1 parent 041681e commit 18ada94

137 files changed

Lines changed: 14387 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 381 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,381 @@
1+
version: 2.1
2+
3+
orbs:
4+
win: circleci/windows@5.0
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+
working_directory: ~/project with spaces
139+
steps:
140+
- checkout
141+
- run: pwd
142+
- run: where python
143+
- run: pip install pip-system-certs
144+
- run:
145+
name: Install packages
146+
command: choco install -y cmake.portable ninja pkgconfiglite
147+
148+
- run:
149+
name: Install latest
150+
shell: cmd.exe
151+
command: test\test.bat
152+
153+
- run:
154+
name: test.py
155+
command: |
156+
source emsdk_env.sh
157+
python test/test.py
158+
159+
- run:
160+
name: flagless (process/shell) test
161+
shell: powershell.exe
162+
command: |
163+
test/test_activation.ps1
164+
165+
- run:
166+
name: --permanent test
167+
shell: powershell.exe
168+
command: |
169+
$env:PERMANENT_FLAG="--permanent"
170+
test/test_activation.ps1
171+
172+
- run:
173+
name: --system test
174+
shell: powershell.exe
175+
command: |
176+
$env:SYSTEM_FLAG="--system"
177+
test/test_activation.ps1
178+
179+
- run:
180+
name: Process/Shell PATH preservation test
181+
shell: powershell.exe
182+
command: |
183+
test/test_path_preservation.ps1
184+
185+
- run:
186+
name: User PATH preservation test
187+
shell: powershell.exe
188+
command: |
189+
$env:PERMANENT_FLAG="--permanent"
190+
test/test_path_preservation.ps1
191+
192+
- run:
193+
name: System PATH preservation test
194+
shell: powershell.exe
195+
command: |
196+
$env:SYSTEM_FLAG="--system"
197+
test/test_path_preservation.ps1
198+
199+
build-docker-image-x64:
200+
executor: ubuntu
201+
steps:
202+
- checkout
203+
- run:
204+
name: install docker
205+
command: |
206+
apt-get update -q
207+
apt-get install -q -y ca-certificates curl gnupg lsb-release
208+
mkdir -p /etc/apt/keyrings
209+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
210+
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
211+
apt-get update -q
212+
apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
213+
- setup_remote_docker
214+
# Build the `latest` version of EMSDK as docker image
215+
- run:
216+
name: build
217+
command: make -C ./docker version=latest build
218+
- run:
219+
name: test
220+
command: make -C ./docker version=latest test
221+
222+
publish-docker-image-x64:
223+
executor: ubuntu
224+
steps:
225+
- checkout
226+
- run:
227+
name: install docker
228+
command: |
229+
apt-get update -q
230+
apt-get install -q -y ca-certificates curl gnupg lsb-release
231+
mkdir -p /etc/apt/keyrings
232+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
233+
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
234+
apt-get update -q
235+
apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
236+
- setup_remote_docker
237+
- run:
238+
name: build
239+
command: make -C ./docker version=${CIRCLE_TAG} build
240+
- run:
241+
name: test
242+
command: make -C ./docker version=${CIRCLE_TAG} test
243+
- run:
244+
name: push image
245+
command: |
246+
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
247+
make -C ./docker version=${CIRCLE_TAG} tag=${CIRCLE_TAG}-x64 push
248+
249+
publish-docker-image-arm64:
250+
executor: linux_arm64
251+
steps:
252+
- checkout
253+
- run:
254+
name: build
255+
command: make -C ./docker version=${CIRCLE_TAG} build
256+
- run:
257+
name: test
258+
command: make -C ./docker version=${CIRCLE_TAG} test
259+
- run:
260+
name: push image
261+
command: |
262+
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
263+
make -C ./docker version=${CIRCLE_TAG} tag=${CIRCLE_TAG}-arm64 push
264+
265+
publish-docker-image-multiplatform:
266+
executor: linux_arm64
267+
steps:
268+
- checkout
269+
- run:
270+
name: push image
271+
command: |
272+
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
273+
make -C ./docker version=${CIRCLE_TAG} tag=${CIRCLE_TAG} push-multiplatform
274+
make -C ./docker version=${CIRCLE_TAG} tag="latest" push-multiplatform
275+
276+
test-bazel-linux:
277+
parameters:
278+
bazel_version:
279+
type: string
280+
default: "latest"
281+
executor: ubuntu
282+
environment:
283+
USE_BAZEL_VERSION: << parameters.bazel_version >>
284+
steps:
285+
- test-bazel-linux
286+
287+
test-bazel-mac-arm64:
288+
parameters:
289+
bazel_version:
290+
type: string
291+
default: "latest"
292+
executor: mac_arm64
293+
environment:
294+
USE_BAZEL_VERSION: << parameters.bazel_version >>
295+
steps:
296+
- test-bazel-mac
297+
298+
test-bazel-windows:
299+
parameters:
300+
bazel_version:
301+
type: string
302+
default: "latest"
303+
executor:
304+
name: win/server-2019
305+
shell: powershell.exe -ExecutionPolicy Bypass
306+
environment:
307+
PYTHONUNBUFFERED: "1"
308+
EMSDK_NOTTY: "1"
309+
USE_BAZEL_VERSION: << parameters.bazel_version >>
310+
steps:
311+
- test-bazel-windows
312+
313+
workflows:
314+
lint:
315+
jobs:
316+
- lint
317+
test-linux:
318+
jobs:
319+
- test-linux
320+
test-linux-arm64:
321+
jobs:
322+
- test-linux-arm64
323+
test-mac-arm64:
324+
jobs:
325+
- test-mac-arm64
326+
test-windows:
327+
jobs:
328+
- test-windows
329+
build-docker-image:
330+
jobs:
331+
- build-docker-image-x64
332+
- publish-docker-image-x64:
333+
filters:
334+
branches:
335+
ignore: /.*/
336+
tags:
337+
only: /.*/
338+
- publish-docker-image-arm64:
339+
filters:
340+
branches:
341+
ignore: /.*/
342+
tags:
343+
only: /.*/
344+
- publish-docker-image-multiplatform:
345+
filters:
346+
tags:
347+
only: /.*/
348+
requires:
349+
- publish-docker-image-x64
350+
- publish-docker-image-arm64
351+
352+
test-bazel-linux:
353+
jobs:
354+
- test-bazel-linux:
355+
matrix:
356+
parameters:
357+
bazel_version:
358+
- "7.x"
359+
- "8.x"
360+
- "9.x"
361+
test-bazel-mac-arm64:
362+
jobs:
363+
- test-bazel-mac-arm64:
364+
matrix:
365+
parameters:
366+
bazel_version:
367+
- "7.x"
368+
- "8.x"
369+
# https://github.com/emscripten-core/emsdk/issues/1642
370+
# - "9.x"
371+
test-bazel-windows:
372+
jobs:
373+
- test-bazel-windows:
374+
matrix:
375+
parameters:
376+
# For some reason version resolution with "x.x" does not work on Windows,
377+
# so we have to specify full versions.
378+
bazel_version:
379+
- "7.7.1"
380+
- "8.5.1"
381+
- "9.0.0"

0 commit comments

Comments
 (0)