File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
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 @@ -3,32 +3,23 @@ set -euo pipefail
33
44RED=' \033[0;31m'
55GREEN=' \033[0;32m'
6- NC=' \033[0m' # No Color
6+ NC=' \033[0m'
77
88SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
99HEADER_TESTS_DIR=" $SCRIPT_DIR /header-tests"
1010
11- TARGET_DIR=" $SCRIPT_DIR /../target"
12- LIB_DIR=" $TARGET_DIR /debug"
13-
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
17-
1811# Move to ffi-c-tests directory, where the script lives, and run tests
1912cd " $SCRIPT_DIR " || exit 1
2013
2114EXIT_CODE=0
2215
2316for 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
17+ if gcc -c " $file " -o /dev/null ; then
2518 echo -e " ${GREEN} Passed: $file ${NC} "
2619 else
2720 echo -e " ${RED} Failed: $file ${NC} "
2821 EXIT_CODE=1
2922 fi
3023done
3124
32- rm -f test.bin
33-
3425exit $EXIT_CODE
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