Skip to content

Commit f8e68f1

Browse files
ci: add and use uniffi-bindgen-ubuntu reusable workflow
1 parent da8e967 commit f8e68f1

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.github/workflows/build-android.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@ jobs:
4545
path: target/${{ matrix.target }}/release/libcore_crypto_ffi.*
4646
retention-days: 1
4747

48-
uniffi-bindgen:
49-
if: github.repository == 'wireapp/core-crypto'
50-
runs-on: ubuntu-latest
51-
steps:
52-
- uses: actions/checkout@v5
53-
- uses: ./.github/actions/setup-and-cache-rust
54-
- run: make uniffi-bindgen
55-
- uses: actions/upload-artifact@v4
56-
with:
57-
name: uniffi-bindgen
58-
path: target/release/uniffi-bindgen
59-
retention-days: 1
6048

6149
ffi-library:
6250
if: github.repository == 'wireapp/core-crypto'
@@ -76,7 +64,6 @@ jobs:
7664
runs-on: ubuntu-latest
7765
needs:
7866
- build-android
79-
- uniffi-bindgen
8067
- ffi-library
8168
steps:
8269
- uses: actions/checkout@v5
@@ -119,13 +106,8 @@ jobs:
119106
name: ffi-library
120107
path: target/release/
121108

122-
- name: download uniffi-bindgen
123-
uses: actions/download-artifact@v5
124-
with:
125-
name: uniffi-bindgen
126-
path: target/release/
127-
128-
- run: chmod +x target/release/uniffi-bindgen
109+
- name: fetch or make uniffi-bindgen
110+
- uses: ./.github/workflows/uniffi-bindgen-ubuntu.yml
129111

130112
- run: make android
131113
- uses: actions/upload-artifact@v4
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
concurrency:
2+
group: "${{ github.workflow }}-${{ github.ref }}-uniffi-bindgen-ubuntu"
3+
cancel-in-progress: true
4+
5+
on:
6+
workflow_call:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
CARGO_NET_GIT_FETCH_WITH_CLI: true
11+
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
12+
RELEASE: 1
13+
14+
jobs:
15+
uniffi-bindgen-ubuntu:
16+
runs-on: ubuntu-latest
17+
if: github.repository == 'wireapp/core-crypto'
18+
steps:
19+
- uses: actions/checkout@v5
20+
- uses: ./.github/actions/setup-and-cache-rust
21+
- name: Extract version
22+
run: echo "ARTIFACT_NAME=uniffi-ubuntu-$(cargo info uniffi | grep version | head -1 | awk '{print $2}')" >> $GITHUB_ENV
23+
- uses: ./.github/actions/make-or-fetch-artifact
24+
with:
25+
name: ${{ env.ARTIFACT_NAME }}
26+
make-rule: uniffi-bindgen
27+
target-path: target/release/uniffi-bindgen
28+
29+
- run: chmod +x target/release/uniffi-bindgen

0 commit comments

Comments
 (0)