41
41
working-directory : packages/mcp
42
42
43
43
build :
44
+ name : build (${{ matrix.package }}, ${{ matrix.variant }})
44
45
timeout-minutes : 90
45
46
strategy :
46
47
matrix :
49
50
- cairo
50
51
- stellar
51
52
- stylus
53
+ # This variant config creates 2 branches of the matrix a default and a compile one to run the compile tests in their own job
54
+ variant :
55
+ - default
56
+ - compile
52
57
53
58
runs-on : ubuntu-latest
54
59
steps :
@@ -63,45 +68,29 @@ jobs:
63
68
uses : foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
64
69
65
70
# ----------------------------
66
- # Stellar setup
71
+ # Stellar compile setup
67
72
68
- - name : Free up disk space
69
- if : matrix.package == 'stellar'
70
- run : |
71
- sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android
72
- df -h
73
-
74
- # - name: Get scaffold-stellar latest commit SHA
75
- # if: matrix.package == 'stellar'
76
- # id: get-scaffold-sha
77
- # run: |
78
- # echo "sha=$(git ls-remote https://github.com/ahalabs/scaffold-stellar HEAD | cut -f1)" >> $GITHUB_OUTPUT
79
-
80
- # - name: Cache Scaffold CLIs
81
- # if: matrix.package == 'stellar'
82
- # uses: actions/cache@v4
83
- # with:
84
- # path: |
85
- # ~/.cargo/bin/
86
- # ~/.cargo/registry/index/
87
- # ~/.cargo/registry/cache/
88
- # ~/.cargo/git/db/
89
- # key: cargo-scaffold-${{ matrix.package }}-${{ steps.get-scaffold-sha.outputs.sha }}
90
- # restore-keys: |
91
- # cargo-scaffold-${{ matrix.package }}-
92
- # cargo-scaffold-
93
- # cargo-scaffold-
73
+ - name : Cache Rust dependencies
74
+ if : matrix.package == 'stellar' && matrix.variant == 'compile'
75
+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
76
+ with :
77
+ path : |
78
+ ~/.cargo/bin/
79
+ runner/.cargo/bin/
80
+ ~/.cargo/registry/index/
81
+ ~/.cargo/registry/cache/
82
+ ~/.cargo/git/db/
83
+ target/
84
+ key : cargo-${{ matrix.package }}
94
85
95
- # - name: Set up rust toolchain
96
- # uses: actions-rust-lang/setup-rust-toolchain@v1
97
- # with:
98
- # toolchain: stable, nightly
99
- # components: clippy, rustfmt, llvm-tools-preview
100
- # target: wasm32v1-none
101
86
102
- # - name: Set up Stellar CLI
103
- # if: matrix.package == 'stellar'
104
-
87
+ - name : Set up rust toolchain
88
+ if : matrix.package == 'stellar' && matrix.variant == 'compile'
89
+ uses : actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1.13.0
90
+ with :
91
+ toolchain : stable, nightly
92
+ components : clippy, rustfmt, llvm-tools-preview
93
+ target : wasm32v1-none
105
94
106
95
# ----------------------------
107
96
- name : Compile TypeScript
@@ -111,5 +100,20 @@ jobs:
111
100
run : yarn svelte-check
112
101
working-directory : packages/ui
113
102
- name : Run tests
114
- run : yarn test
103
+ if : matrix.variant == 'default'
104
+ run : yarn test '**/*.test.ts' '!**/*.compile.test.ts'
105
+ working-directory : packages/core/${{matrix.package}}
106
+
107
+ - name : Run tests
108
+ if : matrix.variant == 'compile'
109
+ env :
110
+ RUSTFLAGS : " "
111
+ run : |
112
+ FILES=$(find ./ -type f -name '*.compile.test.ts')
113
+ if [ -z "$FILES" ]; then
114
+ echo "No compile tests found. Skipping."
115
+ exit 0
116
+ else
117
+ yarn test '**/*.compile.test.ts'
118
+ fi
115
119
working-directory : packages/core/${{matrix.package}}
0 commit comments