11name : " Anoncreds"
22
33env :
4- RUST_VERSION : " stable 6 months ago "
4+ RUST_VERSION : " 1.81.0 "
55 CROSS_VERSION : " 0.2.4"
66
77on :
2323 required : true
2424 default : false
2525 type : boolean
26- publish-javascript-wrapper :
27- description : " Publish JavaScript Wrapper to Registries"
28- required : true
29- default : false
30- type : boolean
3126
3227jobs :
3328 lint :
3732
3833 steps :
3934 - name : Checkout
40- uses : actions/checkout@v3
35+ uses : actions/checkout@v4
4136
4237 - name : Install Rust toolchain
4338 uses : dtolnay/rust-toolchain@stable
6560
6661 steps :
6762 - name : Checkout
68- uses : actions/checkout@v3
63+ uses : actions/checkout@v4
6964
7065 - name : Install Rust toolchain
7166 uses : dtolnay/rust-toolchain@stable
@@ -123,7 +118,7 @@ jobs:
123118
124119 steps :
125120 - name : Checkout
126- uses : actions/checkout@v3
121+ uses : actions/checkout@v4
127122
128123 - name : Install Rust toolchain
129124 if : ${{ matrix.target != 'darwin-universal' }}
@@ -197,67 +192,6 @@ jobs:
197192 file : library-${{ matrix.architecture }}.tar.gz
198193 asset_name : " library-${{ matrix.architecture }}.tar.gz"
199194
200- build-javascript :
201- name : Build and Test JavaScript wrapper
202- needs : [build-release]
203- runs-on : anoncreds-ubuntu-latest
204- defaults :
205- run :
206- working-directory : wrappers/javascript
207-
208- steps :
209- - name : Checkout
210- uses : actions/checkout@v4
211-
212- - name : Set up Node.JS 18.x
213- uses : actions/setup-node@v4
214- with :
215- node-version : 18.x
216- registry-url : " https://registry.npmjs.org/"
217-
218- - uses : pnpm/action-setup@v4
219- with :
220- version : 9
221-
222- - name : Fetch library artifacts
223- uses : actions/download-artifact@v4
224- with :
225- name : library-linux-x86_64
226-
227- - name : Install dependencies
228- run : pnpm install --frozen-lockfile
229-
230- - name : Build JavaScript Wrapper
231- run : pnpm build
232-
233- - name : Lint JavaScript Wrapper
234- run : pnpm lint
235-
236- - name : Format Check JavaScript Wrapper
237- run : pnpm check-format
238-
239- - name : Type Check JavaScript Wrapper
240- run : pnpm check-types
241-
242- - name : Test JavaScript Wrapper
243- env :
244- # binary is downloaded to root of repository
245- LIB_ANONCREDS_PATH : ../../
246- run : pnpm test
247-
248- - name : Publish JavaScript Wrapper
249- if : |
250- github.event_name == 'release' ||
251- (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-javascript-wrapper == 'true')
252- run : |
253- if [[ $(cat lerna.json | grep version | head -1 | grep dev) ]]; then
254- npx lerna publish from-package --no-push --no-private --yes --no-git-tag-version --dist-tag=alpha
255- else
256- npx lerna publish from-package --no-push --no-private --yes --no-git-tag-version
257- fi
258- env :
259- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
260-
261195 build-py :
262196 name : Build Python
263197 needs : [build-release]
@@ -285,7 +219,7 @@ jobs:
285219
286220 steps :
287221 - name : Checkout
288- uses : actions/checkout@v3
222+ uses : actions/checkout@v4
289223
290224 - name : Set up Python ${{ env.PYTHON_VERSION }}
291225 uses : actions/setup-python@v4
@@ -336,7 +270,9 @@ jobs:
336270
337271 build-android-libraries :
338272 name : Build Android Libraries
273+
339274 runs-on : anoncreds-ubuntu-latest
275+
340276 strategy :
341277 matrix :
342278 target :
@@ -346,28 +282,27 @@ jobs:
346282 i686-linux-android,
347283 x86_64-linux-android,
348284 ]
349- # NB: RUST_VERSION must be <1.68 here to support NDK 17
350- env :
351- RUST_VERSION : " 1.67"
352285
353286 steps :
354287 - name : Checkout
355- uses : actions/checkout@v3
288+ uses : actions/checkout@v4
356289
357290 - name : Install Rust toolchain
358291 uses : dtolnay/rust-toolchain@stable
359292 with :
360293 toolchain : ${{ env.RUST_VERSION }}
361- targets : ${{ matrix.target }}
362294
363295 - name : Cache cargo resources
364296 uses : Swatinem/rust-cache@v2
297+ with :
298+ shared-key : deps
299+ save-if : false
365300
366301 - name : Build
367302 run : |
368- cargo install --locked --git https://github.com/cross-rs/cross --tag v${{ env.CROSS_VERSION }} cross
369- cp Cargo.lock.android Cargo.lock
370- cross build --release --target ${{ matrix.target }} --features=vendored
303+ cargo install cross --git https://github.com/cross-rs/cross.git
304+
305+ cross build --lib -- release --target ${{ matrix.target }} --features=vendored
371306
372307 - name : Upload artifacts
373308 uses : actions/upload-artifact@v4
@@ -418,12 +353,13 @@ jobs:
418353
419354 steps :
420355 - name : Checkout
421- uses : actions/checkout@v3
356+ uses : actions/checkout@v4
422357
423358 - name : Install Rust toolchain
424359 uses : dtolnay/rust-toolchain@stable
425360 with :
426361 targets : ${{matrix.architecture}}
362+ toolchain : ${{RUST_VERSION}}
427363
428364 - name : Build
429365 run : cargo build --release --target ${{matrix.architecture}} --features=vendored
@@ -444,7 +380,7 @@ jobs:
444380 github.event.inputs.publish-binaries == 'true'))
445381 steps :
446382 - name : Checkout
447- uses : actions/checkout@v3
383+ uses : actions/checkout@v4
448384
449385 - name : Fetch static libraries
450386 uses : actions/download-artifact@v4
0 commit comments