Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
helje5 committed Jan 13, 2021
2 parents 8e743a7 + 28674b1 commit 7a0b7d4
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 90 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Test

on:
push:
pull_request:
schedule:
- cron: "0 9 * * 1"

jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- swift:5.0.3-xenial
- swift:5.1.5-xenial
- swift:5.2.5-xenial
- swift:5.3.2-xenial
- swift:5.3.2-bionic
container: ${{ matrix.image }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Swift Debug Package
run: swift build -c debug
- name: Build Swift Release Package
run: swift build -c release
nextstep:
runs-on: macos-latest
steps:
- name: Select latest available Xcode
uses: maxim-lobanov/[email protected]
with:
xcode-version: 12.2
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Swift Debug Package
run: swift build -c debug
- name: Build Swift Release Package
run: swift build -c release
22 changes: 0 additions & 22 deletions .travis.d/before-install.sh

This file was deleted.

32 changes: 0 additions & 32 deletions .travis.d/install.sh

This file was deleted.

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import PackageDescription

var packageDependencies : [ Package.Dependency ] = [
.package(url: "https://github.com/apple/swift-nio.git",
from: "2.18.0"),
from: "2.25.1"),
.package(url: "https://github.com/SwiftNIOExtras/swift-nio-irc.git",
from: "0.8.0")
]
var targetDependencies : [ Target.Dependency ] = [ "NIO", "NIOIRC" ]
if #available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) {
packageDependencies += [
.package(url: "https://github.com/apple/swift-nio-transport-services",
from: "1.6.0")
from: "1.9.1")
]
targetDependencies += [ "NIOTransportServices" ]
}
Expand Down
10 changes: 7 additions & 3 deletions Sources/IRC/IRCClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the swift-nio-irc open source project
//
// Copyright (c) 2018 ZeeZide GmbH. and the swift-nio-irc project authors
// Copyright (c) 2018-2020 ZeeZide GmbH. and the swift-nio-irc project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand Down Expand Up @@ -132,15 +132,19 @@ open class IRCClient : IRCClientMessageTarget {
self.eventLoop = eventLoop

// what a mess :-)
var overrideBootstrap : NIOClientTCPBootstrapProtocol?
#if canImport(NIOTransportServices)
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
var overrideBootstrap : NIOClientTCPBootstrapProtocol?
if #available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) {
if options.eventLoopGroup is NIOTSEventLoopGroup {
overrideBootstrap = NIOTSConnectionBootstrap(group: eventLoop)
}
}
#else
let overrideBootstrap : NIOClientTCPBootstrapProtocol? = nil
#endif
#else
let overrideBootstrap : NIOClientTCPBootstrapProtocol? = nil
#endif

self.bootstrap = overrideBootstrap ?? ClientBootstrap(group: eventLoop)
Expand Down Expand Up @@ -408,7 +412,7 @@ open class IRCClient : IRCClientMessageTarget {

func errorCaught(context: ChannelHandlerContext, error: Error) {
self.client.handlerCaughtError(error, in: context)
_ = context.close(promise: nil)
context.close(promise: nil)
}
}

Expand Down

0 comments on commit 7a0b7d4

Please sign in to comment.