File tree Expand file tree Collapse file tree
Sources/SwiftTimecodeCore
Timecode/Protocol Adoptions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,3 +116,17 @@ jobs:
116116 run : swift build
117117 - name : Unit Tests
118118 run : swift test
119+
120+ android :
121+ name : Build (Android)
122+ runs-on : ubuntu-latest
123+ timeout-minutes : 30
124+ env :
125+ TARGET_TRIPLE : aarch64-unknown-linux-android28
126+ steps :
127+ - uses : actions/checkout@main
128+ - uses : orchetect/setup-swift-android-sdk@v1
129+ with :
130+ target-triple : ${{ env.TARGET_TRIPLE }}
131+ - name : Build
132+ run : swift build --swift-sdk "$TARGET_TRIPLE" --static-swift-stdlib
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import Darwin
1010import Glibc
1111#elseif canImport(Musl)
1212import Musl
13+ #elseif canImport(Android)
14+ import Android
1315#endif
1416
1517extension Timecode : Strideable {
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import Darwin
1515import Glibc
1616#elseif canImport(Musl)
1717import Musl
18+ #elseif canImport(Android)
19+ import Android
1820#endif
1921
2022// MARK: - ceiling / floor
@@ -30,6 +32,8 @@ extension FloatingPoint {
3032 Glibc . ceil ( self )
3133 #elseif canImport(Musl)
3234 Musl . ceil ( self )
35+ #elseif canImport(Android)
36+ Android . ceil ( self )
3337 #endif
3438 }
3539
@@ -43,6 +47,8 @@ extension FloatingPoint {
4347 Glibc . floor ( self )
4448 #elseif canImport(Musl)
4549 Musl . floor ( self )
50+ #elseif canImport(Android)
51+ Android . floor ( self )
4652 #endif
4753 }
4854}
You can’t perform that action at this time.
0 commit comments