* [CI] Adopt GitHub Actions
# Motivation
We want to adopt GitHub actions in all of our Swift repositories to replace our current Jenkins CI.
# Modification
This PR adopts the reusable workflows from NIO and the swiftlang organization to ensure soundness and test coverage. Additionally, this PR enables a sematic label check and adds a `release.yml` to make releasing this package easy.
# Result
Modern CI and release flow.
With this PR the implementation of `CustomDebugStringConvertible` generally uses new `makeDescription` convenience methods on the three encode buffers, e.g.:
```swift
extension ResponseEncodeBuffer {
static func makeDescription(_ closure: (inout ResponseEncodeBuffer) -> Void) -> String
}
```
such that conformance can be implemented as e.g.
```swift
extension Command: CustomDebugStringConvertible {
public var debugDescription: String {
CommandEncodeBuffer.makeDescription {
$0.writeCommand(self)
}
}
}
```
This also adds `CustomDebugStringConvertible` to `MessageAttribute` and `StreamingKind`.
With the recent changes to message identifier set it’s no longer possible to access the range count, but we’d only ever need that to calculate isContiguous. Moving this into NIOIMAPCore seems like the better approach.
Due to all the changes to create generic types a lot of the types specified in various bits of documentation were actually wrong. They've been fixed.
Also delete a redundant duplicate function writeUID
Note - I'll update documentation in a follow-up PR
Remove SequenceRange and SequenceRangeSet and replace with new MessageIdentifier* types.
Motivation:
There was lots of very complicated duplicate code, and there was about to be more if we didn't make the new MessageIdentifier types.
Modifications:
Replace basically every occurrence of SequenceRange with MessageIdentifierRange<SequenceNumber> and SequenceRangeSet with MessageIdentifierSet<SequenceRangeNumber>.
Result:
Lots of lines deleted.
In a previous PR we made UID conform to a new protocol MessageIdentifier. This PR continues the trend of removing concrete types and replacing them with generic types.
In this case we have UIDSet and UIDSetNonEmpty. These are identical to SequenceNumberSet and SequenceNumberSetNonEmpty. To allow us to remove the duplicate code a new generic type MessageIdentifierSet has been defined that takes a generic parameter T: MessageIdentifier. Both UID and SequenceNumber conform to MessageIdentifier.
In the next PR I will remove the code for SequenceNumberSet* and replace with MessageIdentifierSet. This PR only addresses the UIDSet* types.
Note: I will update all documentation in another (probably the last) PR.