-
Notifications
You must be signed in to change notification settings - Fork 76
179 lines (145 loc) · 4.29 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: ci
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
SSI_REF: main
RUSTFLAGS: "-Dwarnings"
defaults:
run:
working-directory: didkit
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v4
with:
path: didkit
submodules: true
- name: Checkout SSI library
uses: actions/checkout@v4
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
- name: Install Rust old stable with incremental compilation
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
profile: minimal
default: true
- name: Build
run: cargo build
- name: Test
run: cargo test
- name: Test CLI
run: cli/tests/example.sh
- name: Test CLI with ssh-agent
run: cli/tests/ssh-agent.sh
- name: Test CLI (did:tz)
env:
DID_METHOD: tz
run: cli/tests/example.sh
- name: Test CLI (JWT)
env:
PROOF_FORMAT: jwt
run: cli/tests/example.sh
- name: Test CLI (JWT VC in LDP VP)
env:
VC_PROOF_FORMAT: jwt
run: cli/tests/example.sh
- name: Test CLI (LDP VC in JWT VP)
env:
VP_PROOF_FORMAT: jwt
run: cli/tests/example.sh
- name: Test binary-signing verify example
run: examples/binary-signing/index.sh verify examples/binary-signing/hello.txt examples/binary-signing/hello-vc.jsonld
- name: Install wasm-pack
run: make -C lib install-wasm-pack
- name: Use system JDK
run: echo "$JAVA_HOME/bin" >> $GITHUB_PATH
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'dev'
- name: Opt out of Dart/Flutter analytics
run: |
dart --disable-analytics
flutter --suppress-analytics config --no-analytics
- name: Test C FFI
run: make -C lib ../target/test/c.stamp
- name: Test WASM package
run: make -C lib ../target/test/wasm.stamp
- name: Test JNI
run: make -C lib ../target/test/java.stamp
- name: Test Dart/Flutter plugin
run: make -C lib ../target/test/flutter.stamp
- name: Install Rust Android target
run: rustup target add i686-linux-android
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install NDK
run: sdkmanager --install "build-tools;33.0.2" "ndk;25.2.9519653" "cmdline-tools;latest"
- name: Install gcc-multilib
run: |
sudo apt update
sudo apt install gcc-multilib -y
- name: Build Android Archive
run: AR=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar RANLIB=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib TARGET_CC=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android19-clang PATH=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH cargo build --lib --target i686-linux-android
build_ios:
runs-on: macos-latest
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v4
with:
path: didkit
- name: Checkout SSI library
uses: actions/checkout@v4
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
- name: Install Rust iOS targets
run: make -C lib install-rustup-ios
- name: Build iOS Library
run: make -C lib ../target/test/ios.stamp
build_windows:
runs-on: windows-latest
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v4
with:
path: didkit
- name: Checkout SSI library
uses: actions/checkout@v4
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
- name: Build
run: cargo build