43 lines
934 B
YAML
43 lines
934 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ v2 ]
|
|
pull_request:
|
|
branches: [ v2 ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Swift
|
|
run: swift build -c debug
|
|
|
|
- name: Build Release
|
|
run: swift build -c release
|
|
|
|
unit-tests:
|
|
needs: build
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run Unit Tests
|
|
run: swift test --filter "MathTest" --filter "SamplerTest" --filter "TokenizerTest" --filter "ModelTest"
|
|
|
|
lint:
|
|
needs: build
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check for debug prints
|
|
run: |
|
|
if grep -r "print(" Sources/MarkBase/ --include="*.swift" | grep -v "//.*print" | grep -v "Error"; then
|
|
echo "WARNING: Debug print() found in Sources/"
|
|
exit 0
|
|
fi
|
|
echo "No debug prints found"
|