File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed
Samples/SwiftKitSampleApp
SwiftKit/src/main/java/org/swift/swiftkit Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -e
4
+ set -x
5
+
3
6
# shellcheck disable=SC2034
4
7
declare -r GREEN=' \033[0;32m'
5
8
declare -r BOLD=' \033[1m'
@@ -14,14 +17,11 @@ echo "========================================================================"
14
17
printf " Validate sample '${BOLD} %s${RESET} ' using: " " $sampleDir "
15
18
cd " $sampleDir " || exit
16
19
if [[ $( find . -name ${CI_VALIDATE_SCRIPT} -maxdepth 1) ]]; then
17
- echo -e " Custom ${BOLD}${CI_VALIDATE_SCRIPT}${RESET} script..."
18
- ./${CI_VALIDATE_SCRIPT} || exit
19
- elif [[ $( find . -name ' build.gradle*' -maxdepth 1) ]]; then
20
- echo -e " ${BOLD} Gradle${RESET} build..."
21
- ./gradlew build || ./gradlew build --info # re-run to get better failure output
20
+ echo -e " Run ${BOLD}${CI_VALIDATE_SCRIPT}${RESET} script..."
21
+ ./${CI_VALIDATE_SCRIPT}
22
22
else
23
- echo -e " ${BOLD} SwiftPM ${RESET} build... "
24
- swift build || exit
23
+ echo -e " ${BOLD} Missing ${CI_VALIDATE_SCRIPT} file! ${RESET} "
24
+ exit
25
25
fi
26
26
27
27
echo -e " Validated sample '${BOLD}${sampleDir}${RESET} ': ${BOLD} passed${RESET} ."
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -x
4
+ set -e
5
+
6
+ ./gradlew run
Original file line number Diff line number Diff line change @@ -41,8 +41,10 @@ public static long addressByteSize() {
41
41
public static final ValueLayout .OfLong SWIFT_INT64 = ValueLayout .JAVA_LONG ;
42
42
public static final ValueLayout .OfFloat SWIFT_FLOAT = ValueLayout .JAVA_FLOAT ;
43
43
public static final ValueLayout .OfDouble SWIFT_DOUBLE = ValueLayout .JAVA_DOUBLE ;
44
- public static final AddressLayout SWIFT_POINTER = ValueLayout .ADDRESS ;
45
- // .withTargetLayout(MemoryLayout.sequenceLayout(Long.MAX_VALUE, JAVA_BYTE));
44
+
45
+ // FIXME: this sequence layout is a workaround, we must properly size pointers when we get them.
46
+ public static final AddressLayout SWIFT_POINTER = ValueLayout .ADDRESS
47
+ .withTargetLayout (MemoryLayout .sequenceLayout (Long .MAX_VALUE , JAVA_BYTE ));
46
48
public static final SequenceLayout SWIFT_BYTE_ARRAY = MemoryLayout .sequenceLayout (8 , ValueLayout .JAVA_BYTE );
47
49
48
50
/**
You can’t perform that action at this time.
0 commit comments