Skip to content

Config builder/15 latest tests #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 41 commits into
base: 16-latest
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d22bece
readme, addon
pyramation Feb 21, 2024
c8f42ee
readme
pyramation Feb 21, 2024
dd3398f
readme
pyramation Feb 21, 2024
b22906b
udpate version
pyramation Feb 21, 2024
f351a42
clean
pyramation Feb 21, 2024
d0f0a64
Update README.md
pyramation Feb 21, 2024
ec882d2
Merge pull request #51 from launchql/wasm/origin-branch
pyramation May 1, 2024
3e8966b
add updates from 16-latest re building on windows, upgrade node gyp
pyramation May 2, 2024
a9f5ca8
remove build step from workflow
pyramation May 2, 2024
daf4051
Merge pull request #53 from launchql/wasm/15-latest
pyramation May 2, 2024
ef3edbb
workflows
pyramation May 2, 2024
9c432ce
Merge pull request #59 from launchql/wasm/15-latest
pyramation May 2, 2024
f07f04e
pkg
pyramation May 2, 2024
b94a20e
Merge pull request #60 from launchql/wasm/15-latest
pyramation May 2, 2024
f87e729
readme
pyramation May 2, 2024
81e9370
update workflows
pyramation May 23, 2024
77e6b12
workflows
pyramation May 23, 2024
966d2cd
build
pyramation May 23, 2024
0906409
15.1.1-rc.0
May 23, 2024
3700cc7
add types
pyramation May 28, 2024
0e60754
15.1.1-rc.1
May 28, 2024
34987b4
windows not supported on PG15
pyramation May 28, 2024
243f82d
Merge branch '15-latest' of github.com:launchql/libpg-query-node into…
pyramation May 28, 2024
8538d13
15.1.1-rc.2
May 28, 2024
ced8827
build for PG 15
pyramation May 28, 2024
0f25677
15.1.1-rc.3
May 28, 2024
53c5d84
remove windows
pyramation May 28, 2024
4addf25
Merge branch '15-latest' of github.com:launchql/libpg-query-node-15-l…
pyramation May 28, 2024
b76e737
15.1.1-rc.4
May 28, 2024
35fd443
include @pgsql/types
pyramation May 29, 2024
4e2ce6e
workflows
pyramation May 29, 2024
407b502
workflows
pyramation May 29, 2024
26498fc
dry run workflow
pyramation May 29, 2024
9e4627d
minor version
pyramation May 29, 2024
e255b3f
export all types
pyramation May 29, 2024
1f95e07
update version to proper @pgsql/types 🚀
pyramation May 30, 2024
c5418ef
add config generation for multiple PG versions
pyramation Jun 3, 2024
6282d8f
generated workflows for windows and no-windows
pyramation Jun 3, 2024
87a02ae
cleanup workflows
pyramation Jun 3, 2024
d0e13a7
yaml
pyramation Jun 3, 2024
1efef64
added test multi-plexing
pyramation Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build-dry-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build Dry Run 🏗

on:
workflow_dispatch:

jobs:
build-matrix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Install Dependencies 🧶
run: |
yarn

- name: Save Artifacts For NPM 🏗
uses: actions/upload-artifact@v4
with:
name: build-artifact-${{ matrix.os }}
path: |
${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' ||
matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' ||
matrix.os == 'windows-latest' && './libpg_query/windows/pg_query.lib' }}

prepare-and-publish:
needs: build-matrix
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Get Artifacts 📚
uses: actions/download-artifact@v4
with:
path: downloaded-artifacts

- name: Prepare artifacts 📦
run: |
cp ./downloaded-artifacts/build-artifact-windows-latest/pg_query.lib ./libpg_query/windows/queryparser.lib
cp ./downloaded-artifacts/build-artifact-ubuntu-latest/libpg_query.a ./libpg_query/linux/libpg_query.a
cp ./downloaded-artifacts/build-artifact-macos-latest/libpg_query.a ./libpg_query/osx/libpg_query.a
rm -rf ./downloaded-artifacts
find ./libpg_query

# - name: Publish to NPM 🚀
# run: |
# # Assuming you've set up your package.json and .npmrc correctly
# npm publish
# env:
53 changes: 53 additions & 0 deletions .github/workflows/build-supabase-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build Supabase Artifacts 🏗

on:
workflow_dispatch:

jobs:
build-matrix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Install Dependencies 🧶
run: |
yarn
yarn binary:build

- name: Save Artifacts For Supabase CDN 🏗
uses: actions/upload-artifact@v4
with:
name: build-supabase-artifact-${{ matrix.os }}
path: './build/stage/libpg-query-node/'

prepare-and-publish:
needs: build-matrix
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Get Artifacts 📖
uses: actions/download-artifact@v4
with:
path: downloaded-artifacts

- name: Prepare artifacts 📦
run: |
find ./downloaded-artifacts

# - name: Publish to NPM 🚀
# run: |
# # Assuming you've set up your package.json and .npmrc correctly
# npm publish
# env:
43 changes: 43 additions & 0 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Wasm 🛠

on:
workflow_dispatch:

jobs:
build-wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Install and Build 🚀
run: |
yarn

- name: Install Emscripten ✍🏻
run: |
sudo apt-get update
sudo apt-get install cmake python3 python3-pip
git clone --branch 3.1.59 --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.59
./emsdk activate 3.1.59
source ./emsdk_env.sh

- name: Build with Emscripten 🏗
run: |
source ./emsdk/emsdk_env.sh
emmake make
emmake make build

- name: Archive production artifacts 🏛
uses: actions/upload-artifact@v4
with:
name: compiled-files
path: wasm
144 changes: 144 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Build and Publish libpq-query 🏗

on:
workflow_dispatch:

jobs:
make-release-candidate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Configure Git 🛠
run: |
git config user.name "LaunchQL"
git config user.email "[email protected]"

- name: Minor release candidate 🧪
run: |
git fetch
npm version prerelease --preid=rc
git push
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-artifacts:
needs: make-release-candidate
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Install and Build 📦
run: |
yarn
yarn binary:build

- name: Save Artifacts For Supabase CDN 🏗
uses: actions/upload-artifact@v4
with:
name: build-supabase-artifact-${{ matrix.os }}
path: './build/stage/libpg-query-node/'

- name: Save Artifacts For NPM 🏗
uses: actions/upload-artifact@v4
with:
name: build-npm-artifact-${{ matrix.os }}
path: |
${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' ||
matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' }}

build-wasm:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Install and Build 🚀
run: |
yarn

- name: Install Emscripten ✍🏻
run: |
sudo apt-get update
sudo apt-get install cmake python3 python3-pip
git clone --branch 3.1.59 --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.59
./emsdk activate 3.1.59
source ./emsdk_env.sh

- name: Build with Emscripten 🏗
run: |
source ./emsdk/emsdk_env.sh
emmake make
emmake make build

- name: Archive production artifacts 🏛
uses: actions/upload-artifact@v4
with:
name: wasm-artifacts
path: wasm

prepare-and-publish:
needs: build-wasm
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Get Artifacts 📚
uses: actions/download-artifact@v4
with:
path: downloaded-artifacts

- name: Prepare artifacts 📦
run: |
find ./downloaded-artifacts/
cp ./downloaded-artifacts/build-npm-artifact-ubuntu-latest/libpg_query.a ./libpg_query/linux/libpg_query.a
cp ./downloaded-artifacts/build-npm-artifact-macos-latest/libpg_query.a ./libpg_query/osx/libpg_query.a
cp ./downloaded-artifacts/wasm-artifacts/libpg-query.js ./wasm/libpg-query.js
cp ./downloaded-artifacts/wasm-artifacts/libpg-query.wasm ./wasm/libpg-query.wasm
rm -rf ./downloaded-artifacts

# - name: Setup AWS CLI
# run: sudo apt-get update && sudo apt-get install awscli -y

# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.SUPABASE_AWS_KEY }}
# aws-secret-access-key: ${{ secrets.SUPABASE_AWS_SECRET }}
# aws-region: us-east-1

# - name: List Bucket Contents
# run: aws s3 ls s3://supabase-public-artifacts-bucket/

# - name: Publish to NPM 🚀
# run: |
# npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_API_KEY}}
91 changes: 91 additions & 0 deletions .github/workflows/generated-build-and-publish-no-win.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Generated Build libpg-query no windows 🛠
'on':
workflow_dispatch: null
jobs:
build-artifacts:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4
- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install and Build 📦
run: |
yarn
yarn binary:build
- name: Save Artifacts For Supabase CDN 🏗
uses: actions/upload-artifact@v4
with:
name: build-supabase-artifact-${{ matrix.os }}
path: ./build/stage/libpg-query-node/
- name: Save Artifacts For NPM 🏗
uses: actions/upload-artifact@v4
with:
name: build-npm-artifact-${{ matrix.os }}
path: |
${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' ||
matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' }}
build-wasm:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4
- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install and Build 🚀
run: |
yarn
- name: Install Emscripten ✍🏻
run: |
sudo apt-get update
sudo apt-get install cmake python3 python3-pip
git clone --branch 3.1.59 --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.59
./emsdk activate 3.1.59
source ./emsdk_env.sh
- name: Build with Emscripten 🏗
run: |
source ./emsdk/emsdk_env.sh
emmake make
emmake make build
- name: Archive production artifacts 🏛
uses: actions/upload-artifact@v4
with:
name: wasm-artifacts
path: wasm
prepare-and-publish:
needs: build-wasm
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4
- name: Get Artifacts 📚
uses: actions/download-artifact@v4
with:
path: downloaded-artifacts
- name: Prepare artifacts 📦
run: |
find ./downloaded-artifacts/
cp ./downloaded-artifacts/build-npm-artifact-windows-latest/pg_query.lib ./libpg_query/windows/queryparser.lib
cp ./downloaded-artifacts/build-npm-artifact-ubuntu-latest/libpg_query.a ./libpg_query/linux/libpg_query.a
cp ./downloaded-artifacts/build-npm-artifact-macos-latest/libpg_query.a ./libpg_query/osx/libpg_query.a
cp ./downloaded-artifacts/wasm-artifacts/libpg-query.js ./wasm/libpg-query.js
cp ./downloaded-artifacts/wasm-artifacts/libpg-query.wasm ./wasm/libpg-query.wasm
rm -rf ./downloaded-artifacts
- name: Log
run: |
find ./libpg_query/
find ./wasm
Loading
Loading