Skip to content

Commit

Permalink
Added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tcldr authored May 13, 2020
1 parent fc3bc4d commit 6143915
Show file tree
Hide file tree
Showing 10 changed files with 240 additions and 141 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci-step-build.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/awk -f
BEGIN { FS=":"; errCode=0; }
{
if(match($0,/^.+:[0-9]+:[0-9]+: error: /)) {
message=substr($0,RSTART+RLENGTH); file=$1; gsub("^"prefix"/","",file);
printf("::error file=%s,line=%s,col=%s::%s\n", file, $2, $3, message);
errCode=1;
} else {
print;
}
}
END { exit errCode; }
16 changes: 16 additions & 0 deletions .github/workflows/ci-step-test.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/awk -f
BEGIN { FS=":"; errCode=0; }
{
if(match($0,/^.+:[0-9]+:[0-9]+: error: /)) {
message=substr($0,RSTART+RLENGTH); file=$1; gsub("^"prefix"/","",file);
printf("::error file=%s,line=%s,col=%s::%s\n", file, $2, $3, message);
errCode=1;
} else if(match($0,/^.+:[0-9]+: error: /)) {
message=substr($0,RSTART+RLENGTH); file=$1; gsub("^"prefix"/","",file);
printf("::error file=%s,line=%s::%s\n", file, $2, message);
errCode=1;
} else {
print;
}
}
END { exit errCode; }
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ '*' ]

jobs:
test:
name: Test
runs-on: macos-latest

steps:
- name: Set up Environment
run: |
workflowsPath=${{ github.workspace }}/.github/workflows
echo "::set-env name=workflows_path::$workflowsPath"
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: |
make build -C ${{ github.workspace }} 2>&1 \
| ${{ env.workflows_path }}/ci-step-build.awk \
-v prefix=${{ github.workspace }}
- name: Run Tests
run: |
make test -C ${{ github.workspace }} 2>&1 \
| ${{ env.workflows_path }}/ci-step-test.awk \
-v prefix=${{ github.workspace }}
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs

on:
push:
branches: [ master ]

jobs:
publish-docs:
name: Publish Docs
runs-on: macos-latest

steps:
- name: Set up Environment
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
gem install bundler
gem install jazzy --no-document
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'gh-pages'

- name: Build Docs
run: make update-docs -C ${{ github.workspace }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<dict>
<key>FILEHEADER</key>
<string>
// ___WORKSPACENAME___
// https://github.com/tcldr/___WORKSPACENAME___
//
// Copyright © ___YEAR___ Tristan Celder. All rights reserved.
// Entwine
// https://github.com/tcldr/Entwine
//
// Copyright © 2020 Tristan Celder. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
Expand All @@ -23,8 +23,9 @@
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.</string>
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.</string>
</dict>
</plist>

129 changes: 0 additions & 129 deletions .swiftpm/xcode/xcshareddata/xcschemes/Entwine-Package.xcscheme

This file was deleted.

64 changes: 63 additions & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Entwine.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
LastUpgradeVersion = "1140"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -20,6 +20,48 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EntwineTest"
BuildableName = "EntwineTest"
BlueprintName = "EntwineTest"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EntwineTests"
BuildableName = "EntwineTests"
BlueprintName = "EntwineTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EntwineTestTests"
BuildableName = "EntwineTestTests"
BlueprintName = "EntwineTestTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -28,6 +70,26 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EntwineTests"
BuildableName = "EntwineTests"
BlueprintName = "EntwineTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EntwineTestTests"
BuildableName = "EntwineTestTests"
BlueprintName = "EntwineTestTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
Loading

0 comments on commit 6143915

Please sign in to comment.