Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Docker containers building the Apple Swift language for local dev or automated builds

License

Notifications You must be signed in to change notification settings

13rac1/docker-swift-dev-buildbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Buildbot for the Apple Swift language

Runs the Swift buildbot_linux build preset in Ubuntu 16.04/14.04 and Fedora 23 containers. Use for local development unit testing or automated builds.

Source code is accessed on the host machine via a Docker Volume at /src. The build log build-${TIMESTAMP}.log and an install package (on success) swift-${TIMESTAMP}-ubuntu${VERSION}.tar.gz are written to the Volume /output after each build.

Pre-built containers available on Docker Hub at: https://hub.docker.com/r/eosrei/swift-dev-buildbot/

Dockerfiles and Tags

Setup

This process requires a copy of the Swift project codebase to share with the containers. The source can be a location on the host machine or as a linked Volume in another container. The examples assume local development.

Example Swift project cloning, further details at the Swift Github project page:

mkdir swift
cd swift
git clone https://github.com/apple/swift.git swift
./swift/utils/update-checkout --clone-with-ssh

Get the container images and the builds:

docker run --name swift-16 -v $PWD:/src -v $PWD:/output eosrei/swift-dev-buildbot:16.04
docker run --name swift-14 -v $PWD:/src -v $PWD:/output eosrei/swift-dev-buildbot:14.04
docker run --name swift-f23 -v $PWD:/src -v $PWD:/output eosrei/swift-dev-buildbot:fedora23

Note: OS X and Windows with Docker Machine must use volume locations within /Users (OS X) or C:\Users (Windows). Details:

Usage

Subsequent builds will reuse build artifacts and run quickly; ~1.5hrs vs ~20 minutes in my experience.

Run the Ubuntu 16.04 LTS build:

docker start -i -a swift-16

Run the Ubuntu 14.04 LTS build:

docker start -i -a swift-14

Run the Fedora 23 build:

docker start -i -a swift-f23

Example Results

user@server ~/development/swift $ ls -l
total 265616
-rw-r--r--  1 root root   123608 Dec  8 10:31 build-20151208-180542.log
-rw-r--r--  1 root root   799965 Dec  8 14:48 build-20151208-211212.log
drwxr-xr-x 16 user user     4096 Dec  7 16:52 clang
drwxr-xr-x 11 user user     4096 Dec  7 16:53 cmark
drwxr-xr-x 15 user user     4096 Dec  7 16:54 llbuild
drwxr-xr-x 21 user user     4096 Dec  7 20:19 lldb
drwxr-xr-x 16 user user     4096 Dec  7 16:51 llvm
drwxr-xr-x 16 user user     4096 Dec  8 10:05 swift
-rw-r--r--  1 root root 89858509 Dec  8 10:31 swift-20151208-180542-ubuntu14.04.tar.gz
-rw-r--r--  1 root root 89345813 Dec  8 14:48 swift-20151208-211212-ubuntu15.10.tar.gz
drwxr-xr-x 14 user user     4096 Dec  8 12:40 swift-corelibs-foundation
drwxr-xr-x  5 user user     4096 Dec  7 16:54 swift-corelibs-xctest
drwxr-xr-x  8 user user     4096 Dec  7 16:54 swiftpm

About

Docker containers building the Apple Swift language for local dev or automated builds

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages