-
Notifications
You must be signed in to change notification settings - Fork 1
182 lines (177 loc) · 6.67 KB
/
tests.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
180
181
182
name: Tests
on: [push]
permissions: {}
jobs:
test-build-native:
permissions:
contents: read
strategy:
matrix:
include:
- arch: x86_64
target_os: macos
runner: macos-12
- arch: aarch64
target_os: macos
runner: macos-12
- arch: aarch64
target_os: ios
runner: macos-12
- arch: aarch64
target_os: tvos
runner: macos-12
- arch: x86_64
target_os: windows
runner: windows-2022
- arch: aarch64
target_os: windows
runner: windows-2022
uses: ./.github/workflows/test_build_native.yml
with:
arch: ${{ matrix.arch }}
target_os: ${{ matrix.target_os }}
runner: ${{ matrix.runner }}
test-build-docker:
permissions:
contents: read
packages: read
strategy:
matrix:
include:
- arch: x86_64
target_os: linux
- arch: i686
target_os: linux
- arch: aarch64
target_os: linux
- arch: arm64
target_os: linux
- arch: armv7hf
target_os: linux
- arch: armv5
target_os: linux
- arch: x86_64
target_os: android
- arch: i686
target_os: android
- arch: aarch64
target_os: android
- arch: armv7
target_os: android
uses: ./.github/workflows/test_build_docker.yml
secrets: inherit
with:
arch: ${{ matrix.arch }}
target_os: ${{ matrix.target_os }}
test-uniffi-generation:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- run: python3 rust_sample/ci/build_sample.py bindings
- run: cat rust_sample/dist/bindings/python/sample.py
test-darwin-artifacts:
permissions:
contents: read
strategy:
matrix:
debug: ['--debug', '']
runs-on: macos-12
needs: test-build-native
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-macos-x86_64${{ matrix.debug }}
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-macos-aarch64${{ matrix.debug }}
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-ios-aarch64${{ matrix.debug }}
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-tvos-aarch64${{ matrix.debug }}
path: rust_sample/dist
- run: python3 rust_sample/ci/build_sample.py lipo ${{ matrix.debug }}
- run: python3 rust_sample/ci/build_sample.py build-ios-simulator-stubs ${{ matrix.debug }}
- run: python3 rust_sample/ci/build_sample.py build-tvos-simulator-stubs ${{ matrix.debug }}
- run: python3 rust_sample/ci/build_sample.py xcframework ${{ matrix.debug }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: rust-sample-xcframework
path: rust_sample/dist/darwin/*.xcframework
test-android-artifacts:
permissions:
contents: read
packages: read
runs-on: ubuntu-22.04
needs: test-build-docker
container:
image: 'ghcr.io/nordsecurity/package-aar:v0.0.2'
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-x86_64
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-i686
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-aarch64
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-armv7
path: rust_sample/dist
- run: python3 rust_sample/ci/build_sample.py aar rust_sample com.nordsec.rust_sample rust_sample v1.2.3 $(pwd)/rust_sample/dist/android/java $(pwd)/rust_sample/dist/android/release
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: rust-sample-aar
path: |
rust_sample/dist/*.aar
rust_sample/dist/android_aar
test-android-artifacts-custom-files:
permissions:
contents: read
packages: read
runs-on: ubuntu-22.04
needs: test-build-docker
container:
image: 'ghcr.io/nordsecurity/package-aar-jdk-17:v0.1.0'
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-x86_64
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-i686
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-aarch64
path: rust_sample/dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: rust-sample-android-armv7
path: rust_sample/dist
- run: python3 rust_sample/ci/build_sample.py aar rust_sample com.nordsec.rust_sample rust_sample v1.2.3 $(pwd)/rust_sample/dist/android/java $(pwd)/rust_sample/dist/android/release --settings_gradle_path $(pwd)/rust_sample/templates/__settings.gradle --build_gradle_path $(pwd)/rust_sample/templates/__build.gradle --init_gradle_path $(pwd)/rust_sample/templates/__init.gradle
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: rust-sample-aar-custom
path: |
rust_sample/dist/*.aar
rust_sample/dist/android_aar