Commit 74bfed19 authored by Drew's avatar Drew

Initial README

We're still debating this, but let's debate a specific document.
parent 2b8b9e22
# swiftbuild
\ No newline at end of file
# atbuild
The Anarchy Tools Build Tool.
$ buildtool build
$ buildtool build-tests
$ buildtool run-tests
The configuration file defines *tasks*, which are entrypoints on the CLI. `build`, `build-tests`, and `run-tests` are *tasks*.
This runs a task called `default`:
$ buildtool
Configurations could look like this:
$ buildtool run-tests --platform linux
name: "sample"
description: "A configuration sample"
# Dependencies aren't resolved by the build tool (you want the package manager), but they look like this:
- "", “2.2-SNAPSHOT”
# We can declare custom tools.
type: shell
#specify custom behavior for osx/linux
script: "xctest $outputdir/$testlib"
script: "xctest-linux $outputdir/$testlib"
#There's no magic; this is just a task called "build"
#A tool that compiles the swift module
tool: lldb-swift
#The rest of these settings are just options for that tool
name: json-swift
output-type: library
#walk the src directory and recursively find all swift files
source: ["src/**.swift"]
#override custom settings for swift/linux
deps: ["build-foundation"]
linkflags: ["-lFoundation"]
linkflags: ["-Framework Foundation"]
tool: "abort"
message = "You need to specify --profile [osx|linux]"
#A second task, named "build-test"
#This builds a test target
deps: ["build"] #Build the main target first
tool: "lldb-build"
name: "test"
output-type: "XCTest"
source: ["tests/**.swift"]
#A third task, that runs the test
deps: ["build-test"] #build them first
tool: xctest-runner #use the xctest-runner tool we created
testlib: tests.xctest #pass this argument
In the example above, there are three built-in tools: “lldb-build”, "abort", and “shell”. These tools take in the parameters from the configuration file for their respective usages. In addition, there is another tool defined, “xctest-runner”, that is just an alias of sorts to invoke the “shell” tool in a specific way.
The package file is a set of metadata to describe how the build process should work, and push all the actual work out to separate tools. There are a set of tools that are built-in that provide some of the standard behavior we want to support. At the same time, there are extension points to defining new tools as well. These tools can be defined within the package file or within source code for more advanced tools.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment