Added ci workflows
This commit is contained in:
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mac:
|
||||
name: macOS
|
||||
runs-on: macos-12
|
||||
strategy:
|
||||
matrix:
|
||||
xcode: ['13.3', '14.2']
|
||||
config: ['debug', 'release']
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Select Xcode ${{ matrix.xcode }}
|
||||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
|
||||
- name: Swift Version
|
||||
run: swift --version
|
||||
- name: Run ${{ matrix.xcode }} Tests
|
||||
run: make CONFIG=${{ matrix.config }} test-library
|
||||
|
||||
ubuntu:
|
||||
name: Ubuntu
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: swift-actions/setup-swift@v1
|
||||
with:
|
||||
swift-version: 5.7
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run Tests
|
||||
run: make DOCKER_PLATFORM=linux/amd64 test-linux
|
||||
41
.github/workflows/documentation.yml
vendored
Normal file
41
.github/workflows/documentation.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# Build and deploy DocC to GitHub pages. Based off of @karwa's work here:
|
||||
# https://github.com/karwa/swift-urlblob/main/.github/workflows/docs.yml
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: docs-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# Sets permissions to allow deployment to Github Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Build DocC
|
||||
run: make build-documentation
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: 'docs'
|
||||
- name: Deploy to Github Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
7
GitVersion.xcworkspace/contents.xcworkspacedata
generated
7
GitVersion.xcworkspace/contents.xcworkspacedata
generated
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,104 +0,0 @@
|
||||
{
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "combine-schedulers",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/pointfreeco/combine-schedulers",
|
||||
"state" : {
|
||||
"revision" : "882ac01eb7ef9e36d4467eb4b1151e74fcef85ab",
|
||||
"version" : "0.9.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "rainbow",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/onevcat/Rainbow",
|
||||
"state" : {
|
||||
"revision" : "e0dada9cd44e3fa7ec3b867e49a8ddbf543e3df3",
|
||||
"version" : "4.0.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-argument-parser",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-argument-parser.git",
|
||||
"state" : {
|
||||
"revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
|
||||
"version" : "1.2.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-clocks",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/pointfreeco/swift-clocks",
|
||||
"state" : {
|
||||
"revision" : "20b25ca0dd88ebfb9111ec937814ddc5a8880172",
|
||||
"version" : "0.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-dependencies",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/pointfreeco/swift-dependencies.git",
|
||||
"state" : {
|
||||
"revision" : "6bb1034e8a1bfbf46dfb766b6c09b7b17e1cba10",
|
||||
"version" : "0.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-docc-plugin",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-docc-plugin.git",
|
||||
"state" : {
|
||||
"revision" : "10bc670db657d11bdd561e07de30a9041311b2b1",
|
||||
"version" : "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-docc-symbolkit",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-docc-symbolkit",
|
||||
"state" : {
|
||||
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
|
||||
"version" : "1.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-log",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-log.git",
|
||||
"state" : {
|
||||
"revision" : "32e8d724467f8fe623624570367e3d50c5638e46",
|
||||
"version" : "1.5.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-log-format-and-pipe",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/adorkable/swift-log-format-and-pipe.git",
|
||||
"state" : {
|
||||
"revision" : "bd29badb9e6b18122ec10b84eed534db83cad279",
|
||||
"version" : "0.1.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-shell-client",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/m-housh/swift-shell-client.git",
|
||||
"state" : {
|
||||
"revision" : "28bcd2ecd0022aca20c520fc578a130bec7283e7",
|
||||
"version" : "0.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "xctest-dynamic-overlay",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
|
||||
"state" : {
|
||||
"revision" : "ab8c9f45843694dd16be4297e6d44c0634fd9913",
|
||||
"version" : "0.8.4"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 2
|
||||
}
|
||||
11
Makefile
11
Makefile
@@ -1,3 +1,5 @@
|
||||
PLATFORM_MACOS = macOS
|
||||
CONFIG := debug
|
||||
DOCC_TARGET ?= CliVersion
|
||||
DOCC_BASEPATH = $(shell basename "$(PWD)")
|
||||
DOCC_DIR ?= ./docs
|
||||
@@ -28,6 +30,15 @@ test-linux:
|
||||
swift:5.7-focal \
|
||||
swift test
|
||||
|
||||
test-library:
|
||||
for platform in "$(PLATFORM_MACOS)"; do \
|
||||
xcodebuild test \
|
||||
-configuration $(CONFIG) \
|
||||
-workspace .swiftpm/xcode/package.xcworkspace \
|
||||
-scheme swift-cli-version-Package \
|
||||
-destination platform="$$platform" || exit 1; \
|
||||
done;
|
||||
|
||||
update-version:
|
||||
swift package \
|
||||
--disable-sandbox \
|
||||
|
||||
Reference in New Issue
Block a user