Skip to content

Commit 6143915

Browse files
authored
Added CI
1 parent fc3bc4d commit 6143915

File tree

10 files changed

+240
-141
lines changed

10 files changed

+240
-141
lines changed

.github/workflows/ci-step-build.awk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/awk -f
2+
BEGIN { FS=":"; errCode=0; }
3+
{
4+
if(match($0,/^.+:[0-9]+:[0-9]+: error: /)) {
5+
message=substr($0,RSTART+RLENGTH); file=$1; gsub("^"prefix"/","",file);
6+
printf("::error file=%s,line=%s,col=%s::%s\n", file, $2, $3, message);
7+
errCode=1;
8+
} else {
9+
print;
10+
}
11+
}
12+
END { exit errCode; }

.github/workflows/ci-step-test.awk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/awk -f
2+
BEGIN { FS=":"; errCode=0; }
3+
{
4+
if(match($0,/^.+:[0-9]+:[0-9]+: error: /)) {
5+
message=substr($0,RSTART+RLENGTH); file=$1; gsub("^"prefix"/","",file);
6+
printf("::error file=%s,line=%s,col=%s::%s\n", file, $2, $3, message);
7+
errCode=1;
8+
} else if(match($0,/^.+:[0-9]+: error: /)) {
9+
message=substr($0,RSTART+RLENGTH); file=$1; gsub("^"prefix"/","",file);
10+
printf("::error file=%s,line=%s::%s\n", file, $2, message);
11+
errCode=1;
12+
} else {
13+
print;
14+
}
15+
}
16+
END { exit errCode; }

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: macos-latest
13+
14+
steps:
15+
- name: Set up Environment
16+
run: |
17+
workflowsPath=${{ github.workspace }}/.github/workflows
18+
echo "::set-env name=workflows_path::$workflowsPath"
19+
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
23+
- name: Build
24+
run: |
25+
make build -C ${{ github.workspace }} 2>&1 \
26+
| ${{ env.workflows_path }}/ci-step-build.awk \
27+
-v prefix=${{ github.workspace }}
28+
29+
- name: Run Tests
30+
run: |
31+
make test -C ${{ github.workspace }} 2>&1 \
32+
| ${{ env.workflows_path }}/ci-step-test.awk \
33+
-v prefix=${{ github.workspace }}
34+

.github/workflows/docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
publish-docs:
9+
name: Publish Docs
10+
runs-on: macos-latest
11+
12+
steps:
13+
- name: Set up Environment
14+
run: |
15+
git config --global user.email "[email protected]"
16+
git config --global user.name "GitHub Action"
17+
gem install bundler
18+
gem install jazzy --no-document
19+
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
with:
23+
ref: 'gh-pages'
24+
25+
- name: Build Docs
26+
run: make update-docs -C ${{ github.workspace }}

.swiftpm/xcode/package.xcworkspace/xcshareddata/IDETemplateMacros.plist

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
<dict>
55
<key>FILEHEADER</key>
66
<string>
7-
// ___WORKSPACENAME___
8-
// https://github.com/tcldr/___WORKSPACENAME___
9-
//
10-
// Copyright © ___YEAR___ Tristan Celder. All rights reserved.
7+
// Entwine
8+
// https://github.com/tcldr/Entwine
9+
//
10+
// Copyright © 2020 Tristan Celder. All rights reserved.
1111
//
1212
// Permission is hereby granted, free of charge, to any person obtaining a copy
13-
// of this software and associated documentation files (the "Software"), to deal
14-
// in the Software without restriction, including without limitation the rights
15-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16-
// copies of the Software, and to permit persons to whom the Software is
13+
// of this software and associated documentation files (the "Software"), to
14+
// deal in the Software without restriction, including without limitation the
15+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16+
// sell copies of the Software, and to permit persons to whom the Software is
1717
// furnished to do so, subject to the following conditions:
1818
//
1919
// The above copyright notice and this permission notice shall be included in
@@ -23,8 +23,9 @@
2323
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2424
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2525
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28-
// THE SOFTWARE.</string>
26+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28+
// IN THE SOFTWARE.</string>
2929
</dict>
3030
</plist>
31+

.swiftpm/xcode/xcshareddata/xcschemes/Entwine-Package.xcscheme

Lines changed: 0 additions & 129 deletions
This file was deleted.

.swiftpm/xcode/xcshareddata/xcschemes/Entwine.xcscheme

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1100"
3+
LastUpgradeVersion = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -20,6 +20,48 @@
2020
ReferencedContainer = "container:">
2121
</BuildableReference>
2222
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "EntwineTest"
32+
BuildableName = "EntwineTest"
33+
BlueprintName = "EntwineTest"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
<BuildActionEntry
38+
buildForTesting = "YES"
39+
buildForRunning = "NO"
40+
buildForProfiling = "NO"
41+
buildForArchiving = "NO"
42+
buildForAnalyzing = "NO">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "EntwineTests"
46+
BuildableName = "EntwineTests"
47+
BlueprintName = "EntwineTests"
48+
ReferencedContainer = "container:">
49+
</BuildableReference>
50+
</BuildActionEntry>
51+
<BuildActionEntry
52+
buildForTesting = "YES"
53+
buildForRunning = "NO"
54+
buildForProfiling = "NO"
55+
buildForArchiving = "NO"
56+
buildForAnalyzing = "NO">
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "EntwineTestTests"
60+
BuildableName = "EntwineTestTests"
61+
BlueprintName = "EntwineTestTests"
62+
ReferencedContainer = "container:">
63+
</BuildableReference>
64+
</BuildActionEntry>
2365
</BuildActionEntries>
2466
</BuildAction>
2567
<TestAction
@@ -28,6 +70,26 @@
2870
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2971
shouldUseLaunchSchemeArgsEnv = "YES">
3072
<Testables>
73+
<TestableReference
74+
skipped = "NO">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "EntwineTests"
78+
BuildableName = "EntwineTests"
79+
BlueprintName = "EntwineTests"
80+
ReferencedContainer = "container:">
81+
</BuildableReference>
82+
</TestableReference>
83+
<TestableReference
84+
skipped = "NO">
85+
<BuildableReference
86+
BuildableIdentifier = "primary"
87+
BlueprintIdentifier = "EntwineTestTests"
88+
BuildableName = "EntwineTestTests"
89+
BlueprintName = "EntwineTestTests"
90+
ReferencedContainer = "container:">
91+
</BuildableReference>
92+
</TestableReference>
3193
</Testables>
3294
</TestAction>
3395
<LaunchAction

0 commit comments

Comments
 (0)