-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
74 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
macos: | ||
name: MacOS | ||
runs-on: macOS-latest | ||
strategy: | ||
matrix: | ||
xcode: | ||
- 12.4 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Select Xcode ${{ matrix.xcode }} | ||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | ||
- name: Print Swift version | ||
run: swift --version | ||
- name: Run tests | ||
run: make test-swift | ||
|
||
linux: | ||
name: Ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: make test-linux |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,14 @@ | ||
SUDO = sudo --prompt=$(SUDO_PROMPT) | ||
SUDO_PROMPT = " 🔒 Please enter your password: " | ||
SDK_PATH = $(shell xcrun --show-sdk-path 2>/dev/null) | ||
FRAMEWORKS_PATH = $(SDK_PATH)/System/Library/Frameworks | ||
|
||
bootstrap: xcodeproj install-mm-xcodeproj | ||
|
||
xcodeproj: | ||
swift package generate-xcodeproj | ||
xed . | ||
test-all: test-linux test-swift | ||
|
||
test-linux: | ||
docker build --tag html . \ | ||
&& docker run --rm html | ||
|
||
test-macos: xcodeproj | ||
brew install libressl | ||
set -o pipefail && \ | ||
xcodebuild test \ | ||
-scheme HtmlVaporSupport-Package \ | ||
-destination platform="macOS" \ | ||
| xcpretty | ||
|
||
linux-main: | ||
swift test --generate-linuxmain | ||
|
||
test-swift: linux-main | ||
swift test | ||
|
||
test-all: test-linux test-mac | ||
|
||
install-mm-xcodeproj: xcodeproj | ||
@ls HtmlVaporSupport.xcodeproj/GeneratedModuleMap | xargs -n1 -I '{}' $(SUDO) mkdir -p "$(FRAMEWORKS_PATH)/{}.framework" | ||
@ls HtmlVaporSupport.xcodeproj/GeneratedModuleMap | xargs -n1 -I '{}' $(SUDO) cp "./HtmlVaporSupport.xcodeproj/GeneratedModuleMap/{}/module.modulemap" "$(FRAMEWORKS_PATH)/{}.framework/module.map" | ||
docker run \ | ||
--rm \ | ||
-v "$(PWD):$(PWD)" \ | ||
-w "$(PWD)" \ | ||
swift:5.3 \ | ||
bash -c 'make test-swift' | ||
|
||
test-swift: | ||
swift test \ | ||
--enable-test-discovery \ | ||
--parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,41 @@ | ||
// swift-tools-version:5.2 | ||
// swift-tools-version:5.3 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "HtmlVaporSupport", | ||
name: "swift-html-vapor", | ||
platforms: [ | ||
.macOS(.v10_15) | ||
], | ||
products: [ | ||
.library( | ||
name: "HtmlVaporSupport", | ||
targets: ["HtmlVaporSupport"]), | ||
targets: ["HtmlVaporSupport"] | ||
), | ||
.executable( | ||
name: "HtmlVaporSupportExample", | ||
targets: ["HtmlVaporSupportExample"]), | ||
], | ||
targets: ["HtmlVaporSupportExample"] | ||
), | ||
], | ||
dependencies: [ | ||
.package(name: "Html", url: "https://github.com/pointfreeco/swift-html.git", from: "0.3.1"), | ||
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"), | ||
], | ||
.package(url: "https://github.com/pointfreeco/swift-html", from: "0.4.0"), | ||
.package(url: "https://github.com/vapor/vapor", from: "4.0.0"), | ||
], | ||
targets: [ | ||
.target( | ||
name: "HtmlVaporSupport", | ||
dependencies: [ | ||
.product(name: "Html", package: "Html"), | ||
.product(name: "Html", package: "swift-html"), | ||
.product(name: "Vapor", package: "vapor"), | ||
]), | ||
] | ||
), | ||
.testTarget( | ||
name: "HtmlVaporSupportTests", | ||
dependencies: ["HtmlVaporSupport"]), | ||
dependencies: ["HtmlVaporSupport"] | ||
), | ||
.target( | ||
name: "HtmlVaporSupportExample", | ||
dependencies: ["HtmlVaporSupport"]), | ||
], | ||
swiftLanguageVersions: [ | ||
.version("5"), | ||
] | ||
dependencies: ["HtmlVaporSupport"] | ||
), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# swift-html-vapor | ||
|
||
[![Swift 5](https://img.shields.io/badge/swift-5-ED523F.svg?style=flat)](https://swift.org/download/) | ||
[![Swift 4.2](https://img.shields.io/badge/swift-4.2-ED523F.svg?style=flat)](https://swift.org/download/) | ||
[![Swift 5.3](https://img.shields.io/badge/swift-5.3-ED523F.svg?style=flat)](https://swift.org/download/) | ||
[![Linux CI](https://img.shields.io/travis/pointfreeco/swift-html-vapor/master.svg?label=linux)](https://travis-ci.org/pointfreeco/swift-html-vapor) | ||
[![@pointfreeco](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/pointfreeco) | ||
|
||
|
@@ -54,14 +53,10 @@ If you want to use swift-html-vapor in a project that uses [SwiftPM](https://swi | |
|
||
``` swift | ||
dependencies: [ | ||
.package(name: "HtmlVaporSupport", url: "https://github.com/pointfreeco/swift-html-vapor.git", from: "0.4.0") | ||
.package(url: "https://github.com/pointfreeco/swift-html-vapor", from: "0.4.0") | ||
] | ||
``` | ||
|
||
### Xcode Sub-project | ||
|
||
Submodule, clone, or download swift-html-vapor, and drag `HtmlVaporSupport.xcodeproj` into your project. | ||
|
||
## License | ||
|
||
All modules are released under the MIT license. See [LICENSE](LICENSE) for details. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.