Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
35ee9bb
feat: add DocC documentation, comprehensive tests, and cross-platform CI
zamderax Dec 9, 2025
2b1ab38
fix: use latest stable Rust for CI builds
zamderax Dec 9, 2025
c162b10
fix: simplify CI to focus on macOS, mark Linux as experimental
zamderax Dec 9, 2025
74a0b84
feat: Swift 6.2 cross-platform CI with artifact bundles
zamderax Dec 9, 2025
a4bbc95
fix: use swift-actions/setup-swift for reliable CI
zamderax Dec 9, 2025
b468884
fix: use SwiftyLab/setup-swift with Swift 6.2
zamderax Dec 9, 2025
3cbe1f7
feat: add Windows support with artifact bundles (SE-0482)
zamderax Dec 9, 2025
4d547c7
fix: use perl for reliable protocol regex replacement
zamderax Dec 9, 2025
7104546
docs: clarify artifact bundle vs xcframework in Package.swift
zamderax Dec 9, 2025
078b48b
feat: add release workflow for cross-platform artifact bundles (SE-0482)
zamderax Dec 9, 2025
41ca098
fix: use cross-platform artifact bundle URL (checksum pending first r…
zamderax Dec 9, 2025
a3077cf
chore: align cross-platform artifact bundle flow
zamderax Dec 9, 2025
15218e3
chore: allow manual ci dispatch
zamderax Dec 9, 2025
30b873f
fix: prefix windows static lib with lib for SwiftPM
zamderax Dec 9, 2025
4020090
fix: include legacy loro_swift.lib alongside libloro_swift.lib on Win…
zamderax Dec 9, 2025
913df50
ci: add explicit LIBPATH for windows swift test
zamderax Dec 9, 2025
f1cb22e
fix(windows): link ntdll for static binary target
zamderax Dec 9, 2025
75ed4a4
docs: require Swift 6.2+, clarify supported platforms
zamderax Dec 9, 2025
670efd4
build: add tvOS/watchOS/visionOS variants to artifact bundle
zamderax Dec 10, 2025
930cdc9
docs: add Swift 6.2+ and platform badges
zamderax Dec 10, 2025
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
94 changes: 75 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,84 @@
name: build-test
name: swift

on:
push:
branches: [main, master, develop]
pull_request:
branches: [main]
branches: [main, master, develop]
workflow_dispatch:

jobs:
build-test:
runs-on: macos-14
env:
LOCAL_BUILD: true
DEVELOPER_DIR: /Applications/Xcode_15.4.app
build-and-test:
name: Swift ${{ matrix.swift }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
swift: ["6.2"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1

- name: Setup Swift
uses: SwiftyLab/setup-swift@v1
with:
profile: minimal
toolchain: 1.82.0
default: true
- name: get xcode information
swift-version: ${{ matrix.swift }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Swift version
run: swift --version

- name: Rust version
run: rustc --version

- name: Build artifact bundle (Unix)
if: runner.os != 'Windows'
run: |
chmod +x ./scripts/build_artifactbundle.sh
./scripts/build_artifactbundle.sh

- name: Build artifact bundle (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: ./scripts/build_artifactbundle.ps1

- name: Build
run: swift build -c release
env:
LOCAL_BUILD: "1"

- name: Run tests
if: runner.os != 'Windows'
run: swift test
env:
LOCAL_BUILD: "1"

- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
env:
LOCAL_BUILD: "1"
run: |
$libPath = (Resolve-Path ".\loroFFI.artifactbundle\loroFFI-windows").Path
swift test `
-Xlinker "/LIBPATH:$libPath"

- name: Audit undefined symbols (informational)
if: runner.os != 'Windows'
run: |
xcodebuild -version
swift --version
- name: build xcframework
run: ./scripts/build_macos.sh
- name: Swift tests
run: LOCAL_BUILD=true swift test
shopt -s nullglob
for lib in loroFFI.artifactbundle/**/*.a; do
echo "== $lib =="
if command -v llvm-nm >/dev/null 2>&1; then
llvm-nm -u "$lib" || true
elif command -v nm >/dev/null 2>&1; then
nm -u "$lib" || true
else
echo "No nm available to audit $lib" >&2
exit 1
fi
done
Loading