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:
3232 - uses : Swatinem/rust-cache@v1.2.0
3333 with :
3434 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
3636 - uses : actions-rs/toolchain@v1
3737 with :
3838 toolchain : stable
3939 override : true
4040 # - 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 ' }}
4242 - uses : actions-rs/cargo@v1
4343 with :
4444 command : test
4545 args : --features ${{ matrix.feature }}
4646 - run : echo "BITCOIND_EXE=$(find ./target/debug -name bitcoind)" >> $GITHUB_ENV
47+ if : ${{ matrix.os != 'windows-2019' }}
4748 - uses : actions-rs/cargo@v1
4849 with :
4950 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`
5152
5253
5354 cosmetics :
Original file line number Diff line number Diff line change @@ -135,8 +135,10 @@ fn main() {
135135 } ;
136136
137137 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 ( ) ;
140142 println ! ( "{:?}" , bitcoin_exe_home) ;
141143 let mut outfile = std:: fs:: File :: create ( & bitcoin_exe_home) . unwrap ( ) ;
142144 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 {
416416
417417/// Provide the bitcoind executable path if a version feature has been specified
418418pub fn downloaded_exe_path ( ) -> Result < String , Error > {
419- let ext = if cfg ! ( target_os = "windows" ) {
420- ".exe"
421- } else {
422- ""
423- } ;
424419 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( ) ) )
431432 } else {
432433 Err ( Error :: NoFeature )
433434 }
You can’t perform that action at this time.
0 commit comments