-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from powersync-ja/new-web-build
New WASM build
- Loading branch information
Showing
14 changed files
with
404 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Prepare | ||
description: Prepare CI environment | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: "3.x" | ||
channel: "stable" | ||
- name: Download sqlite3.wasm | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: sqlite3-wasm | ||
path: packages/sqlite3_wasm_build/dist/ | ||
- name: Install Melos | ||
shell: sh | ||
run: flutter pub global activate melos | ||
- name: Install dependencies | ||
shell: sh | ||
env: | ||
IS_IN_POWERSYNC_CI: 1 | ||
run: melos prepare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Check packages and demos | ||
|
||
concurrency: | ||
group: packages-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
setup: | ||
uses: ./.github/workflows/prepare_wasm.yml | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/prepare | ||
- name: Check formatting | ||
run: melos format:check:packages | ||
- name: Lint | ||
run: melos analyze:packages | ||
- name: Publish dry-run | ||
run: melos publish --dry-run --yes | ||
|
||
pana: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/prepare | ||
- name: Check pana score | ||
run: | | ||
flutter pub global activate pana | ||
melos analyze:packages:pana --no-select | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/prepare | ||
- name: Run flutter tests | ||
run: melos test | ||
- name: Run dart tests | ||
run: melos test:web | ||
|
||
check_demos: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/prepare | ||
- name: Check formatting | ||
run: melos format:check:demos | ||
- name: Lint | ||
run: | | ||
./.github/workflows/scripts/copy-config.sh | ||
melos analyze:demos |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build SQLite3 WASM | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
compile_sqlite3_wasm: | ||
name: Compile sqlite3 wasm | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
id: cache_build | ||
with: | ||
path: packages/sqlite3_wasm_build/dist/ | ||
key: wasm-${{ runner.os }}-${{ hashFiles('packages/sqlite3_wasm_build/build.sh') }} | ||
|
||
- name: Setup Homebrew | ||
if: steps.cache_build.outputs.cache-hit != 'true' | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
- name: Install Dart SDK | ||
if: steps.cache_build.outputs.cache-hit != 'true' | ||
uses: dart-lang/setup-dart@v1 | ||
- name: Setup macOS build dependencies | ||
if: steps.cache_build.outputs.cache-hit != 'true' | ||
run: brew install cmake llvm lld binaryen wasi-libc wasi-runtimes | ||
- name: Compile sqlite3.wasm on macOS | ||
if: steps.cache_build.outputs.cache-hit != 'true' | ||
working-directory: packages/sqlite3_wasm_build | ||
run: ./build.sh | ||
|
||
- name: Upload built sqlite3 binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sqlite3-wasm | ||
path: packages/sqlite3_wasm_build/dist/ | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
run_install: false | ||
version: 10 | ||
- name: Dry-run npm publish | ||
working-directory: packages/sqlite3_wasm_build | ||
run: | | ||
pnpm i | ||
pnpm publish --no-git-checks --dry-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.