Skip to content

Commit abdbb39

Browse files
committed
🔧 ci: streamline CI workflow for Spore CLI commands
- Replaced manual commands with direct `spore` CLI invocations for formatting, checking, building, running, and testing Spore files. - Simplified the workflow by removing legacy compatibility checks and consolidating commands for clarity and efficiency.
1 parent c27b451 commit abdbb39

1 file changed

Lines changed: 9 additions & 54 deletions

File tree

‎.github/workflows/ci-tests.yml‎

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -56,72 +56,27 @@ jobs:
5656
with:
5757
workspaces: _spore
5858

59-
- name: Build spore compiler
60-
run: cargo build --release --manifest-path _spore/Cargo.toml --bin spore
59+
- name: Install spore CLI
60+
run: cargo install --locked --path _spore --bin spore --force
6161

6262
- name: Format Spore files
63-
run: |
64-
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
65-
# via the example and platform modules rather than standalone file-mode checks.
66-
# Standalone file examples
67-
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
68-
# Project-mode examples (format their src files)
69-
find examples/hello-app/src -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
70-
# Platform API modules
71-
find src/basic_cli -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
72-
# Check tests if they exist
73-
if [ -d tests ]; then
74-
find tests -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
75-
fi
76-
git diff --exit-code
63+
run: spore format --check
7764

7865
- name: Check Spore files
79-
run: |
80-
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
81-
# via the example and platform modules rather than standalone file-mode checks.
82-
# Standalone file examples
83-
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
84-
# Platform API modules
85-
find src/basic_cli -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
86-
# Project-mode examples: validate with spore check
87-
(
88-
cd examples/hello-app
89-
echo "✓ Checking project-mode example src/main.sp"
90-
../../_spore/target/release/spore check src/main.sp
91-
)
92-
# Check tests if they exist
93-
if [ -d tests ]; then
94-
find tests -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
95-
fi
66+
run: spore check
9667

9768
- name: Build Spore files
98-
run: |
99-
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
100-
# via the example and platform modules rather than standalone file-mode builds.
101-
# Standalone file examples
102-
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
103-
# Platform API modules
104-
find src/basic_cli -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
105-
# Project-mode examples: validate with spore build
106-
(
107-
cd examples/hello-app
108-
echo "✓ Building project-mode example src/main.sp"
109-
../../_spore/target/release/spore build src/main.sp
110-
)
111-
# Check tests if they exist
112-
if [ -d tests ]; then
113-
find tests -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
114-
fi
69+
run: spore build
11570

11671
- name: Run standalone hello example
117-
run: _spore/target/release/spore run examples/hello.sp
72+
run: spore run examples/hello.sp
11873

11974
- name: Run project-mode hello-app example
12075
run: |
12176
(
12277
cd examples/hello-app
123-
echo "✓ Running project-mode example src/main.sp"
124-
../../_spore/target/release/spore run src/main.sp
78+
echo "✓ Running project-mode example (default entry)"
79+
spore run
12580
)
12681
12782
- name: Run Spore spec tests
@@ -130,4 +85,4 @@ jobs:
13085
echo "No Spore spec tests yet; skipping spore test."
13186
exit 0
13287
fi
133-
find tests -name '*.sp' -type f | sort | xargs -r -n 1 _spore/target/release/spore test
88+
spore test

0 commit comments

Comments
 (0)