build.atpkg 4.41 KB
Newer Older
Drew's avatar
Drew committed
1 2
(package
 :name "Caroline"
3
 :version "0.1-dev"
Drew's avatar
Drew committed
4 5 6 7 8
    :tasks {
        :statictool {
            :tool "atllbuild"
            :output-type "executable"
            :name "caroline_static_tool"
9
            :executable-name "caroline-static-tool"
Drew's avatar
Drew committed
10 11
            :sources ["caroline-static-tool/**.swift"]
            :publish-product true
12
            :link-options ["-static-stdlib"]
Drew's avatar
Drew committed
13
        }
14 15 16 17 18 19 20 21 22 23 24 25 26 27

        :statictool-atbin {
            :tool "packageatbin"
            :name "caroline-static-tool"
            :atllbuild-task "statictool"
            :platforms ["all"]
        }
        :statictool-homebrew {
            :tool "package-homebrew.attool"
            :name "caroline-static-tool"
            :url "test-url-please-ignore-FIXME"
            :only-platforms ["osx"]
            :dependencies ["statictool-atbin"]
        }
Drew's avatar
Drew committed
28 29 30 31 32 33
        :statictool-deb {
            :tool "package-deb.attool"
            :name "caroline-static-tool"
            :dependencies ["statictool-atbin"]
            :only-platforms ["linux"]
        }
34 35
        :package-statictool {
            :tool "nop"
Drew's avatar
Drew committed
36
            :dependencies ["statictool-homebrew" "statictool-deb"]
37
        }
Drew's avatar
Drew committed
38 39 40
        :debug {
            :dependencies ["statictool"]
            :tool "shell"
41
            :script ".atllbuild/products/caroline-static-tool --core caroline-static-tool-tests/fixtures/SampleTests/foo.swift"
Drew's avatar
Drew committed
42 43 44 45 46 47 48
        }
        :core {
            :tool "atllbuild"
            :output-type "static-library"
            :name "CarolineCore"
            :sources ["CarolineCore/**.swift"]
        }
Drew's avatar
Drew committed
49 50 51 52 53 54
        :core-dynamic {
            :tool "atllbuild"
            :output-type "dynamic-library"
            :name "CarolineCore"
            :sources ["CarolineCore/**.swift"]
            :publish-product true
Drew's avatar
Drew committed
55
            :framework true
Drew's avatar
Drew committed
56
        }
57 58 59 60 61 62
        :core-package {
            :tool "packageatbin"
            :name "CarolineCore"
            :atllbuild-task "core-dynamic"
            :platforms ["all"]
        }
Drew's avatar
Drew committed
63
        :core-framework {
64
            :tool "package-framework.attool"
Drew's avatar
Drew committed
65
            :name "CarolineCore"
66
            :info-plist "CarolineCore/Info.plist"
67
            :dependencies ["core-package"]
Drew's avatar
Drew committed
68
        }
Drew's avatar
Drew committed
69

Drew's avatar
Drew committed
70
        ;;simpletest is a basic sanity check of the gen/test/runner infrastructure
Drew's avatar
Drew committed
71 72
        :simpletest-gen {
            :tool "shell"
73
            :script "bin/caroline-static-tool --core tests/SimpleTest/foo.swift > tests/SimpleTest/main.swift"
Drew's avatar
Drew committed
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
            :dependencies ["statictool"]
        }
        :simpletest-build {
            :dependencies ["core" "simpletest-gen"]
            :tool "atllbuild"
            :output-type "executable"
            :name "SimpleTest"
            :sources ["tests/SimpleTest/**.swift"]
            :link-with ["CarolineCore.a"]
            :publish-product true
        }
        :simpletest {
            :dependencies ["simpletest-build"]
            :tool "shell"
            :script "bin/SimpleTest"
        }
Drew's avatar
Drew committed
90 91 92 93

        ;;coretest tests the full core API
        :coretest-gen {
            :tool "shell"
94
            :script "bin/caroline-static-tool --core tests/CoreTests/assert.swift tests/CoreTests/fail.swift tests/CoreTests/SimpleEqual.swift tests/CoreTests/SequenceEqual.swift > tests/CoreTests/main.swift"
Drew's avatar
Drew committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
            :dependencies ["statictool"]
        }
        :coretest-build {
            :dependencies ["core" "coretest-gen"]
            :tool "atllbuild"
            :output-type "executable"
            :name "CoreTest"
            :sources ["tests/CoreTests/**.swift"]
            :link-with ["CarolineCore.a"]
            :publish-product true
        }
        :coretest {
            :dependencies ["coretest-build"]
            :tool "shell"
            :script "bin/CoreTest"
        }
        
        ;;this alternative coretest tasks should be used with --toolchain xcode
        ;; you must also manually run coretest-gen prior to these working, as codetest-gen isn't supported on xcode toolchain
        :coretest-build-xcode {
            :dependencies ["core"]
            :tool "atllbuild"
            :output-type "executable"
            :name "CoreTest"
            :sources ["tests/CoreTests/**.swift"]
            :link-with ["CarolineCore.a"]
            :publish-product true
        }
        :coretest {
            :dependencies ["coretest-build-xcode"]
            :tool "shell"
            :script "bin/CoreTest"
        }
Drew's avatar
Drew committed
128
        :check {
Drew's avatar
Drew committed
129
            :dependencies ["simpletest" "coretest"]
Drew's avatar
Drew committed
130 131
            :tool "nop"
        }
Drew's avatar
Drew committed
132 133
     }
)