Skip to content

🐛 fix: align platform manifest terminology #50

🐛 fix: align platform manifest terminology

🐛 fix: align platform manifest terminology #50

Workflow file for this run

name: "CI - Tests"
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
host:
name: host
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: host
- name: Build host crate
run: cargo build --manifest-path host/Cargo.toml
- name: Run host tests
run: cargo test --manifest-path host/Cargo.toml
spore:
name: spore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: spore-lang/spore
ref: d96212aa5a4cfe24759c21d8690642adfd357018
path: _spore
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: _spore
- name: Build spore compiler
run: cargo build --release --manifest-path _spore/Cargo.toml --bin spore
- name: Format Spore files
run: |
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
# via the example and platform modules rather than standalone file-mode checks.
# Standalone file examples
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
# Project-mode examples (format their src files)
if [ -d examples/hello-app/src ]; then
find examples/hello-app/src -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
fi
# Platform API modules
find src/basic_cli -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
# Check tests if they exist
if [ -d tests ]; then
find tests -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
fi
git diff --exit-code
- name: Check Spore files
run: |
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
# via the example and platform modules rather than standalone file-mode checks.
# Standalone file examples
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
# Platform API modules
find src/basic_cli -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
# Project-mode examples: validate with spore check
if [ -d examples/hello-app ]; then
echo "✓ Checking project-mode example examples/hello-app/src/main.sp"
_spore/target/release/spore check examples/hello-app/src/main.sp
fi
# Check tests if they exist
if [ -d tests ]; then
find tests -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
fi
- name: Build Spore files
run: |
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
# via the example and platform modules rather than standalone file-mode builds.
# Standalone file examples
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
# Platform API modules
find src/basic_cli -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
# Project-mode examples: validate with spore build
if [ -d examples/hello-app ]; then
echo "✓ Building project-mode example examples/hello-app/src/main.sp"
_spore/target/release/spore build examples/hello-app/src/main.sp
fi
# Check tests if they exist
if [ -d tests ]; then
find tests -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
fi
- name: Run standalone hello example
run: _spore/target/release/spore run examples/hello.sp
- name: Run project-mode hello-app example
run: |
if [ -d examples/hello-app ]; then
echo "✓ Running project-mode example examples/hello-app/src/main.sp"
_spore/target/release/spore run examples/hello-app/src/main.sp
fi
- name: Run Spore spec tests
run: |
if [ ! -d tests ]; then
echo "No Spore spec tests yet; skipping spore test."
exit 0
fi
find tests -name '*.sp' -type f | sort | xargs -r -n 1 _spore/target/release/spore test