File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -32,22 +32,23 @@ jobs:
32
32
-
uses :
Swatinem/[email protected]
33
33
with :
34
34
key : ${{ matrix.feature }}${{ matrix.os }}
35
- if : ${{ matrix.os != 'macos-10.15 ' }} # issue with hard-links on mac
35
+ if : ${{ matrix.os != 'macos-11 ' }} # issue with hard-links on mac
36
36
- uses : actions-rs/toolchain@v1
37
37
with :
38
38
toolchain : stable
39
39
override : true
40
40
# - run: echo "TEMPDIR_ROOT=/dev/shm" >> $GITHUB_ENV # conflicts with test `test_data_persistence`
41
- if : ${{ matrix.os != 'macos-10.15 ' }}
41
+ # if: ${{ matrix.os != 'macos-11 ' }}
42
42
- uses : actions-rs/cargo@v1
43
43
with :
44
44
command : test
45
45
args : --features ${{ matrix.feature }}
46
46
- run : echo "BITCOIND_EXE=$(find ./target/debug -name bitcoind)" >> $GITHUB_ENV
47
+ if : ${{ matrix.os != 'windows-2019' }}
47
48
- uses : actions-rs/cargo@v1
48
49
with :
49
50
command : test
50
- if : ${{ matrix.feature != '0_18_1' && matrix.feature != '0_18_0' && matrix.feature != '0_17_1' }} # would fail `test_multi_wallet`
51
+ if : ${{ matrix.feature != '0_18_1' && matrix.feature != '0_18_0' && matrix.feature != '0_17_1' && matrix.os != 'windows-2019' }} # would fail `test_multi_wallet`
51
52
52
53
53
54
cosmetics :
Original file line number Diff line number Diff line change @@ -135,8 +135,10 @@ fn main() {
135
135
} ;
136
136
137
137
if outpath. file_name ( ) . map ( |s| s. to_str ( ) ) == Some ( Some ( "bitcoind.exe" ) ) {
138
- bitcoin_exe_home. push ( outpath) ;
139
- std:: fs:: create_dir_all ( & bitcoin_exe_home) . unwrap ( ) ;
138
+ for d in outpath. iter ( ) {
139
+ bitcoin_exe_home. push ( d) ;
140
+ }
141
+ std:: fs:: create_dir_all ( & bitcoin_exe_home. parent ( ) . unwrap ( ) ) . unwrap ( ) ;
140
142
println ! ( "{:?}" , bitcoin_exe_home) ;
141
143
let mut outfile = std:: fs:: File :: create ( & bitcoin_exe_home) . unwrap ( ) ;
142
144
io:: copy ( & mut file, & mut outfile) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -416,18 +416,19 @@ impl From<bitcoincore_rpc::Error> for Error {
416
416
417
417
/// Provide the bitcoind executable path if a version feature has been specified
418
418
pub fn downloaded_exe_path ( ) -> Result < String , Error > {
419
- let ext = if cfg ! ( target_os = "windows" ) {
420
- ".exe"
421
- } else {
422
- ""
423
- } ;
424
419
if versions:: HAS_FEATURE {
425
- Ok ( format ! (
426
- "{}/bitcoin/bitcoin-{}/bin/bitcoind{}" ,
427
- env!( "OUT_DIR" ) ,
428
- versions:: VERSION ,
429
- ext
430
- ) )
420
+ let mut path: PathBuf = env ! ( "OUT_DIR" ) . into ( ) ;
421
+ path. push ( "bitcoin" ) ;
422
+ path. push ( format ! ( "bitcoin-{}" , versions:: VERSION ) ) ;
423
+ path. push ( "bin" ) ;
424
+
425
+ if cfg ! ( target_os = "windows" ) {
426
+ path. push ( "bitcoind.exe" ) ;
427
+ } else {
428
+ path. push ( "bitcoind" ) ;
429
+ }
430
+
431
+ Ok ( format ! ( "{}" , path. display( ) ) )
431
432
} else {
432
433
Err ( Error :: NoFeature )
433
434
}
You can’t perform that action at this time.
0 commit comments