Skip to content

Commit

Permalink
Added easier Linux testing
Browse files Browse the repository at this point in the history
  • Loading branch information
terhechte committed Apr 4, 2018
1 parent 90eeb56 commit 9ad0129
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ BUILD := .build
DIST := dist
PREFIX := /usr/local
IDENTIFIER := com.stylemac.SourceKittenDaemon
UNAME := $(shell uname)
BINARIES_FOLDER := /bin
LIB_FOLDER := /lib
PWD := $(shell pwd)
Expand All @@ -28,7 +29,15 @@ test:
FIXTURE_PATH="$(ROOT_DIR)/Tests/SourceKittenDaemonTests/Fixtures" \
FIXTURE_PROJECT_DIR="$(ROOT_DIR)/Tests/SourceKittenDaemonTests/Fixtures/Project" \
FIXTURE_PROJECT_FILE_PATH="$(ROOT_DIR)/Tests/SourceKittenDaemonTests/Fixtures/Project/Fixture.xcodeproj" \
swift test
swift test --build-path "./.build/$(UNAME)"

.PHONY: linuxtest
linuxtest:
docker run --rm \
--volume "$(PWD):/package" \
--workdir "/package" \
ibmcom/swift-ubuntu \
/bin/bash -c "make test"

SourceKittenDaemon.pkg: $(DIST)$(BINARIES_FOLDER)/sourcekittendaemon
pkgbuild \
Expand Down
6 changes: 5 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ This is a very simple, featureless reference implementation to see how to embed
This is a *very* simple editor and no sane person should try to write code with it. It is only meant to show how to embed the daemon.

## Linux
SourceKittenDaemon is not Linux-Ready yet, but I'll investigate this in the next days. Also, since it is very dependent upon the SourceKitten and Taylor frameworks, it won't work under Linux until those have been ported, too. The background daemon, SourceKitD, is available as Open Source via Apple's Swift repository.

Linux support is currently in development. If you're interested in helping out, here're the steps to run it on Linux:
1. Install [docker](https://docker.io)
2. Install [the Swift Dockerfile](https://hub.docker.com/r/ibmcom/swift-ubuntu/tags/) (i.e. `docker pull ibmcom/swift-ubuntu`)
3. Run `make linuxtest`

## Troubleshooting

Expand Down

0 comments on commit 9ad0129

Please sign in to comment.