@@ -12,34 +12,52 @@ jobs:
12
12
include :
13
13
- os : macOS-latest
14
14
target : aarch64-apple-darwin
15
- path : macos-arm64
15
+ path : macos/arm64
16
+ shared-ext : dylib
17
+ static-ext : a
16
18
- os : macOS-latest
17
19
target : x86_64-apple-darwin
18
- path : macos-x86_64
20
+ path : macos/x86_64
21
+ shared-ext : dylib
22
+ static-ext : a
19
23
- os : windows-2019
20
24
target : aarch64-pc-windows-msvc
21
- path : win-arm64-msvc
25
+ path : windows/arm64/msvc
26
+ shared-ext : dll
27
+ static-ext : lib
22
28
- os : windows-2019
23
29
target : i686-pc-windows-msvc
24
- path : win-x86-msvc
30
+ path : windows/x86/msvc
31
+ shared-ext : dll
32
+ static-ext : lib
25
33
- os : windows-2019
26
34
target : x86_64-pc-windows-msvc
27
- path : win-x86_64-msvc
35
+ path : windows/x86_64/msvc
36
+ shared-ext : dll
37
+ static-ext : lib
28
38
- os : ubuntu-latest
29
39
target : i686-pc-windows-gnu
30
40
use-cross : true
31
- path : win-x86-mingw
41
+ path : windows/x86/mingw
42
+ shared-ext : dll
43
+ static-ext : a
32
44
- os : ubuntu-latest
33
45
target : x86_64-pc-windows-gnu
34
46
use-cross : true
35
- path : win-x86_64-mingw
47
+ path : windows/x86_64/mingw
48
+ shared-ext : dll
49
+ static-ext : a
36
50
- os : ubuntu-latest
37
51
target : i686-unknown-linux-gnu
38
52
use-cross : true
39
- path : linux-x86
53
+ path : linux/x86
54
+ shared-ext : so
55
+ static-ext : a
40
56
- os : ubuntu-latest
41
57
target : x86_64-unknown-linux-gnu
42
- path : linux-x86_64
58
+ path : linux/x86_64
59
+ shared-ext : so
60
+ static-ext : a
43
61
name : cargo build
44
62
steps :
45
63
- uses : actions/checkout@v3
@@ -59,17 +77,27 @@ jobs:
59
77
use-cross : ${{ matrix.use-cross || false }}
60
78
args : --package accesskit_c --release --target ${{ matrix.target }}
61
79
80
+ - shell : bash
81
+ run : |
82
+ mkdir -p artifacts/${{ matrix.path }}/shared
83
+ mkdir -p artifacts/${{ matrix.path }}/static
84
+
85
+ - if : startsWith(matrix.os, 'windows')
86
+ run : |
87
+ mv target/${{ matrix.target }}/release/accesskit.dll.lib artifacts/${{ matrix.path }}/shared/accesskit.lib
88
+ mv target/${{ matrix.target }}/release/*.pdb artifacts/${{ matrix.path }}/shared
89
+ - if : contains(matrix.path, 'mingw')
90
+ run : mv target/${{ matrix.target }}/release/libaccesskit.dll.a artifacts/${{ matrix.path }}/shared/libaccesskit.a
91
+
92
+ - run : |
93
+ mv target/${{ matrix.target }}/release/*.${{ matrix.shared-ext }} artifacts/${{ matrix.path }}/shared
94
+ mv target/${{ matrix.target }}/release/*.${{ matrix.static-ext }} artifacts/${{ matrix.path }}/static
95
+
62
96
- name : Upload binaries
63
97
uses : actions/upload-artifact@v3
64
98
with :
65
- name : ${{ matrix.path }}
66
- path : |
67
- target/${{ matrix.target }}/release/*.a
68
- target/${{ matrix.target }}/release/*.dll
69
- target/${{ matrix.target }}/release/*.dylib
70
- target/${{ matrix.target }}/release/*.lib
71
- target/${{ matrix.target }}/release/*.pdb
72
- target/${{ matrix.target }}/release/*.so
99
+ name : ${{ matrix.target }}
100
+ path : artifacts
73
101
74
102
generate-headers :
75
103
if : startsWith(github.ref_name, 'accesskit_c-v')
@@ -84,14 +112,17 @@ jobs:
84
112
85
113
- uses : actions/download-artifact@v3
86
114
with :
87
- path : accesskit_c/lib
115
+ path : artifacts
88
116
89
- - run : mv accesskit_c/lib/headers accesskit_c/include
90
- - run : cp -r bindings/c/examples accesskit_c/
91
- - run : cp bindings/c/*.md accesskit_c/
92
- - run : cp LICENSE* accesskit_c/
93
- - run : mv accesskit_c ${{ github.ref_name }}
94
- - run : zip -r ${{ github.ref_name }}.zip ${{ github.ref_name }}
117
+ - run : |
118
+ mkdir -p accesskit_c/lib
119
+ mv artifacts/headers accesskit_c/include
120
+ cp -r artifacts/*/* accesskit_c/lib
121
+ cp -r bindings/c/examples accesskit_c/
122
+ cp bindings/c/*.md accesskit_c/
123
+ cp LICENSE* accesskit_c/
124
+ mv accesskit_c ${{ github.ref_name }}
125
+ zip -r ${{ github.ref_name }}.zip ${{ github.ref_name }}
95
126
96
127
- uses : AButler/upload-release-assets@v2.0
97
128
with :
0 commit comments