Skip to content

Commit 65afbee

Browse files
update to v0.1.4 (#13)
Co-authored-by: k-matsuzawa <[email protected]>
1 parent 09fa232 commit 65afbee

19 files changed

+958
-377
lines changed

.github/workflows/check_pre-merge_develop.yml

+5-34
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,14 @@ jobs:
2525
uses: actions/setup-dotnet@v1
2626
with:
2727
dotnet-version: ${{ matrix.dotnet }}
28-
- uses: actions/checkout@v1
29-
- name: cmake-useCache-ubuntu
30-
if: matrix.os == 'ubuntu-latest'
31-
uses: actions/cache@v1
32-
id: cache
33-
with:
34-
path: cache/cmake
35-
key: ${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-0
36-
restore-keys: |
37-
${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-
38-
- name: cmake-download-ubuntu
39-
if: matrix.os == 'ubuntu-latest' && steps.cache.outputs.cache-hit != 'true'
40-
run: |
41-
mkdir -p cache/cmake
42-
cd cache/cmake
43-
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
44-
cd ../..
45-
- name: cmake-setting-ubuntu
46-
if: matrix.os == 'ubuntu-latest'
47-
run: |
48-
export cmake_file_name="cmake-$CMAKE_VERSION-Linux-x86_64"
49-
cd cache/cmake
50-
tar zxvf $cmake_file_name.tar.gz
51-
chmod +x $cmake_file_name/bin/cmake $cmake_file_name/bin/ctest
52-
export CURRENT_DIR=$(pwd)
53-
echo ::add-path::$CURRENT_DIR/$cmake_file_name/bin
54-
cd ../..
55-
- name: build and test - 3.1.200
56-
if: matrix.os != 'windows-latest' && matrix.dotnet != '2.1.804'
28+
- uses: actions/checkout@v2
29+
- name: build and test
30+
if: matrix.os != 'windows-latest'
5731
run: |
5832
./tools/build.sh
5933
./tools/test.sh
60-
- name: build and test on win - 3.1.200
61-
if: matrix.os == 'windows-latest' && matrix.dotnet != '2.1.804'
34+
- name: build and test on win
35+
if: matrix.os == 'windows-latest'
6236
run: |
6337
./tools/build_core3.bat
6438
./tools/test_core3.bat
65-
- name: ubuntu-after
66-
if: matrix.os == 'ubuntu-latest'
67-
run: rm -rf cache/cmake/cmake-$CMAKE_VERSION-Linux-x86_64

.github/workflows/check_pre-merge_master.yml

+5-34
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,14 @@ jobs:
2525
uses: actions/setup-dotnet@v1
2626
with:
2727
dotnet-version: ${{ matrix.dotnet }}
28-
- uses: actions/checkout@v1
29-
- name: cmake-useCache-ubuntu
30-
if: matrix.os == 'ubuntu-latest'
31-
uses: actions/cache@v1
32-
id: cache
33-
with:
34-
path: cache/cmake
35-
key: ${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-0
36-
restore-keys: |
37-
${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-
38-
- name: cmake-download-ubuntu
39-
if: matrix.os == 'ubuntu-latest' && steps.cache.outputs.cache-hit != 'true'
40-
run: |
41-
mkdir -p cache/cmake
42-
cd cache/cmake
43-
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
44-
cd ../..
45-
- name: cmake-setting-ubuntu
46-
if: matrix.os == 'ubuntu-latest'
47-
run: |
48-
export cmake_file_name="cmake-$CMAKE_VERSION-Linux-x86_64"
49-
cd cache/cmake
50-
tar zxvf $cmake_file_name.tar.gz
51-
chmod +x $cmake_file_name/bin/cmake $cmake_file_name/bin/ctest
52-
export CURRENT_DIR=$(pwd)
53-
echo ::add-path::$CURRENT_DIR/$cmake_file_name/bin
54-
cd ../..
55-
- name: build and test - 3.1.200
56-
if: matrix.os != 'windows-latest' && matrix.dotnet != '2.1.804'
28+
- uses: actions/checkout@v2
29+
- name: build and test
30+
if: matrix.os != 'windows-latest'
5731
run: |
5832
./tools/build.sh
5933
./tools/test.sh
60-
- name: build and test on win - 3.1.200
61-
if: matrix.os == 'windows-latest' && matrix.dotnet != '2.1.804'
34+
- name: build and test on win
35+
if: matrix.os == 'windows-latest'
6236
run: |
6337
./tools/build_core3.bat
6438
./tools/test_core3.bat
65-
- name: ubuntu-after
66-
if: matrix.os == 'ubuntu-latest'
67-
run: rm -rf cache/cmake/cmake-$CMAKE_VERSION-Linux-x86_64

.github/workflows/check_pre-merge_sprint.yml

+1-30
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,7 @@ jobs:
2525
uses: actions/setup-dotnet@v1
2626
with:
2727
dotnet-version: ${{ matrix.dotnet }}
28-
- uses: actions/checkout@v1
29-
- name: cmake-useCache-ubuntu
30-
if: matrix.os == 'ubuntu-latest'
31-
uses: actions/cache@v1
32-
id: cache
33-
with:
34-
path: cache/cmake
35-
key: ${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-0
36-
restore-keys: |
37-
${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-
38-
- name: cmake-download-ubuntu
39-
if: matrix.os == 'ubuntu-latest' && steps.cache.outputs.cache-hit != 'true'
40-
run: |
41-
mkdir -p cache/cmake
42-
cd cache/cmake
43-
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
44-
cd ../..
45-
- name: cmake-setting-ubuntu
46-
if: matrix.os == 'ubuntu-latest'
47-
run: |
48-
export cmake_file_name="cmake-$CMAKE_VERSION-Linux-x86_64"
49-
cd cache/cmake
50-
tar zxvf $cmake_file_name.tar.gz
51-
chmod +x $cmake_file_name/bin/cmake $cmake_file_name/bin/ctest
52-
export CURRENT_DIR=$(pwd)
53-
echo ::add-path::$CURRENT_DIR/$cmake_file_name/bin
54-
cd ../..
28+
- uses: actions/checkout@v2
5529
- name: build and test on ubuntu
5630
if: matrix.os == 'ubuntu-latest'
5731
run: |
@@ -67,6 +41,3 @@ jobs:
6741
run: |
6842
.\tools\build.bat
6943
.\tools\test.bat
70-
- name: ubuntu-after
71-
if: matrix.os == 'ubuntu-latest'
72-
run: rm -rf cache/cmake/cmake-$CMAKE_VERSION-Linux-x86_64

.github/workflows/create_release-and-upload.yml

+4-30
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- First Change
3232
- Second Change
3333
draft: false
34-
prerelease: false
34+
prerelease: true
3535
# continue-on-error: true
3636
- name: write upload url
3737
env:
@@ -44,8 +44,8 @@ jobs:
4444
name: artifact-upload_url
4545
path: upload_url.txt
4646

47-
upload-object-windows-mingw:
48-
name: upload-object-win-mingw
47+
upload-object-windows:
48+
name: upload-object-win
4949
needs: create-releases
5050
runs-on: windows-latest
5151

@@ -112,7 +112,7 @@ jobs:
112112
runs-on: ${{ matrix.os }}
113113
strategy:
114114
matrix:
115-
os: [ubuntu-18.04]
115+
os: [ubuntu-18.04, ubuntu-20.04]
116116

117117
steps:
118118
- name: setup dotnet
@@ -124,30 +124,6 @@ jobs:
124124
- name: Get the version
125125
id: get_version
126126
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
127-
- name: cmake-useCache-ubuntu
128-
uses: actions/cache@v1
129-
id: cache
130-
with:
131-
path: cache/cmake
132-
key: ${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-0
133-
restore-keys: |
134-
${{ runner.os }}-cmake-${{ env.CMAKE_VERSION }}-x64-
135-
- name: cmake-download-ubuntu
136-
if: steps.cache.outputs.cache-hit != 'true'
137-
run: |
138-
mkdir -p cache/cmake
139-
cd cache/cmake
140-
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
141-
cd ../..
142-
- name: cmake-setting-ubuntu
143-
run: |
144-
export cmake_file_name="cmake-$CMAKE_VERSION-Linux-x86_64"
145-
cd cache/cmake
146-
tar zxvf $cmake_file_name.tar.gz
147-
chmod +x $cmake_file_name/bin/cmake $cmake_file_name/bin/ctest
148-
export CURRENT_DIR=$(pwd)
149-
echo ::add-path::$CURRENT_DIR/$cmake_file_name/bin
150-
cd ../..
151127
- name: cmake-build
152128
run: |
153129
./tools/build.sh
@@ -181,8 +157,6 @@ jobs:
181157
asset_path: ./dist/cfd.zip
182158
asset_name: cfdcs-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-dotnet${{env.DOTNET_VERSION}}-gcc-x86_64.zip
183159
asset_content_type: application/zip
184-
- name: ubuntu-after
185-
run: rm -rf cache/cmake/cmake-$CMAKE_VERSION-Linux-x86_64
186160

187161
upload-object-macos:
188162
name: upload-object-macos

README.md

+45-22
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,34 @@
88

99
## Dependencies
1010

11+
- C# (8.0 or higher)
12+
- .NET Core 3.0 or higher
13+
- C/C++ Compiler
14+
  - can compile c++11
15+
- CMake (3.14.3 or higher)
16+
1117
### Windows
1218

1319
- C# (8.0 or higher)
1420
- .NET Core 3.0 or higher
15-
- CMake (3.14.3 or higher)
16-
- Build Tools for Visual Studio (2017 or higher)
21+
- [CMake](https://cmake.org/) (3.14.3 or higher)
22+
- MSVC
23+
- [Visual Studio](https://visualstudio.microsoft.com/downloads/) (Verified version is 2017 or higher)
24+
- [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/) (2017 or higher)
25+
- (Using only) [msvc redistribution package](https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads)
1726

1827
### MacOS
1928

2029
- C# (8.0 or higher)
2130
- .NET Core 3.0 or higher
22-
- CMake (3.14.3 or higher)
23-
2431
- [Homebrew](https://brew.sh/)
2532

2633
```Shell
2734
# xcode cli tools
2835
xcode-select --install
2936

3037
# install dependencies using Homebrew
31-
brew install cmake
38+
brew install cmake cask
3239
brew cask install dotnet-sdk
3340
```
3441

@@ -53,20 +60,17 @@ cmake version 3.14.2 or lower, download from website and install cmake.
5360

5461
## Build
5562

56-
### Windows (Visual Studio)
63+
### Windows
5764

5865
```Cmd
5966
# configure & build
6067
.\tools\build.bat
6168
```
6269

63-
### Windows (.NET Core only)
64-
65-
- tools/build.bat
66-
```Cmd
67-
# configure & build
68-
.\tools\build_core3.bat
69-
```
70+
- (.NET Core only)
71+
```Cmd
72+
.\tools\build_core3.bat
73+
```
7074

7175
### Linux & MacOSX
7276

@@ -78,16 +82,11 @@ cmake version 3.14.2 or lower, download from website and install cmake.
7882

7983
---
8084

81-
## Example
85+
## Test and Example
8286

8387
### Test
8488

85-
- Windows (Visual Studio)
86-
```Cmd
87-
.\tools\test.bat
88-
```
89-
90-
- Windows (.NET Core only)
89+
- Windows
9190
```Cmd
9291
.\tools\test_core3.bat
9392
```
@@ -100,8 +99,32 @@ echo ".NET Core 3.x"
10099

101100
### Example
102101

103-
- test/CfdTestMain.cs
104-
- blind/unblind: TestBlindTx()
102+
- Not Implemented yet
103+
104+
---
105+
106+
## Information for developers
107+
108+
### using library
109+
110+
- cfd
111+
- cfd-core
112+
- [libwally-core](https://github.com/cryptogarageinc/libwally-core/tree/cfd-develop) (forked from [ElementsProject/libwally-core](https://github.com/ElementsProject/libwally-core))
113+
- [univalue](https://github.com/jgarzik/univalue) (for JSON encoding and decoding)
114+
115+
### formatter
116+
117+
- dotnet format
118+
119+
### support compilers
120+
121+
- .NET Core (3.x or higher)
122+
- for cfd build
123+
- Visual Studio (2017 or higher)
124+
- Clang (7.x or higher)
125+
- GCC (5.x or higher)
126+
127+
---
105128

106129
## Note
107130

dotnet_project/CfdCsharpProject.CliTests/CfdCliTestMain.cs

+2-10
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,7 @@ public static void TestAddPubkeySign()
427427
}
428428

429429
Address addr = new Address(pubkey, CfdAddressType.P2wpkh, CfdNetworkType.ElementsRegtest);
430-
bool isVerifySign = tx.VerifySign(txid, vout, addr, addr.GetAddressType(), value);
431-
if (!isVerifySign)
432-
{
433-
throw new InvalidOperationException("**** sign fail. ****");
434-
}
430+
tx.VerifySign(txid, vout, addr, addr.GetAddressType(), value);
435431
}
436432

437433
// [TestMethod()]
@@ -455,11 +451,7 @@ public static void TestAddSignWithPrivkeySimple()
455451
throw new InvalidOperationException("**** tx fail. ****");
456452
}
457453
Address addr = new Address(pubkey, CfdAddressType.P2wpkh, CfdNetworkType.ElementsRegtest);
458-
bool isVerifySign = tx.VerifySign(txid, vout, addr, addr.GetAddressType(), value);
459-
if (!isVerifySign)
460-
{
461-
throw new InvalidOperationException("**** sign fail. ****");
462-
}
454+
tx.VerifySign(txid, vout, addr, addr.GetAddressType(), value);
463455
}
464456

465457
// [TestMethod()]

external/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if(CFD_TARGET_VERSION)
4343
set(CFD_TARGET_TAG ${CFD_TARGET_VERSION})
4444
message(STATUS "[external project local] cfd target=${CFD_TARGET_VERSION}")
4545
else()
46-
set(CFD_TARGET_TAG v0.1.3)
46+
set(CFD_TARGET_TAG v0.1.6)
4747
endif()
4848
if(CFD_TARGET_URL)
4949
set(CFD_TARGET_REP ${CFD_TARGET_URL})

0 commit comments

Comments
 (0)