|
16 | 16 | settings: |
17 | 17 | - os: ubuntu-latest |
18 | 18 | bun-target: linux-x64-gnu |
19 | | - - os: ubuntu-24.04-arm |
20 | | - bun-target: linux-arm64-gnu |
21 | | - - os: ubuntu-latest |
22 | | - bun-target: linux-x64-musl |
23 | | - - os: ubuntu-24.04-arm |
24 | | - bun-target: linux-arm64-musl |
25 | | - - os: macos-13 |
26 | | - bun-target: darwin-x64 |
27 | | - - os: macos-latest |
28 | | - bun-target: darwin-arm64 |
29 | | - # - os: windows-latest # TODO: https://github.com/ChainSafe/state-transition-z/issues/10 |
30 | | - # bun-target: win32-x64-msvc |
31 | 19 |
|
32 | 20 | runs-on: ${{ matrix.settings.os }} |
33 | 21 |
|
@@ -61,175 +49,11 @@ jobs: |
61 | 49 | path: 'zig-out/lib/*state-transition-utils.*' |
62 | 50 | if-no-files-found: error |
63 | 51 |
|
64 | | - bun-benchmark: |
65 | | - name: run benchmark on ubuntu-latest x86_64 |
66 | | - needs: zig-build-upload |
67 | | - runs-on: ubuntu-latest |
68 | | - steps: |
69 | | - - name: Checkout Repository |
70 | | - uses: actions/checkout@v4 |
71 | | - - name: Download artifacts |
72 | | - uses: actions/download-artifact@v4 # no need zig installation, download artifacts from previous job instead |
73 | | - with: |
74 | | - name: linux-x64-gnu |
75 | | - path: zig-out/lib |
76 | | - - name: Install Bun |
77 | | - uses: oven-sh/setup-bun@v2 |
78 | | - with: |
79 | | - version: 1.2.13 |
80 | | - - name: Bun - Install Dependencies |
81 | | - run: bun install |
82 | | - working-directory: ./bun |
83 | | - - name: Bun - Lint Code |
84 | | - run: bun lint |
85 | | - working-directory: ./bun |
86 | | - - name: Bun - Unit Tests |
87 | | - run: bun test:unit |
88 | | - working-directory: ./bun |
89 | | - - name: Benchmark |
90 | | - run: bun benchmark |
91 | | - working-directory: ./bun |
92 | | - env: |
93 | | - # To write to PRs and commits |
94 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
95 | | - |
96 | | - bun-linux-x64-gnu: |
97 | | - name: Test bindings on linux-x64-gnu |
98 | | - needs: zig-build-upload |
99 | | - runs-on: ubuntu-latest |
100 | | - steps: |
101 | | - - name: Checkout Repository |
102 | | - uses: actions/checkout@v4 |
103 | | - - name: Download artifacts |
104 | | - uses: actions/download-artifact@v4 # no need zig installation, download artifacts from previous job instead |
105 | | - with: |
106 | | - name: linux-x64-gnu |
107 | | - path: zig-out/lib |
108 | | - - name: Install Bun |
109 | | - uses: oven-sh/setup-bun@v2 |
110 | | - with: |
111 | | - version: 1.2.13 |
112 | | - - name: Bun - Install Dependencies |
113 | | - run: bun install |
114 | | - working-directory: ./bun |
115 | | - - name: Bun - Unit Tests |
116 | | - run: bun test:unit |
117 | | - working-directory: ./bun |
118 | | - |
119 | | - bun-linux-arm64-gnu: |
120 | | - name: Test bindings on linux-arm64-gnu |
121 | | - needs: zig-build-upload |
122 | | - runs-on: ubuntu-latest |
123 | | - steps: |
124 | | - - name: Checkout Repository |
125 | | - uses: actions/checkout@v4 |
126 | | - - name: Download artifacts |
127 | | - uses: actions/download-artifact@v4 # no need zig installation, download artifacts from previous job instead |
128 | | - with: |
129 | | - name: linux-arm64-gnu |
130 | | - path: zig-out/lib # download to the same folder of "zig build -Doptimize=ReleaseSafe" |
131 | | - - name: Set up QEMU |
132 | | - uses: docker/setup-qemu-action@v3 |
133 | | - with: |
134 | | - platforms: arm64 |
135 | | - - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
136 | | - - name: Setup and run tests using Bun |
137 | | - uses: addnab/docker-run-action@v3 |
138 | | - with: |
139 | | - image: oven/bun:1.2.13 |
140 | | - options: '--platform linux/arm64 -v ${{ github.workspace }}:/project -w /project/bun' |
141 | | - run: | |
142 | | - bun install |
143 | | - bun test:unit |
144 | | -
|
145 | | - bun-linux-x64-musl: |
146 | | - name: Test bindings on linux-x64-musl |
147 | | - needs: zig-build-upload |
148 | | - runs-on: ubuntu-latest |
149 | | - steps: |
150 | | - - name: Checkout Repository |
151 | | - uses: actions/checkout@v4 |
152 | | - - name: Download artifacts |
153 | | - uses: actions/download-artifact@v4 # no need zig installation, download artifacts from previous job instead |
154 | | - with: |
155 | | - name: linux-x64-musl |
156 | | - path: zig-out/lib # download to the same folder of "zig build -Doptimize=ReleaseSafe" |
157 | | - - name: Setup and run tests using Bun |
158 | | - uses: addnab/docker-run-action@v3 |
159 | | - with: |
160 | | - image: oven/bun:1.2.13-alpine |
161 | | - options: '-v ${{ github.workspace }}:/project -w /project/bun' |
162 | | - run: | # cannot run committeeIndices.test.ts and shuffle.test.ts due to musl is not available: @chainsafe/pubkey-index-map-linux-x64-musl |
163 | | - bun install |
164 | | - bun test test/unit/pubkeyIndexMap.test.ts |
165 | | -
|
166 | | - bun-linux-arm64-musl: |
167 | | - name: Test bindings on linux-arm64-musl |
168 | | - needs: zig-build-upload |
169 | | - runs-on: ubuntu-latest |
170 | | - steps: |
171 | | - - name: Checkout Repository |
172 | | - uses: actions/checkout@v4 |
173 | | - - name: Download artifacts |
174 | | - uses: actions/download-artifact@v4 # no need zig installation, download artifacts from previous job instead |
175 | | - with: |
176 | | - name: linux-arm64-musl |
177 | | - path: zig-out/lib # download to the same folder of "zig build -Doptimize=ReleaseSafe" |
178 | | - - name: Set up QEMU |
179 | | - uses: docker/setup-qemu-action@v3 |
180 | | - with: |
181 | | - platforms: arm64 |
182 | | - - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
183 | | - - name: Setup and run tests using Bun |
184 | | - uses: addnab/docker-run-action@v3 |
185 | | - with: |
186 | | - image: oven/bun:1.2.13-alpine |
187 | | - options: '--platform linux/arm64 -v ${{ github.workspace }}:/project -w /project/bun' |
188 | | - run: | # cannot run committeeIndices.test.ts and shuffle.test.ts due to musl is not available: @chainsafe/pubkey-index-map-linux-x64-musl |
189 | | - bun install |
190 | | - bun test test/unit/pubkeyIndexMap.test.ts |
191 | | -
|
192 | | - bun-darwin: |
193 | | - name: Test bindings on macos |
194 | | - needs: zig-build-upload |
195 | | - strategy: |
196 | | - matrix: |
197 | | - settings: |
198 | | - - os: macos-13 |
199 | | - bun-target: darwin-x64 |
200 | | - - os: macos-latest |
201 | | - bun-target: darwin-arm64 |
202 | | - # - os: windows-latest # TODO: https://github.com/ChainSafe/state-transition-z/issues/10 |
203 | | - # bun-target: win32-x64-msvc |
204 | | - runs-on: ${{ matrix.settings.os }} |
205 | | - steps: |
206 | | - - name: Checkout Repository |
207 | | - uses: actions/checkout@v4 |
208 | | - - name: Download artifacts |
209 | | - uses: actions/download-artifact@v4 # no need zig installation, download artifacts from previous job instead |
210 | | - with: |
211 | | - name: ${{ matrix.settings.bun-target }} |
212 | | - path: zig-out/lib # download to the same folder of "zig build -Doptimize=ReleaseSafe" |
213 | | - - name: Install Bun |
214 | | - uses: oven-sh/setup-bun@v2 |
215 | | - with: |
216 | | - version: 1.2.13 |
217 | | - - name: Bun - Install Dependencies |
218 | | - run: bun install |
219 | | - working-directory: ./bun |
220 | | - - name: Bun - Unit Tests |
221 | | - run: bun test:unit |
222 | | - working-directory: ./bun |
223 | | - |
224 | 52 | publish: |
225 | 53 | name: Publish |
226 | 54 | runs-on: ubuntu-latest |
227 | 55 | needs: |
228 | | - - bun-linux-x64-gnu |
229 | | - - bun-linux-arm64-gnu |
230 | | - - bun-linux-x64-musl |
231 | | - - bun-linux-arm64-musl |
232 | | - - bun-darwin |
| 56 | + - zig-build-upload |
233 | 57 | steps: |
234 | 58 | - uses: googleapis/release-please-action@v4 |
235 | 59 | id: release |
|
0 commit comments