@@ -42,51 +42,24 @@ jobs:
4242 steps :
4343 - uses : actions/checkout@v6
4444
45- - name : Probe spore compiler access
46- id : spore-source
47- run : |
48- api_url="https://api.github.com/repos/${SPORE_REPOSITORY}/git/commits/${SPORE_REF}"
49- status="$(curl --silent --show-error --output /dev/null --write-out '%{http_code}' \
50- -H 'Accept: application/vnd.github+json' \
51- "${api_url}")"
52-
53- if [ "${status}" = "200" ]; then
54- echo "available=true" >> "$GITHUB_OUTPUT"
55- exit 0
56- fi
57-
58- echo "available=false" >> "$GITHUB_OUTPUT"
59-
60- if [ "${status}" != "404" ]; then
61- echo "::error::Unexpected response probing ${SPORE_REPOSITORY}@${SPORE_REF} (HTTP ${status})."
62- exit 1
63- fi
64-
65- echo "::warning::Skipping compiler-backed Spore checks because the Spore compiler repository is not accessible. This can be resolved by configuring repository access credentials."
66-
6745 - uses : actions/checkout@v6
68- if : steps.spore-source.outputs.available == 'true'
6946 with :
7047 repository : ${{ env.SPORE_REPOSITORY }}
7148 ref : ${{ env.SPORE_REF }}
7249 path : _spore
7350
7451 - uses : dtolnay/rust-toolchain@stable
75- if : steps.spore-source.outputs.available == 'true'
7652 with :
7753 toolchain : stable
7854
7955 - uses : Swatinem/rust-cache@v2
80- if : steps.spore-source.outputs.available == 'true'
8156 with :
8257 workspaces : _spore
8358
8459 - name : Build spore compiler
85- if : steps.spore-source.outputs.available == 'true'
8660 run : cargo build --release --manifest-path _spore/Cargo.toml --bin spore
8761
8862 - name : Format Spore files
89- if : steps.spore-source.outputs.available == 'true'
9063 run : |
9164 # `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
9265 # via the example and platform modules rather than standalone file-mode checks.
10578 git diff --exit-code
10679
10780 - name : Check Spore files
108- if : steps.spore-source.outputs.available == 'true'
10981 run : |
11082 # `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
11183 # via the example and platform modules rather than standalone file-mode checks.
12496 fi
12597
12698 - name : Build Spore files
127- if : steps.spore-source.outputs.available == 'true'
12899 run : |
129100 # `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
130101 # via the example and platform modules rather than standalone file-mode builds.
@@ -143,19 +114,16 @@ jobs:
143114 fi
144115
145116 - name : Run standalone hello example
146- if : steps.spore-source.outputs.available == 'true'
147117 run : _spore/target/release/spore run examples/hello.sp
148118
149119 - name : Run project-mode hello-app example
150- if : steps.spore-source.outputs.available == 'true'
151120 run : |
152121 if [ -d examples/hello-app ]; then
153122 echo "✓ Running project-mode example examples/hello-app/src/main.sp"
154123 _spore/target/release/spore run examples/hello-app/src/main.sp
155124 fi
156125
157126 - name : Run Spore spec tests
158- if : steps.spore-source.outputs.available == 'true'
159127 run : |
160128 if [ ! -d tests ]; then
161129 echo "No Spore spec tests yet; skipping spore test."
0 commit comments