File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 9090 path : ${{ runner.temp }}/dashd-test-logs/
9191 retention-days : 7
9292 if-no-files-found : ignore
93+ - name : Validate headers
94+ if : matrix.group == 'ffi' && inputs.os == 'ubuntu-latest'
95+ run : |
96+ sudo apt update && sudo apt install -y build-essential
97+ bash ffi-c-tests/validate-headers.sh
Original file line number Diff line number Diff line change @@ -11,17 +11,17 @@ HEADER_TESTS_DIR="$SCRIPT_DIR/header-tests"
1111TARGET_DIR=" $SCRIPT_DIR /../target"
1212LIB_DIR=" $TARGET_DIR /debug"
1313
14- # Build FFI crates to generate static libraries and header files
15- cargo build -p dash-spv-ffi --profile dev
16- cargo build -p key-wallet-ffi --profile dev
14+ # Build FFI crates to generate static libraries and header files if they dont yet exist
15+ cargo rustc -p dash-spv-ffi --lib --crate-type staticlib
16+ cargo rustc -p key-wallet-ffi --lib --crate-type staticlib
1717
1818# Move to ffi-c-tests directory, where the script lives, and run tests
1919cd " $SCRIPT_DIR " || exit 1
2020
2121EXIT_CODE=0
2222
2323for file in " $HEADER_TESTS_DIR " /* .c; do
24- if gcc " $file " -o test.bin -g -L" $LIB_DIR " -ldash_spv_ffi -lkey_wallet_ffi; then
24+ if gcc " $file " -o test.bin -g -L" $LIB_DIR " -ldash_spv_ffi -lkey_wallet_ffi -lm ; then
2525 echo -e " ${GREEN} Passed: $file ${NC} "
2626 else
2727 echo -e " ${RED} Failed: $file ${NC} "
Original file line number Diff line number Diff line change @@ -1003,9 +1003,13 @@ impl From<FFIAssetLockFundingType> for AssetLockFundingType {
10031003 match ffi {
10041004 FFIAssetLockFundingType :: IdentityRegistrationFundingType => Self :: IdentityRegistration ,
10051005 FFIAssetLockFundingType :: IdentityTopUpFundingType => Self :: IdentityTopUp ,
1006- FFIAssetLockFundingType :: IdentityTopUpNotBoundFundingType => Self :: IdentityTopUpNotBound ,
1006+ FFIAssetLockFundingType :: IdentityTopUpNotBoundFundingType => {
1007+ Self :: IdentityTopUpNotBound
1008+ }
10071009 FFIAssetLockFundingType :: IdentityInvitationFundingType => Self :: IdentityInvitation ,
1008- FFIAssetLockFundingType :: AssetLockAddressTopUpFundingType => Self :: AssetLockAddressTopUp ,
1010+ FFIAssetLockFundingType :: AssetLockAddressTopUpFundingType => {
1011+ Self :: AssetLockAddressTopUp
1012+ }
10091013 FFIAssetLockFundingType :: AssetLockShieldedAddressTopUpFundingType => {
10101014 Self :: AssetLockShieldedAddressTopUp
10111015 }
You can’t perform that action at this time.
0 commit comments