This repository was archived by the owner on Feb 16, 2024. It is now read-only.
File tree 8 files changed +94
-15
lines changed
8 files changed +94
-15
lines changed Original file line number Diff line number Diff line change @@ -159,3 +159,37 @@ jobs:
159
159
- uses : actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
160
160
with :
161
161
command : test
162
+
163
+ run_build :
164
+ name : Build for ${{ matrix.target }}
165
+ runs-on : ${{ matrix.os }}
166
+ strategy :
167
+ fail-fast : false
168
+ matrix :
169
+ include :
170
+ - target : x86_64-unknown-linux-gnu
171
+ os : ubuntu-latest
172
+ - target : x86_64-pc-windows-gnu
173
+ os : windows-latest
174
+ - target : x86_64-apple-darwin
175
+ os : macos-latest
176
+ - target : aarch64-apple-darwin
177
+ os : macos-latest
178
+ steps :
179
+ - uses : actions/checkout@v3
180
+ - uses : actions/setup-go@v3
181
+ with :
182
+ go-version : ' ^1.18.1'
183
+ - uses : actions-rs/toolchain@v1
184
+ with :
185
+ profile : minimal
186
+ toolchain : stable
187
+ target : ${{ matrix.target }}
188
+ override : true
189
+ - uses : Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # tag=v1.4.0
190
+ with :
191
+ key : build-${{ matrix.target }}
192
+ - uses : actions-rs/cargo@v1
193
+ with :
194
+ command : build
195
+ args : --target=${{ matrix.target }}
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Stackable Release Pipeline
3
+
4
+ on :
5
+ release :
6
+ types : [published]
7
+
8
+ jobs :
9
+ release :
10
+ name : Release for ${{ matrix.target }}
11
+ runs-on : ${{ matrix.os }}
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ include :
16
+ - target : x86_64-unknown-linux-gnu
17
+ os : ubuntu-latest
18
+ file-suffix : " "
19
+ - target : x86_64-pc-windows-gnu
20
+ os : windows-latest
21
+ file-suffix : " .exe"
22
+ - target : x86_64-apple-darwin
23
+ os : macos-latest
24
+ file-suffix : " "
25
+ - target : aarch64-apple-darwin
26
+ os : macos-latest
27
+ file-suffix : " "
28
+ steps :
29
+ - uses : actions/checkout@v3
30
+ - uses : actions/setup-go@v3
31
+ with :
32
+ go-version : ' ^1.18.1'
33
+ - uses : actions-rs/toolchain@v1
34
+ with :
35
+ profile : minimal
36
+ toolchain : stable
37
+ target : ${{ matrix.target }}
38
+ override : true
39
+ - uses : actions-rs/cargo@v1
40
+ with :
41
+ command : build
42
+ args : --release --target=${{ matrix.target }}
43
+ - name : Rename binary file
44
+ run : mv target/${{ matrix.target }}/release/stackablectl${{ matrix.file-suffix }} stackablectl-${{ matrix.target }}${{ matrix.file-suffix }}
45
+ - name : Upload Release binaries
46
+ uses : softprops/action-gh-release@v1
47
+ with :
48
+ files : stackablectl-${{ matrix.target }}${{ matrix.file-suffix }}
Original file line number Diff line number Diff line change 2
2
Cargo.lock
3
3
4
4
.idea /
5
+ .vscode /
5
6
6
7
go-helm-wrapper /go-helm-wrapper
7
8
go-helm-wrapper /libhelm.a
Original file line number Diff line number Diff line change @@ -24,3 +24,6 @@ reqwest = { version = "0.11", features = ["blocking"] }
24
24
[profile .release ]
25
25
# strip = true # By default on Linux and macOS, symbol information is included in the compiled .elf file.
26
26
lto = true # Enable Link Time Optimization to reduce binary size
27
+
28
+ [build-dependencies ]
29
+ gobuild = " 0.1.0-alpha.2"
Original file line number Diff line number Diff line change 1
- use std :: { env , process :: Command } ;
1
+ use gobuild :: BuildMode ;
2
2
3
3
fn main ( ) {
4
- let out_dir = env:: var ( "OUT_DIR" ) . unwrap ( ) ;
5
-
6
- Command :: new ( "sh" )
7
- . arg ( "-c" )
8
- . arg ( format ! ( "cd go-helm-wrapper/ && go build -buildmode=c-archive -ldflags -w -o {out_dir}/libhelm.a main.go && cd .." ) )
9
- . status ( ) . unwrap ( ) ;
10
-
11
- println ! ( "cargo:rustc-link-search=native={}" , out_dir) ;
12
- println ! ( "cargo:rustc-link-lib=static=helm" ) ;
13
-
14
- println ! ( "cargo:rerun-if-changed=go-helm-wrapper/main.go" ) ;
4
+ gobuild:: Build :: new ( )
5
+ . file ( "go-helm-wrapper/main.go" )
6
+ . buildmode ( BuildMode :: CArchive )
7
+ . compile ( "go-helm-wrapper" ) ;
15
8
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ nodes:
32
32
"# ;
33
33
34
34
pub fn handle_cli_arguments ( kind_cluster : & Option < Option < String > > ) {
35
- helpers:: ensure_program_installed ( "docker" ) ;
36
- helpers:: ensure_program_installed ( "kind" ) ;
37
-
38
35
if let Some ( kind_cluster) = kind_cluster {
36
+ helpers:: ensure_program_installed ( "docker" ) ;
37
+ helpers:: ensure_program_installed ( "kind" ) ;
38
+
39
39
match kind_cluster {
40
40
Some ( kind_cluster_nane) => create_cluster_if_not_exists ( kind_cluster_nane) ,
41
41
None => create_cluster_if_not_exists ( DEFAULT_KIND_CLUSTER_NAME ) ,
You can’t perform that action at this time.
0 commit comments