diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index bc9706fe..84f76efc 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -7,21 +7,32 @@ on: branches: [main] jobs: - macos_build: + macos-swift5_2: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 - name: Build on macOS 10.15 with Swift 5.2 run: | - sudo xcode-select --switch /Applications/Xcode_11.6.app/Contents/Developer + sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer swift build - linux_build: + macos-swift5_3: + runs-on: macos-10.15 + + steps: + - uses: actions/checkout@v2 + - name: Build on macOS 10.15 with Swift 5.3 + run: | + sudo xcode-select --switch /Applications/Xcode_12.app/Contents/Developer + swift build + + linux-swift5_3: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 + - name: Build on Ubuntu 20.04 with Swift 5.2 run: | swift build diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 73ce9502..00000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.2.4 diff --git a/Brewfile b/Brewfile index 56a627c7..c4186786 100644 --- a/Brewfile +++ b/Brewfile @@ -1,3 +1,5 @@ brew "pre-commit" brew "swiftformat" brew "swiftlint" +brew "binaryen" +brew "wabt" diff --git a/Package.resolved b/Package.resolved index 533086d7..62c20722 100644 --- a/Package.resolved +++ b/Package.resolved @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/apple/swift-argument-parser", "state": { "branch": null, - "revision": "3e7d2fe99da091dcc1e4a7dd22fc3cfc2dca7937", - "version": "0.2.2" + "revision": "92646c0cdbaca076c8d3d0207891785b3379cbff", + "version": "0.3.1" } }, { @@ -150,8 +150,8 @@ "repositoryURL": "https://github.com/vapor/vapor.git", "state": { "branch": null, - "revision": "66f412bcb276c09ad3a5df263f159cee9fecc310", - "version": "4.29.1" + "revision": "236c616ca1d781e9dc9b6a8f3f1e1427a326c161", + "version": "4.29.3" } }, { diff --git a/Package.swift b/Package.swift index b0e401a3..9fb96cc0 100644 --- a/Package.swift +++ b/Package.swift @@ -20,11 +20,11 @@ let package = Package( ), .package( url: "https://github.com/apple/swift-tools-support-core.git", - .upToNextMinor(from: "0.1.3") + .upToNextMinor(from: "0.1.10") ), .package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.10.0"), - .package(url: "https://github.com/vapor/vapor.git", from: "4.15.2"), - .package(url: "https://github.com/apple/swift-crypto.git", from: "1.0.2"), + .package(url: "https://github.com/vapor/vapor.git", from: "4.29.3"), + .package(url: "https://github.com/apple/swift-crypto.git", from: "1.1.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module diff --git a/Package@swift-5.2.swift b/Package@swift-5.2.swift index fdf43d84..2bc3c949 100644 --- a/Package@swift-5.2.swift +++ b/Package@swift-5.2.swift @@ -10,14 +10,15 @@ let package = Package( .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.1.1"), .package( url: "https://github.com/apple/swift-argument-parser", - .upToNextMinor(from: "0.2.0") + .upToNextMinor(from: "0.3.0") ), .package( url: "https://github.com/apple/swift-tools-support-core.git", - .upToNextMinor(from: "0.1.3") + .upToNextMinor(from: "0.1.10") ), .package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.10.0"), - .package(url: "https://github.com/vapor/vapor.git", from: "4.15.2"), + .package(url: "https://github.com/vapor/vapor.git", from: "4.29.3"), + .package(url: "https://github.com/apple/swift-crypto.git", from: "1.1.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module @@ -28,6 +29,7 @@ let package = Package( dependencies: [ .product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "AsyncHTTPClient", package: "async-http-client"), + .product(name: "Crypto", package: "swift-crypto"), .product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"), .product(name: "Vapor", package: "vapor"), "CartonHelpers", diff --git a/Sources/CartonHelpers/DefaultToolchain.swift b/Sources/CartonHelpers/DefaultToolchain.swift index 3492eb22..d05bd7be 100644 --- a/Sources/CartonHelpers/DefaultToolchain.swift +++ b/Sources/CartonHelpers/DefaultToolchain.swift @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -public let defaultToolchainVersion = "wasm-5.3-SNAPSHOT-2020-09-08-a" +public let defaultToolchainVersion = "wasm-5.3-SNAPSHOT-2020-09-25-a" diff --git a/TestApp/.swift-version b/TestApp/.swift-version index e35121c6..253d11f4 100644 --- a/TestApp/.swift-version +++ b/TestApp/.swift-version @@ -1 +1 @@ -wasm-5.3-SNAPSHOT-2020-09-08-a +wasm-5.3-SNAPSHOT-2020-09-25-a diff --git a/TestApp/Sources/TestApp/main.swift b/TestApp/Sources/TestApp/main.swift index 77739e18..90523a27 100644 --- a/TestApp/Sources/TestApp/main.swift +++ b/TestApp/Sources/TestApp/main.swift @@ -16,6 +16,7 @@ import CustomPathTarget import Foundation import JavaScriptKit import TestLibrary +import WASILibc let document = JSObject.global.document.object! @@ -25,6 +26,7 @@ let body = document.body.object! _ = body.appendChild!(button) print("Number of seconds since epoch: \(Date().timeIntervalSince1970)") +print("cos(M_PI) is \(cos(M_PI))") print(customTargetText) func crash() {