Skip to content

LMAssembly // LMCoreEX: Patch consolidation behavior. #139

LMAssembly // LMCoreEX: Patch consolidation behavior.

LMAssembly // LMCoreEX: Patch consolidation behavior. #139

name: debug-macOS-SPMTestsAndPackage
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: test-macOS-SPMTestsAndPackage
runs-on: macos-26
# NOTE: some external submodule hosting environments may exhibit intermittent
# certificate verification problems on the runner. This workflow keeps a
# temporary TLS verification override scoped to the checkout step only (not
# to the entire job) to avoid broader security impact while keeping the CI
# resilient. See the checkout step for the override.
steps:
- uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: '26.2.0'
- uses: actions/checkout@v4
env:
# Limit TLS verification override to this step only. Do NOT enable this
# job-wide; we only apply it for checkout due to external host cert
# issues. Prefer a more secure solution if possible (e.g., a GitHub
# mirror or proper CA install on the runner).
GIT_SSL_NO_VERIFY: true
with:
submodules: true
- name: Cache SPM build
uses: actions/cache@v4
with:
path: |
Packages/*/.build
.build
~/.swiftpm
key: ${{ runner.os }}-swift-${{ hashFiles('**/Package.resolved', '**/Packages/*/Package.swift') }}
restore-keys: |
${{ runner.os }}-swift-
- name: Clean
run: |
make spmClean
shell: bash
- name: Build-And-Archive
run: |
make archive
shell: bash
- name: Run Package Tests (Selected)
run: |
# Run tests sequentially to avoid parallel pressure. Use zsh syntax.
packages=(
'./Packages/vChewing_Shared'
'./Packages/vChewing_MainAssembly4Darwin'
'./Packages/vChewing_LangModelAssembly'
'./Packages/vChewing_Homa'
'./Packages/vChewing_Typewriter'
'./Packages/vChewing_Hotenka'
'./Packages/vChewing_OSFrameworkImpl'
'./Packages/vChewing_UpdateSputnik'
'./Packages/Jad_BookmarkManager'
)
for pkg in "${packages[@]}"; do
echo "Checking tests for ${pkg}"
if [ ! -d "${pkg}/Tests" ]; then
echo "No Tests directory for ${pkg}; skipping."
continue
fi
# check if Tests directory contains any source files
TESTFILES=$(find "${pkg}/Tests" -type f -name "*.*" | wc -l)
if [ "$TESTFILES" -eq 0 ]; then
echo "No test sources found for ${pkg}; skipping."
continue
fi
echo "Running tests for ${pkg}"
swift test --no-parallel --package-path "${pkg}"
code=$?
if [ "$code" -eq 1 ]; then
echo "No tests found for ${pkg}; continuing."
continue
fi
if [ "$code" -ne 0 ]; then
echo "Tests failed in ${pkg} with code ${code}."
exit "$code"
fi
done
shell: bash