mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
a6bae8b759ec4aee952abd1068a5b4d420bf03a7
motivation: be able to build and test on linux changes: * add dockerfile to create docker image running all toold required for testing on linux * add readme with instruction on how to use the docker setup * add script to generate linux tests mapping * add .swift_version file to explicitly call out the swift version needed to build the project * adjust code that did not build on linux, mainly casting between Int32 and Int
@linux
creating a docker image for linux
# create the docker image for linux (one time or when dockerfile changes)
$ docker build . --build-arg version=$(cat .swift-version) -t=nio
using the linux docker image
# use the docker image, bind mount the current dir with code
$ docker run -it -v `pwd`:/code -w /code swift-nio bash
# do your thing
$ swift build
$ swift test
testing on linux
to know which tests to run on linux, swift requires a special mapping file called LinuxMain.swift and explicit mapping of each test case into a static list of tests. this is a real pita, but we are here to help!
# generate linux tests
$ ruby generate_linux_tests.rb
Description
Mirror of github.com/apple/swift-nio
82 MiB
0 Stars
1 Watchers
0 Forks
Languages
Swift
92%
C
4.9%
Shell
2%
CMake
0.5%
C++
0.4%