Skip to content

Commit 1423584

Browse files
authored
Merge pull request #2 from powersync-ja/changeset-release/main
Version Packages
2 parents a54afd6 + 254d93e commit 1423584

File tree

137 files changed

+21644
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+21644
-6
lines changed

.changeset/angry-days-battle.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# @powersync/sql-js
2+
3+
## 0.0.1
4+
5+
### Patch Changes
6+
7+
- de32978: Initial release of sql.js fork with PowerSync.
Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
version: 2.1
2+
3+
orbs:
4+
win: circleci/[email protected]
5+
6+
executors:
7+
ubuntu:
8+
docker:
9+
- image: buildpack-deps:focal
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+
xcode: "13.4.1"
18+
resource_class: macos.m1.medium.gen1
19+
linux_arm64:
20+
machine:
21+
image: ubuntu-2004:2023.07.1
22+
resource_class: arm.medium
23+
24+
commands:
25+
setup-macos:
26+
steps:
27+
- checkout
28+
- run:
29+
name: Install CMake
30+
command: brew install cmake
31+
test-macos:
32+
steps:
33+
- run:
34+
name: test.sh
35+
command: test/test.sh
36+
- run:
37+
name: test.py
38+
command: |
39+
source emsdk_env.sh
40+
test/test.py
41+
test-bazel-linux:
42+
steps:
43+
- checkout
44+
- run:
45+
name: install bazelisk
46+
command: |
47+
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.25.0/bazelisk-linux-amd64
48+
chmod +x bazelisk-linux-amd64
49+
mv bazelisk-linux-amd64 /usr/local/bin/bazel
50+
- run: test/test_bazel.sh
51+
test-bazel-mac:
52+
steps:
53+
- checkout
54+
- run:
55+
name: install bazelisk
56+
command: |
57+
brew install bazelisk
58+
- run: test/test_bazel_mac.sh
59+
test-bazel-windows:
60+
steps:
61+
- checkout
62+
- run:
63+
name: Download Bazelisk
64+
shell: powershell.exe
65+
command: |
66+
$ProgressPreference = "SilentlyContinue"
67+
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 )
68+
- run:
69+
name: Run Tests
70+
shell: powershell.exe
71+
command: |
72+
$env:Path += ";C:\Python27amd64;$pwd\temp\bazel"
73+
.\test\test_bazel.ps1
74+
75+
jobs:
76+
flake8:
77+
executor: ubuntu
78+
steps:
79+
- checkout
80+
- run:
81+
name: install pip
82+
command: |
83+
apt-get update -q
84+
apt-get install -q -y python3-pip
85+
- run: python3 -m pip install --upgrade pip
86+
- run: python3 -m pip install flake8==7.1.1
87+
- run: python3 -m flake8 --show-source --statistics --extend-exclude=./scripts
88+
89+
test-linux:
90+
executor: ubuntu
91+
environment:
92+
EMSDK_NOTTY: "1"
93+
# This is needed because the old gcc-7 that is installed on debian/bionic
94+
# generates warnings about unused variables when doing C++17
95+
# destructuring:
96+
# https://github.com/WebAssembly/binaryen/issues/4353
97+
CXXFLAGS: "-Wno-unused-variable"
98+
# I don't know why circleci VMs pretent to have 36 cores but its a lie.
99+
EMSDK_NUM_CORES: "4"
100+
steps:
101+
- checkout
102+
- run:
103+
name: Install debian packages
104+
command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless ksh zsh
105+
- run: test/test_node_path.sh
106+
- run: test/test.sh
107+
- run: test/test_source_env.sh
108+
- run:
109+
name: test.py
110+
command: |
111+
source emsdk_env.sh
112+
test/test.py
113+
test-linux-arm64:
114+
executor: linux_arm64
115+
steps:
116+
- checkout
117+
- run:
118+
name: Install debian packages
119+
command: sudo apt-get update -q && sudo apt-get install -q cmake build-essential openjdk-8-jre-headless
120+
- run: test/test.sh
121+
test-mac-arm64:
122+
executor: mac_arm64
123+
steps:
124+
- setup-macos
125+
- test-macos
126+
test-windows:
127+
executor:
128+
name: win/server-2019
129+
shell: bash.exe
130+
environment:
131+
# We need python installed before we can test anytyhing.
132+
# There seems to be undocument copy of python installed here. Hopefully
133+
# if this disappears there will be another way of getting a re-installed
134+
# version.
135+
PYTHON_BIN: "C:\\Python27amd64"
136+
PYTHONUNBUFFERED: "1"
137+
EMSDK_NOTTY: "1"
138+
steps:
139+
- checkout
140+
- run:
141+
name: Add python to bash path
142+
command: echo "export PATH=\"$PATH:/c/python27amd64/\"" >> $BASH_ENV
143+
- run:
144+
name: Install latest
145+
shell: cmd.exe
146+
command: test\test.bat
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} alias=latest 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} alias=${CIRCLE_TAG}-arm64 only_alias=true push
258+
259+
test-bazel7-linux:
260+
executor: ubuntu
261+
environment:
262+
USE_BAZEL_VERSION: "7.x"
263+
steps:
264+
- test-bazel-linux
265+
266+
test-bazel-latest-linux:
267+
executor: ubuntu
268+
steps:
269+
- test-bazel-linux
270+
271+
test-bazel7-mac-arm64:
272+
executor: mac_arm64
273+
environment:
274+
USE_BAZEL_VERSION: "7.x"
275+
steps:
276+
- test-bazel-mac
277+
278+
test-bazel-latest-mac-arm64:
279+
executor: mac_arm64
280+
steps:
281+
- test-bazel-mac
282+
283+
test-bazel7-windows:
284+
executor:
285+
name: win/server-2019
286+
shell: powershell.exe -ExecutionPolicy Bypass
287+
environment:
288+
PYTHONUNBUFFERED: "1"
289+
EMSDK_NOTTY: "1"
290+
# For some reason version resolution with "7.x" does not work on Windows,
291+
# so we have to specify a full version.
292+
USE_BAZEL_VERSION: "7.6.1"
293+
steps:
294+
- test-bazel-windows
295+
296+
test-bazel-latest-windows:
297+
executor:
298+
name: win/server-2019
299+
shell: powershell.exe -ExecutionPolicy Bypass
300+
environment:
301+
PYTHONUNBUFFERED: "1"
302+
EMSDK_NOTTY: "1"
303+
steps:
304+
- test-bazel-windows
305+
306+
workflows:
307+
flake8:
308+
jobs:
309+
- flake8
310+
test-linux:
311+
jobs:
312+
- test-linux
313+
test-linux-arm64:
314+
jobs:
315+
- test-linux-arm64
316+
test-mac-arm64:
317+
jobs:
318+
- test-mac-arm64
319+
test-windows:
320+
jobs:
321+
- test-windows
322+
build-docker-image:
323+
jobs:
324+
- build-docker-image-x64
325+
- publish-docker-image-x64:
326+
filters:
327+
branches:
328+
ignore: /.*/
329+
tags:
330+
only: /.*/
331+
- publish-docker-image-arm64:
332+
filters:
333+
branches:
334+
ignore: /.*/
335+
tags:
336+
only: /.*/
337+
test-bazel7-linux:
338+
jobs:
339+
- test-bazel7-linux
340+
test-bazel-latest-linux:
341+
jobs:
342+
- test-bazel-latest-linux
343+
test-bazel7-mac-arm64:
344+
jobs:
345+
- test-bazel7-mac-arm64
346+
test-bazel-latest-mac-arm64:
347+
jobs:
348+
- test-bazel-latest-mac-arm64
349+
test-bazel7-windows:
350+
jobs:
351+
- test-bazel7-windows
352+
test-bazel-latest-windows:
353+
jobs:
354+
- test-bazel-latest-windows

emsdk-cache/emsdk-main/.dockerignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ignore everything
2+
*
3+
4+
# Allow the entrypoint/test script inside the Docker container
5+
!/docker/entrypoint.sh
6+
!/docker/test_dockerimage.sh
7+
8+
# Allow license file
9+
!LICENSE
10+
11+
# Allow necessary build files in top-level directory
12+
!emscripten-releases-tags.json
13+
!emsdk
14+
!emsdk.py
15+
!emsdk_env.sh
16+
!emsdk_manifest.json
17+
18+
# Allow files required to install legacy versions
19+
!legacy-binaryen-tags.txt
20+
!legacy-emscripten-tags.txt
21+
!llvm-tags-64bit.txt

0 commit comments

Comments
 (0)