Commit 0ce1a11e authored by Drew's avatar Drew

Linux port

parent e330c5ce
Pipeline #1993 skipped
stages:
- build
- test
- package
osx:
stage: build
stage: test
script:
- atbuild check
......@@ -11,12 +11,30 @@ osx:
- xc7
- openswift
- atbuild
osxxcode:
stage: test
- atbuild coretest-gen
- atbuild coretest --toolchain xcode
tags:
- xc7
- openswift
- atbuild
linux:
stage: test
- apt-get update && apt-get install --no-install-recommends curl ca-certificates git -y
- curl -s -L https://packagecloud.io/install/repositories/anarchytools/AT/script.deb.sh | bash
- apt-get install atbuild -y
- atbuild coretest --toolchain xcode
tags:
- autoscale-linux
image: drewcrawford/swift:latest
osxcorepackage:
stage: package
script:
- atbuild coretest-gen
- atbuild coretest --toolchain xcode
- atbuild core-framework --toolchain xcode
tags:
......
FROM drewcrawford/swift:latest
#install atbuild
RUN apt-get update && apt-get install --no-install-recommends xz-utils -y
ADD https://github.com/AnarchyTools/atbuild/releases/download/0.8.2/atbuild-0.8.2-linux.tar.xz /atbuild.tar.xz
RUN tar xf atbuild.tar.xz -C /usr/local
RUN apt-get update && apt-get install --no-install-recommends curl ca-certificates -y
RUN curl -s -L https://packagecloud.io/install/repositories/anarchytools/AT/script.deb.sh | bash
RUN apt-get install atbuild -y
ADD . /Caroline
WORKDIR Caroline
......
// Copyright (c) 2016 Drew Crawford.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
extension String {
func hasSuffix(_ str: String) -> Bool {
let view = self.utf8[self.utf8.index(self.utf8.endIndex, offsetBy: -str.utf8.count)..<self.utf8.endIndex]
var strIndex = str.utf8.startIndex
for char in view {
if char != str.utf8[strIndex] { return false }
strIndex = str.utf8.index(after: strIndex)
}
return true
}
}
\ No newline at end of file
......@@ -17,8 +17,10 @@
// This file is automatically generated by Caroline and should not be edited by hand.
import CarolineCore
let allTests: [CarolineTest] = [
AssertTrue(),
AssertFalse()
Simple(),
Additional()
]
let engine = CarolineCoreEngine()
engine.testAll(allTests)
if !engine.testAll(allTests) {
fatalError("Caroline tests failed")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment