Skip to content

Commit

Permalink
Merge pull request #54 from cryptogarageinc/features/sprint60
Browse files Browse the repository at this point in the history
update to v0.2.5
  • Loading branch information
k-matsuzawa authored Dec 1, 2020
2 parents 4875c54 + 8357306 commit d9799f6
Show file tree
Hide file tree
Showing 10 changed files with 289 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-20.04, ubuntu-18.04]
os: [windows-2019, macos-10.15, ubuntu-20.04, ubuntu-18.04]

steps:
- uses: actions/checkout@v2
Expand Down
60 changes: 57 additions & 3 deletions .github/workflows/create_release-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
create_releases:
name: create-releases
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
outputs:
release_url: ${{ steps.output_url.outputs.upload_url }}

Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
upload-object-windows-vs2019:
name: upload-object-win-vs2019
needs: create_releases
runs-on: windows-latest
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
upload-object-alpine:
name: upload-object-alpine
needs: create_releases
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- name: checkout
Expand Down Expand Up @@ -213,3 +213,57 @@ jobs:
asset_path: /tmp/cfd/cfd.zip
asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-alpine_x86_64.zip
asset_content_type: application/zip

upload-object-macos:
name: upload-object-macos
needs: create_releases
runs-on: macos-10.15
strategy:
fail-fast: false
matrix:
xcode: [10.3, 11.6]
shared: [on, off]
include:
- shared: on
suffix:
- shared: off
suffix: -static

steps:
- name: checkout
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: cmake-build
run: |
cd cfd-sys/cfd-cmake
mkdir dist
mkdir build
cd build
cmake .. -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DCMAKE_BUILD_TYPE=Release -DTARGET_RPATH="/usr/local/lib"
cd ..
cmake --build build --parallel 2 --config Release
cd build
sudo make install DESTDIR=../dist
cd ../../..
- name: create archive file
run: |
cd cfd-sys/cfd-cmake
cd dist
zip -r cfd.zip usr
echo "---- dump zip file ----"
ls -l
- name: output url
id: get_url
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Upload Release Asset Ubuntu
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: ./cfd-sys/cfd-cmake/dist/cfd.zip
asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip
asset_name: cfd-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode }}${{ matrix.suffix }}-x86_64.zip
asset_content_type: application/zip
82 changes: 0 additions & 82 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cfd-rust"
version = "0.2.4"
version = "0.2.5"
license = "MIT"
readme = "README.md"
keywords = ["build-dependencies"]
Expand Down
2 changes: 1 addition & 1 deletion cfd-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cfd_sys"
version = "0.2.3"
version = "0.2.5"
license = "MIT"
readme = "../README.md"
keywords = ["build-dependencies"]
Expand Down
2 changes: 1 addition & 1 deletion cfd-sys/cfd-cmake/external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(CFD_TARGET_VERSION)
set(CFD_TARGET_TAG ${CFD_TARGET_VERSION})
message(STATUS "[external project local] cfd target=${CFD_TARGET_VERSION}")
else()
set(CFD_TARGET_TAG v0.2.0)
set(CFD_TARGET_TAG v0.2.2)
endif()
if(CFD_TARGET_URL)
set(CFD_TARGET_REP ${CFD_TARGET_URL})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CFDRUST_VERSION=0.2.3
CFD_TARGET_VERSION=refs/tags/v0.2.7
CFDCORE_TARGET_VERSION=refs/tags/v0.2.6
LIBWALLY_TARGET_VERSION=refs/tags/cfd-0.2.3
CFDRUST_VERSION=0.2.5
CFD_TARGET_VERSION=refs/tags/v0.2.12
CFDCORE_TARGET_VERSION=refs/tags/v0.2.8
LIBWALLY_TARGET_VERSION=refs/tags/cfd-0.2.4
CFD_TARGET_URL=cryptogarageinc/cfd.git
CFDCORE_TARGET_URL=cryptogarageinc/cfd-core.git
7 changes: 7 additions & 0 deletions cfd-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use self::libc::{c_char, c_double, c_int, c_longlong, c_uint, c_void};
pub const BLIND_OPT_MINIMUM_RANGE_VALUE: c_int = 1;
pub const BLIND_OPT_EXPONENT: c_int = 2;
pub const BLIND_OPT_MINIMUM_BITS: c_int = 3;
pub const BLIND_OPT_COLLECT_BLINDER: c_int = 4;

pub const WITNESS_STACK_TYPE_NORMAL: c_int = 0;
pub const WITNESS_STACK_TYPE_PEGIN: c_int = 1;
Expand Down Expand Up @@ -1045,6 +1046,12 @@ fns! {
pub fn CfdFinalizeBlindTx(
handle: *const c_void, blind_handle: *const c_void, tx_hex_string: *const c_char,
tx_string: *mut *mut c_char) -> c_int;
pub fn CfdGetBlindTxBlindData(
handle: *const c_void, blind_handle: *const c_void, index: c_uint,
vout: *mut c_uint, asset: *mut *mut c_char, value_satoshi: *mut c_longlong,
asset_blind_factor: *mut *mut c_char, value_blind_factor: *mut *mut c_char,
issuance_txid: *mut *mut c_char, issuance_vout: *mut c_uint,
is_issuance_asset: *mut bool, is_issuance_token: *mut bool) -> c_int;
pub fn CfdFreeBlindHandle(handle: *const c_void, blind_handle: *const c_void) -> c_int;
pub fn CfdFinalizeElementsMultisigSign(
handle: *const c_void, multi_sign_handle: *const c_void, tx_hex_string: *const c_char, txid: *const c_char, vout: c_uint, hash_type: c_int, witness_script: *const c_char, redeem_script: *const c_char, clear_stack: bool, tx_string: *mut *mut c_char) -> c_int;
Expand Down
Loading

0 comments on commit d9799f6

Please sign in to comment.