Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 19 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,13 @@ jobs:
restore-keys: |
${{ runner.os }}-emscripten-

- name: Cache OpenSSL
uses: actions/cache@v3
with:
path: openssl-wasm
key: ${{ runner.os }}-openssl-3.3.2-wasm
restore-keys: |
${{ runner.os }}-openssl-

- name: Build OpenSSL
- name: Build WASM: OpenSSL + SQLCipher
run: |
if [ ! -d "openssl-wasm/lib" ]; then
echo "Building OpenSSL for WASM..."
nix develop --command bash -c "./build-openssl.sh"
else
echo "Using cached OpenSSL"
fi

- name: Build WASM
nix develop --command bash -c "./build-openssl.sh && ./build-wasm.sh"

- name: Build WebGL: OpenSSL + SQLCipher
run: |
nix develop --command bash -c "./build.sh"
nix develop .#webgl --command bash -c "./build-openssl.sh && ./build-webgl.sh"

- name: Prepare cross-platform test
run: |
Expand All @@ -86,14 +73,21 @@ jobs:
test -f dist/sqlcipher.cjs
test -f dist/sqlcipher.mjs
test -f dist/sqlcipher.wasm
test -f target/results/sqlcipher-wasm.zip
test -f target/results/sqlcipher-webgl.zip

- name: Upload build artifacts
- name: Upload WASM archive
uses: actions/upload-artifact@v4
with:
name: wasm-build
path: |
dist/
lib/
name: sqlcipher-wasm
path: target/results/sqlcipher-wasm.zip
retention-days: 30

- name: Upload WebGL archive
uses: actions/upload-artifact@v4
with:
name: sqlcipher-webgl
path: target/results/sqlcipher-webgl.zip
retention-days: 30

- name: Upload test results
Expand Down Expand Up @@ -121,7 +115,6 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: |
dist/sqlcipher.cjs
dist/sqlcipher.mjs
dist/sqlcipher.wasm
target/results/sqlcipher-wasm.zip
target/results/sqlcipher-webgl.zip
generate_release_notes: true
31 changes: 7 additions & 24 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,9 @@ jobs:
restore-keys: |
${{ runner.os }}-emscripten-

- name: Cache OpenSSL
uses: actions/cache@v3
with:
path: openssl-wasm
key: ${{ runner.os }}-openssl-3.3.2-wasm
restore-keys: |
${{ runner.os }}-openssl-

- name: Build OpenSSL
run: |
if [ ! -d "openssl-wasm/lib" ]; then
echo "Building OpenSSL for WASM..."
nix develop --command bash -c "./build-openssl.sh"
else
echo "Using cached OpenSSL"
fi

- name: Quick build test
run: |
nix develop --command bash -c "./build.sh"
nix develop --command bash -c "./build-openssl.sh && ./build-wasm.sh"
ls -lh dist/

quick-test:
Expand Down Expand Up @@ -97,14 +80,14 @@ jobs:
- name: Cache OpenSSL
uses: actions/cache@v3
with:
path: openssl-wasm
path: target/results/openssl
key: ${{ runner.os }}-openssl-3.3.2-wasm
restore-keys: |
${{ runner.os }}-openssl-

- name: Build OpenSSL
run: |
if [ ! -d "openssl-wasm/lib" ]; then
if [ ! -d "target/results/openssl/lib" ]; then
echo "Building OpenSSL for WASM..."
nix develop --command bash -c "./build-openssl.sh"
else
Expand All @@ -113,7 +96,7 @@ jobs:

- name: Build
run: |
nix develop --command bash -c "./build.sh"
nix develop --command bash -c "./build-openssl.sh && ./build-wasm.sh"

- name: Prepare cross-platform test
run: |
Expand Down Expand Up @@ -149,14 +132,14 @@ jobs:
- name: Cache OpenSSL
uses: actions/cache@v3
with:
path: openssl-wasm
path: target/results/openssl
key: ${{ runner.os }}-openssl-3.3.2-wasm
restore-keys: |
${{ runner.os }}-openssl-

- name: Build OpenSSL
run: |
if [ ! -d "openssl-wasm/lib" ]; then
if [ ! -d "target/results/openssl/lib" ]; then
echo "Building OpenSSL for WASM..."
nix develop --command bash -c "./build-openssl.sh"
else
Expand All @@ -165,7 +148,7 @@ jobs:

- name: Build
run: |
nix develop --command bash -c "./build.sh"
nix develop --command bash -c "./build-openssl.sh && ./build-wasm.sh"

- name: Check bundle sizes
run: |
Expand Down
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
test-db.html

# Build artifacts
build/
target/
dist/
*.wasm
*.js.mem

# OpenSSL build artifacts
openssl-*/
openssl-wasm/
*.tar.gz

# Emscripten cache
.emscripten-cache/

Expand Down
Loading
Loading