Skip to content

Commit 9c432ce

Browse files
authored
Merge pull request #59 from launchql/wasm/15-latest
workflows
2 parents daf4051 + ef3edbb commit 9c432ce

File tree

6 files changed

+164
-24
lines changed

6 files changed

+164
-24
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build Dry Run No Windows πŸ—
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-matrix:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [macos-latest, ubuntu-latest]
12+
steps:
13+
- name: Checkout Repository πŸ“₯
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js 🌐
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
cache: 'yarn'
21+
22+
- name: Install Dependencies 🧢
23+
run: |
24+
yarn
25+
26+
- name: Save Artifacts πŸ—
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: build-artifact-${{ matrix.os }}
30+
path: |
31+
${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' ||
32+
matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a'
33+
}}
34+
35+
prepare-and-publish:
36+
needs: build-matrix # Corrected the needs to reflect the actual job name
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/download-artifact@v4
41+
with:
42+
path: downloaded-artifacts
43+
- name: Prepare artifacts
44+
run: |
45+
# move or prepare artifacts
46+
find .
47+
# - name: Publish to NPM
48+
# run: |
49+
# # Assuming you've set up your package.json and .npmrc correctly
50+
# npm publish
51+
# env:

β€Ž.github/workflows/build-dry-run.ymlβ€Ž

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
1-
name: Build Dry Run
1+
name: Build Dry Run πŸ—
22

33
on:
44
workflow_dispatch:
55

66
jobs:
7-
build:
7+
build-matrix:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
1111
os: [windows-latest, macos-latest, ubuntu-latest]
1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Build project
15-
run: |
16-
yarn
17-
- uses: actions/upload-artifact@v2
18-
with:
19-
name: build-artifact-${{ matrix.os }}
20-
path: |
21-
${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' ||
22-
matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' ||
23-
'' }}
13+
- name: Checkout Repository πŸ“₯
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js 🌐
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
cache: 'yarn'
21+
22+
- name: Install Dependencies 🧢
23+
run: |
24+
yarn
25+
26+
- name: Save Artifacts πŸ—
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: build-artifact-${{ matrix.os }}
30+
path: |
31+
${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' ||
32+
matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' ||
33+
matrix.os == 'windows-latest' && './libpg_query/windows/queryparser.lib' }}
34+
2435
prepare-and-publish:
25-
needs: build
36+
needs: build-matrix # Corrected the needs to reflect the actual job name
2637
runs-on: ubuntu-latest
2738
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions/download-artifact@v2
30-
with:
31-
path: downloaded-artifacts
32-
- name: Prepare artifacts
33-
run: |
34-
# move or prepare artifacts
35-
ls downloaded-artifacts/*
39+
- uses: actions/checkout@v4
40+
- uses: actions/download-artifact@v4
41+
with:
42+
path: downloaded-artifacts
43+
- name: Prepare artifacts
44+
run: |
45+
# move or prepare artifacts
46+
find .
3647
# - name: Publish to NPM
3748
# run: |
3849
# # Assuming you've set up your package.json and .npmrc correctly
3950
# npm publish
4051
# env:
41-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build Wasm Linux πŸ§ͺ
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repository πŸ“₯
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js 🌐
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
cache: 'yarn'
18+
19+
- name: Install Linux Deps 🧢
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y make
23+
24+
- name: Install Dependencies 🧢
25+
run: |
26+
yarn
27+
28+
- name: Test πŸ”
29+
run: |
30+
yarn make:wasm
31+
yarn make build:wasm
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Tests πŸ§ͺ
1+
name: Run Tests Linux πŸ§ͺ
22

33
on:
44
pull_request:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run Tests Mac πŸ§ͺ
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
run-tests:
8+
runs-on: macos-latest
9+
steps:
10+
- name: Checkout Repository πŸ“₯
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js 🌐
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
cache: 'yarn'
18+
19+
- name: Install Dependencies 🧢
20+
run: |
21+
yarn
22+
23+
- name: Test πŸ”
24+
run: yarn test
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run Tests Windows πŸ§ͺ
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
run-tests:
8+
runs-on: windows-latest
9+
steps:
10+
- name: Checkout Repository πŸ“₯
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js 🌐
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
cache: 'yarn'
18+
19+
- name: Install Dependencies 🧢
20+
run: |
21+
yarn
22+
23+
- name: Test πŸ”
24+
run: yarn test

0 commit comments

Comments
Β (0)