Skip to content
Merged
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
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
package_version:
description: "@ladybugdb/wasm-core version to test"
required: true
default: "0.16.0"

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: x64
- os: ubuntu-24.04-arm
platform: linux
arch: arm64
- os: macos-latest
platform: darwin
arch: arm64
- os: windows-latest
platform: win32
arch: x64
env:
LADYBUG_WASM_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.package_version || '0.16.0' }}
steps:
- name: Checkout wasm package tests
uses: actions/checkout@v4
with:
fetch-depth: 1
path: tools/wasm

- name: Fetch Ladybug source archive
shell: bash
run: |
curl -fsSL https://github.com/LadybugDB/ladybug/archive/refs/heads/main.tar.gz \
| tar -xz --strip-components=1 --exclude='*/tools/wasm'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: tools/wasm/package-lock.json

- name: Enable long paths (Windows)
if: ${{ matrix.platform == 'win32' }}
shell: pwsh
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
git config --system core.longpaths true

- name: Install test dependencies
working-directory: tools/wasm
run: npm ci

- name: Install wasm package
working-directory: tools/wasm
shell: bash
run: |
rm -rf package
package_tgz="$(npm pack "@ladybugdb/wasm-core@${LADYBUG_WASM_VERSION}" --silent)"
mkdir package
tar -xzf "${package_tgz}" -C package --strip-components=1
node -e "const pkg = require('./package/package.json'); console.log(pkg.name + '@' + pkg.version)"

- name: Run API tests
working-directory: tools/wasm
run: npm test
Loading