Skip to content

Commit 6fb817e

Browse files
authored
Merge pull request #111 from launchql/refactor/structure
new structure
2 parents c16cd5a + e311af1 commit 6fb817e

Some content is hidden

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

47 files changed

+1925
-4325
lines changed

β€Ž.github/workflows/build-wasm-no-docker.yamlβ€Ž

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Wasm πŸ› 
1+
name: Build Wasm No Docker πŸ› 
22
'on':
33
workflow_dispatch: null
44
jobs:
@@ -11,10 +11,28 @@ jobs:
1111
uses: actions/setup-node@v4
1212
with:
1313
node-version: 20.x
14-
cache: yarn
15-
- name: Install and Build πŸš€
14+
15+
- name: Setup pnpm πŸ“¦
16+
uses: pnpm/action-setup@v2
17+
with:
18+
version: 8.15.0
19+
20+
- name: Get pnpm store directory πŸ“
21+
shell: bash
1622
run: |
17-
yarn
23+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
24+
25+
- name: Setup pnpm cache πŸ—„οΈ
26+
uses: actions/cache@v3
27+
with:
28+
path: ${{ env.STORE_PATH }}
29+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
30+
restore-keys: |
31+
${{ runner.os }}-pnpm-store-
32+
33+
- name: Install Dependencies 🧢
34+
run: pnpm install
35+
1836
- name: Install Emscripten ✍🏻
1937
run: |
2038
sudo apt-get update
@@ -24,13 +42,15 @@ jobs:
2442
./emsdk install 3.1.59
2543
./emsdk activate 3.1.59
2644
source ./emsdk_env.sh
45+
working-directory: libpg-query
2746
- name: Build with Emscripten πŸ—
2847
run: |
2948
source ./emsdk/emsdk_env.sh
3049
emmake make
3150
emmake make build
51+
working-directory: libpg-query
3252
- name: Archive production artifacts πŸ›
3353
uses: actions/upload-artifact@v4
3454
with:
3555
name: wasm-artifacts
36-
path: wasm
56+
path: libpg-query/wasm

β€Ž.github/workflows/build-wasm.ymlβ€Ž

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,35 @@ jobs:
1414
uses: actions/setup-node@v4
1515
with:
1616
node-version: '20.x'
17-
cache: 'yarn'
17+
18+
- name: Setup pnpm πŸ“¦
19+
uses: pnpm/action-setup@v2
20+
with:
21+
version: 8.15.0
22+
23+
- name: Get pnpm store directory πŸ“
24+
shell: bash
25+
run: |
26+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
27+
28+
- name: Setup pnpm cache πŸ—„οΈ
29+
uses: actions/cache@v3
30+
with:
31+
path: ${{ env.STORE_PATH }}
32+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
33+
restore-keys: |
34+
${{ runner.os }}-pnpm-store-
1835
1936
- name: Install Dependencies 🧢
20-
run: yarn install
37+
run: pnpm install
2138

2239
- name: Build WASM πŸ—
23-
run: npm run wasm:build
40+
run: pnpm run build
41+
working-directory: libpg-query
2442

2543
- name: Archive production artifacts πŸ›
2644
uses: actions/upload-artifact@v4
2745
with:
2846
name: wasm-artifacts
29-
path: wasm/
47+
path: libpg-query/wasm/
3048
retention-days: 7

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,37 @@ jobs:
1919
uses: actions/setup-node@v4
2020
with:
2121
node-version: '20.x'
22-
cache: 'yarn'
22+
23+
- name: Setup pnpm πŸ“¦
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: 8.15.0
27+
28+
- name: Get pnpm store directory πŸ“
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32+
33+
- name: Setup pnpm cache πŸ—„οΈ
34+
uses: actions/cache@v3
35+
with:
36+
path: ${{ env.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
2340
2441
- name: Install Dependencies 🧢
25-
run: yarn install
42+
run: pnpm install
2643

2744
- name: Build WASM πŸ—
28-
run: npm run wasm:build
45+
run: pnpm run build
46+
working-directory: libpg-query
2947

3048
- name: Upload WASM Artifacts πŸ“¦
3149
uses: actions/upload-artifact@v4
3250
with:
3351
name: wasm-artifacts
34-
path: wasm/
52+
path: libpg-query/wasm/
3553
retention-days: 1
3654

3755
test:
@@ -50,16 +68,33 @@ jobs:
5068
uses: actions/setup-node@v4
5169
with:
5270
node-version: '20.x'
53-
cache: 'yarn'
71+
72+
- name: Setup pnpm πŸ“¦
73+
uses: pnpm/action-setup@v2
74+
with:
75+
version: 8.15.0
76+
77+
- name: Get pnpm store directory πŸ“
78+
shell: bash
79+
run: |
80+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
81+
82+
- name: Setup pnpm cache πŸ—„οΈ
83+
uses: actions/cache@v3
84+
with:
85+
path: ${{ env.STORE_PATH }}
86+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
87+
restore-keys: |
88+
${{ runner.os }}-pnpm-store-
5489
5590
- name: Install Dependencies 🧢
56-
run: yarn install
91+
run: pnpm install
5792

5893
- name: Download WASM Artifacts πŸ“₯
5994
uses: actions/download-artifact@v4
6095
with:
6196
name: wasm-artifacts
62-
path: wasm/
97+
path: libpg-query/wasm/
6398

6499
- name: Run Tests πŸ”
65-
run: yarn test
100+
run: pnpm run test

β€Ž.gitignoreβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ wasm/libpg-query.js
99
esm/
1010
cjs/
1111
.claude
12+
13+
# pnpm
14+
.pnpm-store/

β€Ž.vscode/settings.jsonβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"workbench.colorTheme": "Default Dark Modern",
3+
"workbench.startupEditor": "none"
4+
}

β€Ž.yamlize/config/config.yamlβ€Ž

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

β€Ž.yamlize/workflows/build.yamlβ€Ž

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

β€Ž.yamlize/workflows/yaml/build-wasm.yamlβ€Ž

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

β€Ž.yamlize/workflows/yaml/emscripten/build.yamlβ€Ž

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

β€Ž.yamlize/workflows/yaml/emscripten/install.yamlβ€Ž

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

0 commit comments

Comments
Β (0)