Skip to content

Instantly share code, notes, and snippets.

@jpsim
Created December 14, 2017 18:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpsim/4ee8b89a65bb4b7f34de8405fee9650d to your computer and use it in GitHub Desktop.
Save jpsim/4ee8b89a65bb4b7f34de8405fee9650d to your computer and use it in GitHub Desktop.
Build & run a subset of Swift tests on Linux

Build & run a subset of Swift tests on Linux

# Spin up a beefy Digital Ocean droplet
doctl compute droplet create swift-dev --size m-224gb --image ubuntu-16-10-x64 --region sfo2 --ssh-keys XXXXXXX
doctl compute ssh swift-dev
# Install dependencies
apt-get update
apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev libcurl4-openssl-dev autoconf libtool systemtap-sdt-dev tzdata
# Clone & build Swift
git clone https://github.com/apple/swift.git
cd swift
utils/update-checkout --clone
utils/build-script -R
# Run the Swift test suite
utils/build-script -R --test
# Run a subset of the Swift test suite, in this case SourceKit
/usr/bin/python /root/llvm/utils/lit/lit.py --incremental -sv /root/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/SourceKit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment