File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,26 +194,10 @@ jobs:
194194 repo-token : ${{ secrets.GITHUB_TOKEN }}
195195
196196 - name : Build crate as static library
197- run : |
198- cargo rustc --package temporal-sdk-core-c-bridge --features xz2-static -- --crate-type=staticlib
199- ls -lh target/debug/deps/*.a
197+ run : cargo rustc --package temporal-sdk-core-c-bridge --features xz2-static -- --crate-type=staticlib
200198
201199 - name : Build C test program
202- run : |
203- cat > test.c <<'EOF'
204- #include "temporal-sdk-core-c-bridge.h"
205- #include <stdio.h>
206-
207- int main(void) {
208- struct TemporalCoreCancellationToken *tok = temporal_core_cancellation_token_new();
209- temporal_core_cancellation_token_free(tok);
210- printf("C bridge static link test passed!\\n");
211- return 0;
212- }
213- EOF
214-
215- # Compile test.c and link statically against libtemporal_sdk_core_c_bridge.a
216- gcc -I./core-c-bridge/include test.c target/debug/deps/libtemporal_sdk_core_c_bridge.a -lpthread -ldl -lm -o test
200+ run : gcc -I./core-c-bridge/include tests/c_bridge_smoke_test.c target/debug/deps/libtemporal_sdk_core_c_bridge.a -lpthread -ldl -lm -o test
217201
218202 - name : Run C test program
219203 run : ./test
Original file line number Diff line number Diff line change 1+ #include "temporal-sdk-core-c-bridge.h"
2+ #include <stdio.h>
3+
4+ int main (void ) {
5+ // Just do something simple to confirm the bridge works
6+ struct TemporalCoreCancellationToken * tok = temporal_core_cancellation_token_new ();
7+ temporal_core_cancellation_token_free (tok );
8+ printf ("C bridge smoke test passed!\n" );
9+ return 0 ;
10+ }
You can’t perform that action at this time.
0 commit comments