1
1
name : Build selenium-manager
2
2
3
- on : workflow_dispatch
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ debug :
7
+ description : ' Include debug symbols in binaries'
8
+ required : false
9
+ type : boolean
4
10
5
11
jobs :
6
12
win32 :
7
13
name : " [Windows x32] Build selenium-manager"
8
14
runs-on : windows-latest
9
- env :
10
- RUSTFLAGS : ' -Ctarget-feature=+crt-static'
11
15
steps :
12
16
- name : " Checkout project"
13
17
uses : actions/checkout@v4
14
18
- name : " Update Rust"
15
19
run : |
16
20
rustup update
17
- rustup toolchain install stable-i686-pc-windows-msvc
18
- rustup default stable-i686-pc-windows-msvc
21
+ rustup toolchain install stable-i686-pc-windows-gnu
22
+ rustup default stable-i686-pc-windows-gnu
19
23
rustc -vV
20
- - name : " Build release"
24
+ - name : " Build release binary"
25
+ if : ${{ inputs.debug == false }}
21
26
run : |
22
27
cd rust
23
28
cargo build --release
24
- - name : " Upload binary"
29
+ - name : " Upload release binary"
30
+ if : ${{ inputs.debug == false }}
25
31
uses : actions/upload-artifact@v3
26
32
with :
27
33
name : selenium-manager_windows-x32
28
34
path : rust/target/release/selenium-manager.exe
29
35
retention-days : 6
36
+ - name : " Build debug binary"
37
+ if : ${{ inputs.debug == true }}
38
+ run : |
39
+ cd rust
40
+ cargo build --profile dev
41
+ - name : " Upload debug binary"
42
+ if : ${{ inputs.debug == true }}
43
+ uses : actions/upload-artifact@v3
44
+ with :
45
+ name : selenium-manager_windows-x32-debug
46
+ path : rust/target/debug/selenium-manager.exe
47
+ retention-days : 6
30
48
31
49
linux64 :
32
50
name : " [Linux x64] Build selenium-manager"
@@ -42,26 +60,38 @@ jobs:
42
60
run : |
43
61
cargo install cross --git https://github.com/cross-rs/cross
44
62
cross -V
45
- - name : " Build release"
63
+ - name : " Build release binary"
64
+ if : ${{ inputs.debug == false }}
46
65
run : |
47
66
cd rust
48
67
cross build --target x86_64-unknown-linux-musl --release
49
- - name : " Tar binary (to keep executable permission)"
50
- run : |
51
- cd rust/target/x86_64-unknown-linux-musl/release
68
+ cd target/x86_64-unknown-linux-musl/release
52
69
tar -cvf ../../../../selenium-manager.tar selenium-manager
53
- - name : " Upload binary"
70
+ - name : " Upload release binary"
71
+ if : ${{ inputs.debug == false }}
54
72
uses : actions/upload-artifact@v3
55
73
with :
56
74
name : selenium-manager_linux-x64
57
75
path : selenium-manager.tar
58
76
retention-days : 6
77
+ - name : " Build debug binary"
78
+ if : ${{ inputs.debug == true }}
79
+ run : |
80
+ cd rust
81
+ cross build --target x86_64-unknown-linux-musl --profile dev
82
+ cd target/x86_64-unknown-linux-musl/debug
83
+ tar -cvf ../../../../selenium-manager.tar selenium-manager
84
+ - name : " Upload debug binary"
85
+ if : ${{ inputs.debug == true }}
86
+ uses : actions/upload-artifact@v3
87
+ with :
88
+ name : selenium-manager_linux-x64-debug
89
+ path : selenium-manager.tar
90
+ retention-days : 6
59
91
60
92
macos64 :
61
93
name : " [macOS x64/arm64] Build selenium-manager"
62
94
runs-on : macos-latest
63
- env :
64
- RUSTFLAGS : ' -Ctarget-feature=+crt-static'
65
95
steps :
66
96
- name : " Checkout project"
67
97
uses : actions/checkout@v4
@@ -70,28 +100,39 @@ jobs:
70
100
rustup update
71
101
rustup target add aarch64-apple-darwin
72
102
rustc -vV
73
- - name : " Build x64"
74
- run : |
75
- cd rust
76
- cargo build --release --target x86_64-apple-darwin
77
- - name : " Build arm64"
103
+ - name : " Build release binary"
104
+ if : ${{ inputs.debug == false }}
78
105
run : |
79
106
cd rust
80
- cargo build --release --target aarch64-apple-darwin
81
- - name : " Build universal"
82
- run : |
83
- cd rust
84
- lipo -create \
85
- -output target/selenium-manager \
107
+ cargo build --target x86_64-apple-darwin --release
108
+ cargo build --target aarch64-apple-darwin --release
109
+ lipo -create -output target/selenium-manager \
86
110
target/aarch64-apple-darwin/release/selenium-manager \
87
111
target/x86_64-apple-darwin/release/selenium-manager
88
- - name : " Tar binary (to keep executable permission)"
89
- run : |
90
- cd rust/target
112
+ cd target
91
113
tar -cvf ../../selenium-manager.tar selenium-manager
92
- - name : " Upload binary"
114
+ - name : " Upload release binary"
115
+ if : ${{ inputs.debug == false }}
93
116
uses : actions/upload-artifact@v3
94
117
with :
95
118
name : selenium-manager_macos-universal
96
119
path : selenium-manager.tar
97
120
retention-days : 6
121
+ - name : " Build debug binary"
122
+ if : ${{ inputs.debug == true }}
123
+ run : |
124
+ cd rust
125
+ cargo build --target x86_64-apple-darwin --profile dev
126
+ cargo build --target aarch64-apple-darwin --profile dev
127
+ lipo -create -output target/selenium-manager \
128
+ target/aarch64-apple-darwin/debug/selenium-manager \
129
+ target/x86_64-apple-darwin/debug/selenium-manager
130
+ cd target
131
+ tar -cvf ../../selenium-manager.tar selenium-manager
132
+ - name : " Upload debug binary"
133
+ if : ${{ inputs.debug == true }}
134
+ uses : actions/upload-artifact@v3
135
+ with :
136
+ name : selenium-manager_macos-universal-debug
137
+ path : selenium-manager.tar
138
+ retention-days : 6
0 commit comments