Skip to content

Instantly share code, notes, and snippets.

@rfdickerson
Last active March 2, 2016 15:39
Show Gist options
  • Save rfdickerson/1cf5be0dbde2bf4711e5 to your computer and use it in GitHub Desktop.
Save rfdickerson/1cf5be0dbde2bf4711e5 to your computer and use it in GitHub Desktop.
Installation instructions for a SNAPHOT with XCTest support
  1. Install the latest snapshot:

wget https://swift.org/builds/development/ubuntu1510/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-ubuntu15.10.tar.gz

  1. Set an environment variable pointing to your snapshot

export SWIFT_PATH=/home/rfdickerson/linux-swift-testing/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-ubuntu15.10

  1. Download Swift Package Manager repository:

git clone https://github.com/apple/swift-package-manager.git

  1. Build the Package Manager:

cd swift-package-manager

Utilities/bootstap --swiftc ${SWIFT_PATH}/usr/bin/swiftc \ 
  --sbt ${SWIFT_PATH}/usr/bin/sbt \ 
  --prefix ${SWIFT_PATH}/usr \ 
  install

cd ..

  1. Download XCTest framework:

git clone https://github.com/apple/swift-corelibs-xctest

  1. Build the XCTest framework:
cd swift-corelibs-xctest
./build_script.py \
  --swiftc="${SWIFT_PATH}/usr/bin/swiftc" \
  --build-dir="/tmp/XCTest_build" \
  --library-install-path="${SWIFT_PATH}/usr/lib/swift/linux" \
  --module-install-path="${SWIFT_PATH}/usr/lib/swift/linux/x86_64"
  ```
  
7. Download libDispatch

```shell
git submodule init && \
git submodule update && \
sh ./autogen.sh && \
./configure --with-swift-toolchain=${SWIFT_PATH}/usr \
--prefix=${SWIFT_PATH}/usr && make && sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment