<commit_before>#===--- build-presets.ini - Option presets for building Swift --------------===#
#
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See https://swift.org/LICENSE.txt for license information
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
#===------------------------------------------------------------------------===#

#===------------------------------------------------------------------------===#
# Buildbots for Darwin OSes
#===------------------------------------------------------------------------===#
[preset: mixin_buildbot_install_components]
dash-dash

swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;parser-lib;editor-integration;tools;toolchain-tools;testsuite-tools;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers;

[preset: mixin_buildbot_install_components_with_clang]
swift-install-components=compiler;clang-resource-dir-symlink;stdlib;sdk-overlay;parser-lib;toolchain-tools;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd

[preset: mixin_buildbot_trunk_base]
# Build standard library and SDK overlay for iOS device and simulator.
ios
tvos
watchos
test
validation-test
lit-args=-v
compiler-vendor=apple

dash-dash

verbose-build
build-ninja

build-swift-stdlib-unittest-extra

install-swift

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

# If someone uses this for incremental builds, force reconfiguration.
reconfigure

[preset: buildbot,tools=RA,stdlib=RD,test=no]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=false

# Disable osx tests.
skip-test-osx

# Disable non-x86.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64

[preset: mixin_buildbot_tools_RA_stdlib_RDA]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions
# Also run tests in optimized modes.
test-optimized
test-optimize-for-size

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# This is a release non-incremental build. Run sil-verify-all.
sil-verify-all

[preset: mixin_buildbot_tools_RDA_stdlib_RDA]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release-debuginfo
assertions
# Also run tests in optimized modes.
test-optimized

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# This is a release non-incremental build. Run sil-verify-all.
sil-verify-all

[preset: mixin_buildbot_tools_RA_stdlib_RD]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions
# Also run tests in optimized modes.
test-optimized
test-optimize-for-size

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=false

[preset: mixin_buildbot_tools_R_stdlib_RD]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
no-assertions

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=false

[preset: mixin_buildbot_tools_RA_stdlib_DA]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions

dash-dash

swift-stdlib-build-type=Debug
swift-stdlib-enable-assertions=true


[preset: buildbot,tools=RA,stdlib=DA]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_DA

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=RA,stdlib=RD]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RD

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=RA,stdlib=RD,single-thread]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RD

dash-dash

# Enable non-atomic build of the stdlib
swift-stdlib-use-nonatomic-rc=true

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=R,stdlib=RD]
mixin-preset=
    mixin_buildbot_tools_R_stdlib_RD

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host
check-incremental-compilation


[preset: buildbot,tools=RA,stdlib=RDA]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RDA

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host


[preset: buildbot,tools=RA,stdlib=RDA,long_test]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RDA

test=0
validation-test=0
long-test=1
stress-test=1
test-optimized=0


[preset: buildbot,tools=RA-flto,stdlib=RDA]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RDA

lto

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=RDA-flto,stdlib=RDA]
mixin-preset=
    mixin_buildbot_tools_RDA_stdlib_RDA

lto

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

# This is a mixin preset which builds and smoke-tests lldb.
[preset: lldb-smoketest,tools=RA]
# Build LLDB
lldb

dash-dash

# Use the system debugserver to run the lldb swift tests
lldb-no-debugserver
lldb-use-system-debugserver
lldb-build-type=Release
lldb-test-swift-only
lldb-assertions

#===------------------------------------------------------------------------===#
# Incremental buildbots for Darwin OSes
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental_base]
test
validation-test
lit-args=-v --time-tests

compiler-vendor=apple

dash-dash

# On buildbots, always force a reconfiguration to make sure we pick up changes
# in the build-script and build-presets.ini.
reconfigure

verbose-build
build-ninja

[preset: buildbot_incremental_base_all_platforms]
mixin-preset=buildbot_incremental_base

# Build standard library and SDK overlay for iOS device and simulator.

ios
tvos
watchos

[preset: buildbot_incremental,tools=RA,stdlib=RA]
mixin-preset=
    buildbot_incremental_base_all_platforms
    mixin_buildbot_install_components_with_clang

build-subdir=buildbot_incremental

# Build Release without debug info, because it is faster to build.
release
assertions

build-swift-stdlib-unittest-extra

libcxx

# Build llbuild & swiftpm here
llbuild
swiftpm
indexstore-db
sourcekit-lsp

# Build Playground support
playgroundsupport

dash-dash

# Only run OS X tests to make the build cycle faster.
# We still build the iOS standard library though -- it is free given the
# parallelism.
skip-test-ios
skip-test-tvos
skip-test-watchos

install-swift
install-llbuild
install-swiftpm
install-libcxx

[preset: buildbot_incremental,tools=RA,stdlib=RA,xcode]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RA
build-subdir=buildbot_incremental_xcode

xcode
dash-dash
# We do not support building cross compiled stdlibs on OS X with Xcode. So only
# build the OS X SDK.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64
skip-build-llbuild
skip-test-llbuild
skip-test-swiftpm
skip-build-playgroundsupport
skip-test-playgroundsupport

# This preset is used by CI to test swift-corelibs-xctest.
[preset: buildbot_incremental,tools=RA,stdlib=RA,XCTest]
# We don't use buildbot_incremental_base_all_platforms because we don't need to
# build for iOS/tvOS.
mixin-preset=buildbot_incremental_base

# Build and test XCTest. On Linux, the build script is aware of the dependency
# on Foundation, so that is built as well. On OS X, Foundation is built as part
# of the XCTest Xcode project.
xctest

build-swift-stdlib-unittest-extra

dash-dash

# This preset is meant to test XCTest, not Swift or Foundation. We don't
# want stochastic failures in those test suites to prevent XCTest tests from
# being run.
skip-test-cmark
skip-test-swift
skip-test-libdispatch
skip-test-foundation

# This preset may be used by swift-corelibs-xctest contributors when building
# locally. It takes less time than the CI preset, but is less reliable at
# clearing out cached build products.
[preset: corelibs-xctest]
release
assertions
xctest
test

dash-dash

skip-test-cmark
skip-test-swift
skip-test-foundation
skip-build-benchmarks

[preset: buildbot_incremental_asan,tools=RDA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_asan

# Build Release with debug info, so that we can symbolicate backtraces.
release-debuginfo
assertions

build-swift-stdlib-unittest-extra

dash-dash

# FIXME: Swift/ASan does not support iOS yet.
skip-build-ios
skip-test-ios

# FIXME: Swift/ASan does not support tvos yet.
skip-build-tvos
skip-test-tvos

# FIXME: Swift/ASan does not support watchos yet.
skip-build-watchos
skip-test-watchos

enable-asan

[preset: buildbot_incremental_tsan,tools=RDA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_tsan

# Build Release with debug info, so that we can symbolicate backtraces.
release-debuginfo
assertions
enable-tsan

build-swift-stdlib-unittest-extra

dash-dash

skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos

[preset: buildbot_incremental_asan_ubsan,tools=RDA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_asan_ubsan

# Build Release with debug info, so that we can symbolicate backtraces.
release-debuginfo
assertions

build-swift-stdlib-unittest-extra

dash-dash

# FIXME: Swift/UBSan does not support mac os x yet.
skip-build-osx
skip-test-osx

# FIXME: Swift/ASan does not support iOS yet.
skip-build-ios
skip-test-ios

# FIXME: Swift/ASan does not support tvos yet.
skip-build-tvos
skip-test-tvos

# FIXME: Swift/ASan does not support watchos yet.
skip-build-watchos
skip-test-watchos

enable-asan
enable-ubsan

[preset: buildbot_incremental_asan,tools=DA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_asan_debug

# Build Release with debug info, so that we can symbolicate backtraces.
assertions

build-swift-stdlib-unittest-extra

dash-dash

# FIXME: Swift/ASan does not support iOS yet.
skip-build-ios
skip-test-ios

# FIXME: Swift/ASan does not support tvos yet.
skip-build-tvos
skip-test-tvos

# FIXME: Swift/ASan does not support watchos yet.
skip-build-watchos
skip-test-watchos

enable-asan

swift-stdlib-build-type=RelWithDebInfo


[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx]
mixin-preset=
    buildbot_incremental_base
    lldb-smoketest,tools=RA
    mixin_buildbot_install_components_with_clang
build-subdir=buildbot_incremental

# We build release+asserts.
release
assertions

build-swift-stdlib-unittest-extra

# We run the OS X tests and validation tests.
test
validation-test

llvm-targets-to-build=X86;ARM;AArch64;PowerPC

# Set the vendor to apple
compiler-vendor=apple

dash-dash

# Always reconfigure cmake
reconfigure

# We want to always perform a verbose build
verbose-build

# Build ninja while we are at it
build-ninja

libcxx
llbuild
swiftpm
indexstore-db
sourcekit-lsp
install-swift
install-llbuild
install-swiftpm
install-libcxx

# We need to build the unittest extras so we can test
build-swift-stdlib-unittest-extra

# Make sure our stdlib is RA.
swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# Disable non-x86 building/testing.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64

# Don't build the benchmarks
skip-build-benchmarks

[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx
build-subdir=buildbot_incremental

lto

dash-dash

[preset: buildbot_incremental,tools=RA,llvm-only]
build-subdir=buildbot_incremental_llvmonly

# Build Release without debug info, because it is faster to build.
release-debug
assertions
test=0
lit-args=-v

compiler-vendor=apple

dash-dash

llvm-include-tests
reconfigure
verbose-build
build-ninja

# Do not build swift or cmark
skip-build-swift
skip-build-cmark

#===------------------------------------------------------------------------===#
# A setting to run a buildbot that passes extra swift args when compiling
# modules that match regexp.
#
# This is currently used to run non-default pass orderings to stress the
# optimizer. See utils/pass-pipeline.
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental_extra_swift_args,tools=RA,stdlib=RD]
build-subdir=buildbot_incremental_extra_swift_args
# Build standard library and SDK overlay for iOS device and simulator.
test
validation-test
extra-swift-args=%(extra_swift_args)s
release
assertions
compiler-vendor=apple

dash-dash

# On buildbots, always force a reconfiguration to make sure we pick up changes
# in the build-script and build-presets.ini.
reconfigure

verbose-build
build-ninja

build-swift-stdlib-unittest-extra

skip-build-ios
skip-test-ios
skip-build-lldb

sil-verify-all

#===------------------------------------------------------------------------===#
# Convenience aliases
#
# Do not use on buildbots!
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RA

[preset: asan]
mixin-preset=buildbot_incremental_asan,tools=RDA,stdlib=RDA

#===------------------------------------------------------------------------===#
# Special Runtime Builders
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental_leaks]
compiler-vendor=apple
dash-dash

# Disable ios. These builders are x86 only.
skip-ios
skip-tvos
skip-watchos
# Disable x86 testing. skip-ios disables testing of ios as well.
skip-test-osx

# Always reconfigure so we pick up changes in the build-script and
# build-presets.ini.
reconfigure
verbose-build
build-ninja
build-swift-stdlib-unittest-extra
swift-runtime-enable-leak-checker

[preset: buildbot_incremental_leaks,tools=RA,stdlib=R]
mixin-preset=buildbot_incremental_leaks
build-subdir=buildbot_incremental_leaks_RA_R

# Build release+asserts
release
assertions

dash-dash

# We want our stdlib to not have assertions.
swift-stdlib-enable-assertions=false

[preset: buildbot_incremental_leaks,tools=RA,stdlib=RA]
mixin-preset=buildbot_incremental_leaks
build-subdir=buildbot_incremental_leaks_RA_RA

# Build release+asserts
release
assertions

#===------------------------------------------------------------------------===#
# Package Builders
#===------------------------------------------------------------------------===#

# A mixin that enables 'lightweight' assertions that don't slow down the
# compiler significantly.
[preset: mixin_lightweight_assertions]
assertions
no-swift-stdlib-assertions

# FIXME: This should be:
# no-assertions
# swift-assertions
# ... but our tests are expecting assertions to be either on or off everywhere.

dash-dash

# AST verifier slows down the compiler significantly.
swift-enable-ast-verifier=0

#===------------------------------------------------------------------------===#
# Linux Builders
#===------------------------------------------------------------------------===#
[preset: mixin_linux_install_components_with_clang]
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;parser-lib;toolchain-tools;license;sourcekit-inproc
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd

[preset: mixin_linux_installation]
mixin-preset=
    mixin_lightweight_assertions
    mixin_linux_install_components_with_clang

llbuild
swiftpm
xctest
libicu
libcxx

dash-dash

build-ninja
install-swift
install-lldb
install-llbuild
install-swiftpm
install-xctest
install-libicu
install-prefix=/usr
install-libcxx
install-sourcekit-lsp
build-swift-static-stdlib
build-swift-static-sdk-overlay
build-swift-stdlib-unittest-extra

# Executes the lit tests for the installable package that is created
# Assumes the swift-integration-tests repo is checked out

test-installable-package

# Build the benchmarks against the toolchain.
toolchain-benchmarks

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

[preset: buildbot_linux]
mixin-preset=mixin_linux_installation
build-subdir=buildbot_linux
lldb
release
test
validation-test
long-test
stress-test
test-optimized
foundation
libdispatch
indexstore-db
sourcekit-lsp
lit-args=-v --time-tests

dash-dash

# rdar://problem/31454823
lldb-test-swift-only

install-foundation
install-libdispatch
reconfigure

[preset: mixin_buildbot_linux,no_test]
dash-dash

skip-test-cmark
skip-test-lldb
skip-test-swift
skip-test-llbuild
skip-test-swiftpm
skip-test-xctest
skip-test-foundation
skip-test-libdispatch
skip-test-playgroundsupport
skip-test-libicu
skip-test-indexstore-db
skip-test-sourcekit-lsp

# Linux package with out test
[preset: buildbot_linux,no_test]
mixin-preset=
    buildbot_linux
    mixin_buildbot_linux,no_test

[preset: buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build]
mixin-preset=buildbot_linux

host-test

release
assertions
extra-cmake-options=-DSWIFT_ENABLE_LLD_LINKER:BOOL=OFF

dash-dash

android
android-ndk=%(ndk_path)s
android-api-level=21
android-icu-uc=%(arm_dir)s/libicuucswift.so
android-icu-uc-include=%(arm_dir)s/icu/source/common
android-icu-i18n=%(arm_dir)s/libicui18nswift.so
android-icu-i18n-include=%(arm_dir)s/icu/source/i18n
android-icu-data=%(arm_dir)s/libicudataswift.so

# Disable many build host products. They are unrelated to Android. Foundation,
# libdispatch and XCTest are also disabled because build-script-impl doesn't
# build them for cross-compiled Android.
skip-test-linux
skip-build-lldb
skip-build-llbuild
skip-build-libdispatch
skip-build-foundation
skip-build-xctest
skip-build-playgroundsupport
skip-build-benchmarks
swiftpm=0
indexstore-db=0
sourcekit-lsp=0
toolchain-benchmarks=0
test-installable-package=
install-swiftpm=0

[preset: buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build,aarch64]
mixin-preset=buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build

dash-dash

android-arch=aarch64

# Ubuntu 18.04 preset for backwards compat and future customizations.
[preset: buildbot_linux_1804]
mixin-preset=buildbot_linux

# Ubuntu 18.04 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1804,notest]
mixin-preset=
    buildbot_linux_1804
    mixin_buildbot_linux,no_test

# Ubuntu 16.10 preset for backwards compat and future customizations.
[preset: buildbot_linux_1610]
mixin-preset=buildbot_linux

# Ubuntu 16.10 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1610,notest]
mixin-preset=
    buildbot_linux_1610
    mixin_buildbot_linux,no_test

# Ubuntu 16.04 preset for backwards compat and future customizations.
[preset: buildbot_linux_1604]
mixin-preset=buildbot_linux

# Ubuntu 16.04 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1604,notest]
mixin-preset=
    buildbot_linux_1604
    mixin_buildbot_linux,no_test

# Ubuntu 15.10 preset for backwards compat and future customizations.
[preset: buildbot_linux_1510]
mixin-preset=buildbot_linux

# Ubuntu 15.10 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1510,notest]
mixin-preset=
    buildbot_linux_1510
    mixin_buildbot_linux,no_test

# Ubuntu 14.04 preset for backwards compat and future customizations.
[preset: buildbot_linux_1404]
mixin-preset=buildbot_linux
indexstore-db=0
sourcekit-lsp=0

# Ubuntu 14.04 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1404,notest]
mixin-preset=
    buildbot_linux_1404
    mixin_buildbot_linux,no_test

[preset: buildbot_linux,smoketest]
mixin-preset=mixin_linux_installation
build-subdir=buildbot_linux
lldb
release
test
validation-test
foundation
libdispatch
indexstore-db
sourcekit-lsp
lit-args=-v

dash-dash

install-foundation
install-libdispatch
reconfigure
skip-test-lldb


[preset: buildbot_linux_1404_no_lldb]
mixin-preset=buildbot_incremental_linux
build-subdir=buildbot_linux
release
test
validation-test
long-test
stress-test
foundation
lit-args=-v
indexstore-db=0
sourcekit-lsp=0

[preset: buildbot_linux_armv7]
release
llbuild
lldb
# Not all tests pass, currently
#test
foundation
swiftpm
xctest

build-subdir=buildbot_linux

dash-dash

install-swift
install-lldb
install-llbuild
install-foundation
install-swiftpm
install-xctest
install-prefix=/usr
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;dev
build-swift-static-stdlib
build-swift-static-sdk-overlay

skip-test-lldb

# Executes the lit tests for the installable package that is created
# Assumes the swift-package-tests repo is checked out
# FIXME: Disabled until a home for the swift-snapshot-tests can be found.
#test-installable-package

# Make sure we can build the benchmarks against the toolchain.
toolchain-benchmarks

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

[preset: buildbot_incremental_linux_base]
assertions
release
test
validation-test
lit-args=-v

dash-dash

build-ninja
reconfigure

[preset: buildbot_incremental_linux]
mixin-preset=
    buildbot_incremental_linux_base
    mixin_linux_install_components_with_clang
build-subdir=buildbot_incremental

libcxx
libicu
llbuild
swiftpm
xctest
foundation
libdispatch
indexstore-db
sourcekit-lsp
dash-dash

install-swift
install-llbuild
install-libicu
install-swiftpm
install-foundation
install-libdispatch
install-xctest
install-libcxx

[preset: buildbot_incremental_linux,long_test]
mixin-preset=buildbot_incremental_linux

test=0
validation-test=0
long-test=1
stress-test=1
test-optimized=0

[preset: buildbot_incremental_linux,llvm-only]
mixin-preset=buildbot_incremental_linux_base
build-subdir=buildbot_incremental_llvmonly

test=0
validation-test=0
long-test=0
stress-test=0
test-optimized=0

dash-dash

skip-build-swift
skip-build-cmark
llvm-include-tests


[preset: buildbot_incremental_linux,tsan-libdispatch-test]
mixin-preset=buildbot_incremental_linux,llvm-only
build-subdir=buildbot_incremental_tsan_libdispatch_test

llvm-cmake-options=-DLLVM_INSTALL_UTILS=ON
llvm-install-components=all

libdispatch-cmake-options=-DENABLE_SWIFT=OFF
libdispatch
install-libdispatch

tsan-libdispatch-test


[preset: buildbot_incremental_linux,asan]
mixin-preset=buildbot_incremental_linux
build-subdir=buildbot_incremental_asan

enable-asan
indexstore-db=0
sourcekit-lsp=0

# This does not currently pass due to leakers in the optimizer.
[preset: buildbot_incremental_linux,lsan,tools=RDA,stdlib=RDA,test=no]
build-subdir=buildbot_incremental_lsan

release-debuginfo
assertions
enable-lsan

dash-dash

build-ninja
reconfigure

[preset: buildbot_incremental_linux,lsan,tools=RDA,stdlib=DA,test=no]
build-subdir=buildbot_incremental_lsan

release-debuginfo
assertions
enable-lsan
debug-swift-stdlib
debug-libdispatch

dash-dash

build-ninja
reconfigure

[preset: buildbot_incremental_linux_1404]
mixin-preset=buildbot_incremental_linux
indexstore-db=0
sourcekit-lsp=0

[preset: buildbot_incremental_linux_1404,long_test]
mixin-preset=buildbot_incremental_linux,long_test
indexstore-db=0
sourcekit-lsp=0

#===------------------------------------------------------------------------===#
# OS X Package Builders
#===------------------------------------------------------------------------===#
[preset: mixin_osx_package_base]
mixin-preset=mixin_buildbot_install_components_with_clang
ios
tvos
watchos

lldb
llbuild
swiftpm
swiftsyntax
skstresstester
swiftevolve
playgroundsupport
libcxx
indexstore-db
sourcekit-lsp

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
# are checked in.
swiftsyntax-verify-generated-files

# Build with debug info, this allows us to symbolicate crashes from
# production builds.
release-debuginfo
compiler-vendor=apple

dash-dash

lldb-no-debugserver
lldb-use-system-debugserver
lldb-build-type=Release
verbose-build
build-ninja
build-swift-stdlib-unittest-extra
playgroundsupport-build-type=Release

install-swift
install-lldb
install-llbuild
install-swiftpm
install-swiftsyntax
skip-install-swiftsyntax-module
install-skstresstester
install-swiftevolve
install-playgroundsupport
install-libcxx
install-sourcekit-lsp

install-destdir=%(install_destdir)s

darwin-install-extract-symbols

# Path where debug symbols will be installed.
install-symroot=%(install_symroot)s

# Path where the compiler, the runtime and the standard libraries will be
# installed.
install-prefix=%(install_toolchain_dir)s/usr

# Executes the lit tests for the installable package that is created
# Assumes the swift-integration-tests repo is checked out

test-installable-package

# Make sure that we can build the benchmarks with swiftpm against the toolchain
toolchain-benchmarks

# If someone uses this for incremental builds, force reconfiguration.
reconfigure

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

# Path to the .tar.gz symbols package
symbols-package=%(symbols_package)s

# Info.plist
darwin-toolchain-bundle-identifier=%(darwin_toolchain_bundle_identifier)s
darwin-toolchain-display-name=%(darwin_toolchain_display_name)s
darwin-toolchain-display-name-short=%(darwin_toolchain_display_name_short)s
darwin-toolchain-name=%(darwin_toolchain_xctoolchain_name)s
darwin-toolchain-version=%(darwin_toolchain_version)s
darwin-toolchain-alias=%(darwin_toolchain_alias)s

[preset: mixin_osx_package_test]
build-subdir=buildbot_osx

ios
tvos
watchos
test
validation-test
long-test
stress-test

dash-dash

lldb-test-swift-only

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s


[preset: buildbot_osx_package]
mixin-preset=
    mixin_osx_package_base
    mixin_osx_package_test
    mixin_lightweight_assertions


[preset: buildbot_osx_package,no_assertions]
mixin-preset=
    mixin_osx_package_base
    mixin_osx_package_test

dash-dash

no-assertions


[preset: buildbot_osx_package,no_assertions,lto]
mixin-preset=buildbot_osx_package,no_assertions

lto


[preset: buildbot_osx_package,no_assertions,no_test]
mixin-preset=
    buildbot_osx_package,no_assertions

dash-dash

skip-test-swift
skip-test-swiftpm
skip-test-llbuild
skip-test-lldb
skip-test-cmark
skip-test-playgroundsupport
skip-test-swiftsyntax
skip-test-skstresstester
skip-test-swiftevolve


# Debug version of the compilers, release version of the stdlib.
[preset: buildbot_osx_package,tools=DA,stdlib=R]
mixin-preset=buildbot_osx_package

build-subdir=buildbot_osx_debug

release-debuginfo
assertions
debug-llvm
debug-swift
no-swift-stdlib-assertions


# macOS package with out test
[preset: buildbot_osx_package,no_test]
mixin-preset=
    buildbot_osx_package

dash-dash

skip-test-swift
skip-test-swiftpm
skip-test-llbuild
skip-test-lldb
skip-test-cmark
skip-test-playgroundsupport
skip-test-swiftsyntax
skip-test-skstresstester
skip-test-swiftevolve

#===------------------------------------------------------------------------===#
# LLDB build configurations
#
# Use to build the compiler sources nested in LLDB.
#
# This is only used from Xcode, and expects the following configuration:
## an argument, swift_install_destdir=[path for Swift installed products]
## an environment variable, SWIFT_SOURCE_ROOT=[parent of swift/]
## an environment variable, SWIFT_BUILD_ROOT=[parent of Swift build directory]
#===------------------------------------------------------------------------===#

[preset: LLDB_Nested]
dash-dash
skip-build-benchmarks
install-destdir=%(swift_install_destdir)s
llvm-targets-to-build=X86;ARM;AArch64;PowerPC;SystemZ;Mips

[preset: LLDB_Swift_DebugAssert]
mixin-preset=
    LLDB_Nested

assertions

[preset: LLDB_Swift_DebugAssert_asan]
mixin-preset=
    LLDB_Swift_DebugAssert

enable-asan

[preset: LLDB_Swift_DebugAssert_with_devices]
mixin-preset=
    LLDB_Swift_DebugAssert

ios
tvos
watchos
swift-stdlib-build-type=Release

[preset: LLDB_Swift_ReleaseAssert]
mixin-preset=
    LLDB_Nested

release-debuginfo
assertions

[preset: LLDB_Swift_ReleaseAssert_asan]
mixin-preset=
    LLDB_Swift_ReleaseAssert

enable-asan

[preset: LLDB_Swift_ReleaseAssert_with_devices]
mixin-preset=
    LLDB_Swift_ReleaseAssert

ios
tvos
watchos
swift-stdlib-build-type=Release

#===------------------------------------------------------------------------===#
# Test all platforms on OS X builder
#===------------------------------------------------------------------------===#

[preset: buildbot_all_platforms,tools=RA,stdlib=RA]
mixin-preset=
    buildbot_incremental_base_all_platforms
    lldb-smoketest,tools=RA
    mixin_buildbot_install_components_with_clang

build-subdir=buildbot_incremental

# Build Release without debug info, because it is faster to build.
release
assertions

build-swift-stdlib-unittest-extra

libcxx

# Build llbuild & swiftpm here
llbuild
swiftpm
swiftsyntax

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
# are checked in.
swiftsyntax-verify-generated-files

# Build sourcekit-lsp & indexstore-db
indexstore-db
sourcekit-lsp
install-swift
install-llbuild
install-swiftpm
install-libcxx

# Build Playground support
playgroundsupport

dash-dash

# Run the SIL verifier after each transform when building swift files
sil-verify-all

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host


#===------------------------------------------------------------------------===#
# Test watchOS on OS X builder
#===------------------------------------------------------------------------===#

[preset: buildbot_watch_platform,tools=RA,stdlib=RA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental

# Build Release without debug info, because it is faster to build.
release
assertions

build-swift-stdlib-unittest-extra

# Build llbuild & swiftpm here
llbuild
swiftpm

dash-dash

# Only run watchOS tests
skip-test-ios
skip-test-tvos
skip-test-osx


#===------------------------------------------------------------------------===#
# Mixins for LLBuild, SwiftPM and downstream package project PR tests.
#===------------------------------------------------------------------------===#
[preset: mixin_swiftpm_base]
mixin-preset=buildbot_incremental_base
build-subdir=buildbot_incremental

libcxx
llbuild
swiftpm

install-swift
install-llbuild
install-swiftpm
install-libcxx

skip-test-swift
skip-test-cmark

[preset: mixin_swiftpm_macos_platform]
mixin-preset=
    mixin_swiftpm_base
    mixin_buildbot_install_components_with_clang

[preset: mixin_swiftpm_linux_platform]
mixin-preset=
    mixin_swiftpm_base
    mixin_linux_install_components_with_clang

libdispatch
foundation
xctest

install-foundation
install-libdispatch
install-xctest

skip-test-foundation
skip-test-libdispatch
skip-test-xctest

# Builds enough of the the toolchain to build a swift pacakge on macOS.
[preset: mixin_swiftpm_package_macos_platform]
mixin-preset=mixin_swiftpm_macos_platform

# We don't need to build the benchmark if we just want SwiftPM
skip-build-benchmarks

# We don't need these platforms. Skip them
skip-ios
skip-tvos
skip-watchos

skip-test-llbuild
skip-test-swiftpm

# Builds enough of the the toolchain to build a swift pacakge on Linux.
[preset: mixin_swiftpm_package_linux_platform]
mixin-preset=mixin_swiftpm_linux_platform

skip-test-llbuild
skip-test-swiftpm


#===------------------------------------------------------------------------===#
# Test swiftPM on macOS builder
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftpm_macos_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_macos_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

toolchain-benchmarks
skip-test-toolchain-benchmarks

skip-test-llbuild

#===------------------------------------------------------------------------===#
# Test swiftPM on Linux builder
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftpm_linux_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_linux_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

toolchain-benchmarks
skip-test-toolchain-benchmarks

skip-test-llbuild

#===------------------------------------------------------------------------===#
# Test llbuild on macOS builder
#===------------------------------------------------------------------------===#

[preset: buildbot_llbuild_macos_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_macos_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

#===------------------------------------------------------------------------===#
# Test llbuild on Linux builder
#===------------------------------------------------------------------------===#

[preset: buildbot_llbuild_linux_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_linux_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

#===------------------------------------------------------------------------===#
# Test Swift Syntax
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftsyntax_macos]
mixin-preset=mixin_swiftpm_package_macos_platform
release
assertions
swiftsyntax
swiftsyntax-verify-generated-files
skstresstester
swiftevolve

#===------------------------------------------------------------------------===#
# Test Swift Stress Tester
#===------------------------------------------------------------------------===#
<commit_msg>[build-presets] Add preset for testing SwiftSyntax on Linux<commit_after>#===--- build-presets.ini - Option presets for building Swift --------------===#
#
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See https://swift.org/LICENSE.txt for license information
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
#===------------------------------------------------------------------------===#

#===------------------------------------------------------------------------===#
# Buildbots for Darwin OSes
#===------------------------------------------------------------------------===#
[preset: mixin_buildbot_install_components]
dash-dash

swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;parser-lib;editor-integration;tools;toolchain-tools;testsuite-tools;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers;

[preset: mixin_buildbot_install_components_with_clang]
swift-install-components=compiler;clang-resource-dir-symlink;stdlib;sdk-overlay;parser-lib;toolchain-tools;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd

[preset: mixin_buildbot_trunk_base]
# Build standard library and SDK overlay for iOS device and simulator.
ios
tvos
watchos
test
validation-test
lit-args=-v
compiler-vendor=apple

dash-dash

verbose-build
build-ninja

build-swift-stdlib-unittest-extra

install-swift

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

# If someone uses this for incremental builds, force reconfiguration.
reconfigure

[preset: buildbot,tools=RA,stdlib=RD,test=no]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=false

# Disable osx tests.
skip-test-osx

# Disable non-x86.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64

[preset: mixin_buildbot_tools_RA_stdlib_RDA]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions
# Also run tests in optimized modes.
test-optimized
test-optimize-for-size

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# This is a release non-incremental build. Run sil-verify-all.
sil-verify-all

[preset: mixin_buildbot_tools_RDA_stdlib_RDA]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release-debuginfo
assertions
# Also run tests in optimized modes.
test-optimized

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# This is a release non-incremental build. Run sil-verify-all.
sil-verify-all

[preset: mixin_buildbot_tools_RA_stdlib_RD]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions
# Also run tests in optimized modes.
test-optimized
test-optimize-for-size

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=false

[preset: mixin_buildbot_tools_R_stdlib_RD]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
no-assertions

dash-dash

swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=false

[preset: mixin_buildbot_tools_RA_stdlib_DA]
mixin-preset=
    mixin_buildbot_trunk_base
    mixin_buildbot_install_components

# Build Release without debug info, because it is faster to build.
release
assertions

dash-dash

swift-stdlib-build-type=Debug
swift-stdlib-enable-assertions=true


[preset: buildbot,tools=RA,stdlib=DA]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_DA

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=RA,stdlib=RD]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RD

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=RA,stdlib=RD,single-thread]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RD

dash-dash

# Enable non-atomic build of the stdlib
swift-stdlib-use-nonatomic-rc=true

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=R,stdlib=RD]
mixin-preset=
    mixin_buildbot_tools_R_stdlib_RD

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host
check-incremental-compilation


[preset: buildbot,tools=RA,stdlib=RDA]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RDA

dash-dash

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host


[preset: buildbot,tools=RA,stdlib=RDA,long_test]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RDA

test=0
validation-test=0
long-test=1
stress-test=1
test-optimized=0


[preset: buildbot,tools=RA-flto,stdlib=RDA]
mixin-preset=
    mixin_buildbot_tools_RA_stdlib_RDA

lto

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

[preset: buildbot,tools=RDA-flto,stdlib=RDA]
mixin-preset=
    mixin_buildbot_tools_RDA_stdlib_RDA

lto

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host

# This is a mixin preset which builds and smoke-tests lldb.
[preset: lldb-smoketest,tools=RA]
# Build LLDB
lldb

dash-dash

# Use the system debugserver to run the lldb swift tests
lldb-no-debugserver
lldb-use-system-debugserver
lldb-build-type=Release
lldb-test-swift-only
lldb-assertions

#===------------------------------------------------------------------------===#
# Incremental buildbots for Darwin OSes
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental_base]
test
validation-test
lit-args=-v --time-tests

compiler-vendor=apple

dash-dash

# On buildbots, always force a reconfiguration to make sure we pick up changes
# in the build-script and build-presets.ini.
reconfigure

verbose-build
build-ninja

[preset: buildbot_incremental_base_all_platforms]
mixin-preset=buildbot_incremental_base

# Build standard library and SDK overlay for iOS device and simulator.

ios
tvos
watchos

[preset: buildbot_incremental,tools=RA,stdlib=RA]
mixin-preset=
    buildbot_incremental_base_all_platforms
    mixin_buildbot_install_components_with_clang

build-subdir=buildbot_incremental

# Build Release without debug info, because it is faster to build.
release
assertions

build-swift-stdlib-unittest-extra

libcxx

# Build llbuild & swiftpm here
llbuild
swiftpm
indexstore-db
sourcekit-lsp

# Build Playground support
playgroundsupport

dash-dash

# Only run OS X tests to make the build cycle faster.
# We still build the iOS standard library though -- it is free given the
# parallelism.
skip-test-ios
skip-test-tvos
skip-test-watchos

install-swift
install-llbuild
install-swiftpm
install-libcxx

[preset: buildbot_incremental,tools=RA,stdlib=RA,xcode]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RA
build-subdir=buildbot_incremental_xcode

xcode
dash-dash
# We do not support building cross compiled stdlibs on OS X with Xcode. So only
# build the OS X SDK.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64
skip-build-llbuild
skip-test-llbuild
skip-test-swiftpm
skip-build-playgroundsupport
skip-test-playgroundsupport

# This preset is used by CI to test swift-corelibs-xctest.
[preset: buildbot_incremental,tools=RA,stdlib=RA,XCTest]
# We don't use buildbot_incremental_base_all_platforms because we don't need to
# build for iOS/tvOS.
mixin-preset=buildbot_incremental_base

# Build and test XCTest. On Linux, the build script is aware of the dependency
# on Foundation, so that is built as well. On OS X, Foundation is built as part
# of the XCTest Xcode project.
xctest

build-swift-stdlib-unittest-extra

dash-dash

# This preset is meant to test XCTest, not Swift or Foundation. We don't
# want stochastic failures in those test suites to prevent XCTest tests from
# being run.
skip-test-cmark
skip-test-swift
skip-test-libdispatch
skip-test-foundation

# This preset may be used by swift-corelibs-xctest contributors when building
# locally. It takes less time than the CI preset, but is less reliable at
# clearing out cached build products.
[preset: corelibs-xctest]
release
assertions
xctest
test

dash-dash

skip-test-cmark
skip-test-swift
skip-test-foundation
skip-build-benchmarks

[preset: buildbot_incremental_asan,tools=RDA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_asan

# Build Release with debug info, so that we can symbolicate backtraces.
release-debuginfo
assertions

build-swift-stdlib-unittest-extra

dash-dash

# FIXME: Swift/ASan does not support iOS yet.
skip-build-ios
skip-test-ios

# FIXME: Swift/ASan does not support tvos yet.
skip-build-tvos
skip-test-tvos

# FIXME: Swift/ASan does not support watchos yet.
skip-build-watchos
skip-test-watchos

enable-asan

[preset: buildbot_incremental_tsan,tools=RDA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_tsan

# Build Release with debug info, so that we can symbolicate backtraces.
release-debuginfo
assertions
enable-tsan

build-swift-stdlib-unittest-extra

dash-dash

skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos

[preset: buildbot_incremental_asan_ubsan,tools=RDA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_asan_ubsan

# Build Release with debug info, so that we can symbolicate backtraces.
release-debuginfo
assertions

build-swift-stdlib-unittest-extra

dash-dash

# FIXME: Swift/UBSan does not support mac os x yet.
skip-build-osx
skip-test-osx

# FIXME: Swift/ASan does not support iOS yet.
skip-build-ios
skip-test-ios

# FIXME: Swift/ASan does not support tvos yet.
skip-build-tvos
skip-test-tvos

# FIXME: Swift/ASan does not support watchos yet.
skip-build-watchos
skip-test-watchos

enable-asan
enable-ubsan

[preset: buildbot_incremental_asan,tools=DA,stdlib=RDA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental_asan_debug

# Build Release with debug info, so that we can symbolicate backtraces.
assertions

build-swift-stdlib-unittest-extra

dash-dash

# FIXME: Swift/ASan does not support iOS yet.
skip-build-ios
skip-test-ios

# FIXME: Swift/ASan does not support tvos yet.
skip-build-tvos
skip-test-tvos

# FIXME: Swift/ASan does not support watchos yet.
skip-build-watchos
skip-test-watchos

enable-asan

swift-stdlib-build-type=RelWithDebInfo


[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx]
mixin-preset=
    buildbot_incremental_base
    lldb-smoketest,tools=RA
    mixin_buildbot_install_components_with_clang
build-subdir=buildbot_incremental

# We build release+asserts.
release
assertions

build-swift-stdlib-unittest-extra

# We run the OS X tests and validation tests.
test
validation-test

llvm-targets-to-build=X86;ARM;AArch64;PowerPC

# Set the vendor to apple
compiler-vendor=apple

dash-dash

# Always reconfigure cmake
reconfigure

# We want to always perform a verbose build
verbose-build

# Build ninja while we are at it
build-ninja

libcxx
llbuild
swiftpm
indexstore-db
sourcekit-lsp
install-swift
install-llbuild
install-swiftpm
install-libcxx

# We need to build the unittest extras so we can test
build-swift-stdlib-unittest-extra

# Make sure our stdlib is RA.
swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# Disable non-x86 building/testing.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64

# Don't build the benchmarks
skip-build-benchmarks

[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx
build-subdir=buildbot_incremental

lto

dash-dash

[preset: buildbot_incremental,tools=RA,llvm-only]
build-subdir=buildbot_incremental_llvmonly

# Build Release without debug info, because it is faster to build.
release-debug
assertions
test=0
lit-args=-v

compiler-vendor=apple

dash-dash

llvm-include-tests
reconfigure
verbose-build
build-ninja

# Do not build swift or cmark
skip-build-swift
skip-build-cmark

#===------------------------------------------------------------------------===#
# A setting to run a buildbot that passes extra swift args when compiling
# modules that match regexp.
#
# This is currently used to run non-default pass orderings to stress the
# optimizer. See utils/pass-pipeline.
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental_extra_swift_args,tools=RA,stdlib=RD]
build-subdir=buildbot_incremental_extra_swift_args
# Build standard library and SDK overlay for iOS device and simulator.
test
validation-test
extra-swift-args=%(extra_swift_args)s
release
assertions
compiler-vendor=apple

dash-dash

# On buildbots, always force a reconfiguration to make sure we pick up changes
# in the build-script and build-presets.ini.
reconfigure

verbose-build
build-ninja

build-swift-stdlib-unittest-extra

skip-build-ios
skip-test-ios
skip-build-lldb

sil-verify-all

#===------------------------------------------------------------------------===#
# Convenience aliases
#
# Do not use on buildbots!
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RA

[preset: asan]
mixin-preset=buildbot_incremental_asan,tools=RDA,stdlib=RDA

#===------------------------------------------------------------------------===#
# Special Runtime Builders
#===------------------------------------------------------------------------===#

[preset: buildbot_incremental_leaks]
compiler-vendor=apple
dash-dash

# Disable ios. These builders are x86 only.
skip-ios
skip-tvos
skip-watchos
# Disable x86 testing. skip-ios disables testing of ios as well.
skip-test-osx

# Always reconfigure so we pick up changes in the build-script and
# build-presets.ini.
reconfigure
verbose-build
build-ninja
build-swift-stdlib-unittest-extra
swift-runtime-enable-leak-checker

[preset: buildbot_incremental_leaks,tools=RA,stdlib=R]
mixin-preset=buildbot_incremental_leaks
build-subdir=buildbot_incremental_leaks_RA_R

# Build release+asserts
release
assertions

dash-dash

# We want our stdlib to not have assertions.
swift-stdlib-enable-assertions=false

[preset: buildbot_incremental_leaks,tools=RA,stdlib=RA]
mixin-preset=buildbot_incremental_leaks
build-subdir=buildbot_incremental_leaks_RA_RA

# Build release+asserts
release
assertions

#===------------------------------------------------------------------------===#
# Package Builders
#===------------------------------------------------------------------------===#

# A mixin that enables 'lightweight' assertions that don't slow down the
# compiler significantly.
[preset: mixin_lightweight_assertions]
assertions
no-swift-stdlib-assertions

# FIXME: This should be:
# no-assertions
# swift-assertions
# ... but our tests are expecting assertions to be either on or off everywhere.

dash-dash

# AST verifier slows down the compiler significantly.
swift-enable-ast-verifier=0

#===------------------------------------------------------------------------===#
# Linux Builders
#===------------------------------------------------------------------------===#
[preset: mixin_linux_install_components_with_clang]
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;parser-lib;toolchain-tools;license;sourcekit-inproc
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd

[preset: mixin_linux_installation]
mixin-preset=
    mixin_lightweight_assertions
    mixin_linux_install_components_with_clang

llbuild
swiftpm
xctest
libicu
libcxx

dash-dash

build-ninja
install-swift
install-lldb
install-llbuild
install-swiftpm
install-xctest
install-libicu
install-prefix=/usr
install-libcxx
install-sourcekit-lsp
build-swift-static-stdlib
build-swift-static-sdk-overlay
build-swift-stdlib-unittest-extra

# Executes the lit tests for the installable package that is created
# Assumes the swift-integration-tests repo is checked out

test-installable-package

# Build the benchmarks against the toolchain.
toolchain-benchmarks

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

[preset: buildbot_linux]
mixin-preset=mixin_linux_installation
build-subdir=buildbot_linux
lldb
release
test
validation-test
long-test
stress-test
test-optimized
foundation
libdispatch
indexstore-db
sourcekit-lsp
lit-args=-v --time-tests

dash-dash

# rdar://problem/31454823
lldb-test-swift-only

install-foundation
install-libdispatch
reconfigure

[preset: mixin_buildbot_linux,no_test]
dash-dash

skip-test-cmark
skip-test-lldb
skip-test-swift
skip-test-llbuild
skip-test-swiftpm
skip-test-xctest
skip-test-foundation
skip-test-libdispatch
skip-test-playgroundsupport
skip-test-libicu
skip-test-indexstore-db
skip-test-sourcekit-lsp

# Linux package with out test
[preset: buildbot_linux,no_test]
mixin-preset=
    buildbot_linux
    mixin_buildbot_linux,no_test

[preset: buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build]
mixin-preset=buildbot_linux

host-test

release
assertions
extra-cmake-options=-DSWIFT_ENABLE_LLD_LINKER:BOOL=OFF

dash-dash

android
android-ndk=%(ndk_path)s
android-api-level=21
android-icu-uc=%(arm_dir)s/libicuucswift.so
android-icu-uc-include=%(arm_dir)s/icu/source/common
android-icu-i18n=%(arm_dir)s/libicui18nswift.so
android-icu-i18n-include=%(arm_dir)s/icu/source/i18n
android-icu-data=%(arm_dir)s/libicudataswift.so

# Disable many build host products. They are unrelated to Android. Foundation,
# libdispatch and XCTest are also disabled because build-script-impl doesn't
# build them for cross-compiled Android.
skip-test-linux
skip-build-lldb
skip-build-llbuild
skip-build-libdispatch
skip-build-foundation
skip-build-xctest
skip-build-playgroundsupport
skip-build-benchmarks
swiftpm=0
indexstore-db=0
sourcekit-lsp=0
toolchain-benchmarks=0
test-installable-package=
install-swiftpm=0

[preset: buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build,aarch64]
mixin-preset=buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build

dash-dash

android-arch=aarch64

# Ubuntu 18.04 preset for backwards compat and future customizations.
[preset: buildbot_linux_1804]
mixin-preset=buildbot_linux

# Ubuntu 18.04 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1804,notest]
mixin-preset=
    buildbot_linux_1804
    mixin_buildbot_linux,no_test

# Ubuntu 16.10 preset for backwards compat and future customizations.
[preset: buildbot_linux_1610]
mixin-preset=buildbot_linux

# Ubuntu 16.10 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1610,notest]
mixin-preset=
    buildbot_linux_1610
    mixin_buildbot_linux,no_test

# Ubuntu 16.04 preset for backwards compat and future customizations.
[preset: buildbot_linux_1604]
mixin-preset=buildbot_linux

# Ubuntu 16.04 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1604,notest]
mixin-preset=
    buildbot_linux_1604
    mixin_buildbot_linux,no_test

# Ubuntu 15.10 preset for backwards compat and future customizations.
[preset: buildbot_linux_1510]
mixin-preset=buildbot_linux

# Ubuntu 15.10 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1510,notest]
mixin-preset=
    buildbot_linux_1510
    mixin_buildbot_linux,no_test

# Ubuntu 14.04 preset for backwards compat and future customizations.
[preset: buildbot_linux_1404]
mixin-preset=buildbot_linux
indexstore-db=0
sourcekit-lsp=0

# Ubuntu 14.04 preset that skips all tests except for integration testing of the
# package.
[preset: buildbot_linux_1404,notest]
mixin-preset=
    buildbot_linux_1404
    mixin_buildbot_linux,no_test

[preset: buildbot_linux,smoketest]
mixin-preset=mixin_linux_installation
build-subdir=buildbot_linux
lldb
release
test
validation-test
foundation
libdispatch
indexstore-db
sourcekit-lsp
lit-args=-v

dash-dash

install-foundation
install-libdispatch
reconfigure
skip-test-lldb


[preset: buildbot_linux_1404_no_lldb]
mixin-preset=buildbot_incremental_linux
build-subdir=buildbot_linux
release
test
validation-test
long-test
stress-test
foundation
lit-args=-v
indexstore-db=0
sourcekit-lsp=0

[preset: buildbot_linux_armv7]
release
llbuild
lldb
# Not all tests pass, currently
#test
foundation
swiftpm
xctest

build-subdir=buildbot_linux

dash-dash

install-swift
install-lldb
install-llbuild
install-foundation
install-swiftpm
install-xctest
install-prefix=/usr
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;dev
build-swift-static-stdlib
build-swift-static-sdk-overlay

skip-test-lldb

# Executes the lit tests for the installable package that is created
# Assumes the swift-package-tests repo is checked out
# FIXME: Disabled until a home for the swift-snapshot-tests can be found.
#test-installable-package

# Make sure we can build the benchmarks against the toolchain.
toolchain-benchmarks

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

[preset: buildbot_incremental_linux_base]
assertions
release
test
validation-test
lit-args=-v

dash-dash

build-ninja
reconfigure

[preset: buildbot_incremental_linux]
mixin-preset=
    buildbot_incremental_linux_base
    mixin_linux_install_components_with_clang
build-subdir=buildbot_incremental

libcxx
libicu
llbuild
swiftpm
xctest
foundation
libdispatch
indexstore-db
sourcekit-lsp
dash-dash

install-swift
install-llbuild
install-libicu
install-swiftpm
install-foundation
install-libdispatch
install-xctest
install-libcxx

[preset: buildbot_incremental_linux,long_test]
mixin-preset=buildbot_incremental_linux

test=0
validation-test=0
long-test=1
stress-test=1
test-optimized=0

[preset: buildbot_incremental_linux,llvm-only]
mixin-preset=buildbot_incremental_linux_base
build-subdir=buildbot_incremental_llvmonly

test=0
validation-test=0
long-test=0
stress-test=0
test-optimized=0

dash-dash

skip-build-swift
skip-build-cmark
llvm-include-tests


[preset: buildbot_incremental_linux,tsan-libdispatch-test]
mixin-preset=buildbot_incremental_linux,llvm-only
build-subdir=buildbot_incremental_tsan_libdispatch_test

llvm-cmake-options=-DLLVM_INSTALL_UTILS=ON
llvm-install-components=all

libdispatch-cmake-options=-DENABLE_SWIFT=OFF
libdispatch
install-libdispatch

tsan-libdispatch-test


[preset: buildbot_incremental_linux,asan]
mixin-preset=buildbot_incremental_linux
build-subdir=buildbot_incremental_asan

enable-asan
indexstore-db=0
sourcekit-lsp=0

# This does not currently pass due to leakers in the optimizer.
[preset: buildbot_incremental_linux,lsan,tools=RDA,stdlib=RDA,test=no]
build-subdir=buildbot_incremental_lsan

release-debuginfo
assertions
enable-lsan

dash-dash

build-ninja
reconfigure

[preset: buildbot_incremental_linux,lsan,tools=RDA,stdlib=DA,test=no]
build-subdir=buildbot_incremental_lsan

release-debuginfo
assertions
enable-lsan
debug-swift-stdlib
debug-libdispatch

dash-dash

build-ninja
reconfigure

[preset: buildbot_incremental_linux_1404]
mixin-preset=buildbot_incremental_linux
indexstore-db=0
sourcekit-lsp=0

[preset: buildbot_incremental_linux_1404,long_test]
mixin-preset=buildbot_incremental_linux,long_test
indexstore-db=0
sourcekit-lsp=0

#===------------------------------------------------------------------------===#
# OS X Package Builders
#===------------------------------------------------------------------------===#
[preset: mixin_osx_package_base]
mixin-preset=mixin_buildbot_install_components_with_clang
ios
tvos
watchos

lldb
llbuild
swiftpm
swiftsyntax
skstresstester
swiftevolve
playgroundsupport
libcxx
indexstore-db
sourcekit-lsp

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
# are checked in.
swiftsyntax-verify-generated-files

# Build with debug info, this allows us to symbolicate crashes from
# production builds.
release-debuginfo
compiler-vendor=apple

dash-dash

lldb-no-debugserver
lldb-use-system-debugserver
lldb-build-type=Release
verbose-build
build-ninja
build-swift-stdlib-unittest-extra
playgroundsupport-build-type=Release

install-swift
install-lldb
install-llbuild
install-swiftpm
install-swiftsyntax
skip-install-swiftsyntax-module
install-skstresstester
install-swiftevolve
install-playgroundsupport
install-libcxx
install-sourcekit-lsp

install-destdir=%(install_destdir)s

darwin-install-extract-symbols

# Path where debug symbols will be installed.
install-symroot=%(install_symroot)s

# Path where the compiler, the runtime and the standard libraries will be
# installed.
install-prefix=%(install_toolchain_dir)s/usr

# Executes the lit tests for the installable package that is created
# Assumes the swift-integration-tests repo is checked out

test-installable-package

# Make sure that we can build the benchmarks with swiftpm against the toolchain
toolchain-benchmarks

# If someone uses this for incremental builds, force reconfiguration.
reconfigure

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s

# Path to the .tar.gz symbols package
symbols-package=%(symbols_package)s

# Info.plist
darwin-toolchain-bundle-identifier=%(darwin_toolchain_bundle_identifier)s
darwin-toolchain-display-name=%(darwin_toolchain_display_name)s
darwin-toolchain-display-name-short=%(darwin_toolchain_display_name_short)s
darwin-toolchain-name=%(darwin_toolchain_xctoolchain_name)s
darwin-toolchain-version=%(darwin_toolchain_version)s
darwin-toolchain-alias=%(darwin_toolchain_alias)s

[preset: mixin_osx_package_test]
build-subdir=buildbot_osx

ios
tvos
watchos
test
validation-test
long-test
stress-test

dash-dash

lldb-test-swift-only

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s


[preset: buildbot_osx_package]
mixin-preset=
    mixin_osx_package_base
    mixin_osx_package_test
    mixin_lightweight_assertions


[preset: buildbot_osx_package,no_assertions]
mixin-preset=
    mixin_osx_package_base
    mixin_osx_package_test

dash-dash

no-assertions


[preset: buildbot_osx_package,no_assertions,lto]
mixin-preset=buildbot_osx_package,no_assertions

lto


[preset: buildbot_osx_package,no_assertions,no_test]
mixin-preset=
    buildbot_osx_package,no_assertions

dash-dash

skip-test-swift
skip-test-swiftpm
skip-test-llbuild
skip-test-lldb
skip-test-cmark
skip-test-playgroundsupport
skip-test-swiftsyntax
skip-test-skstresstester
skip-test-swiftevolve


# Debug version of the compilers, release version of the stdlib.
[preset: buildbot_osx_package,tools=DA,stdlib=R]
mixin-preset=buildbot_osx_package

build-subdir=buildbot_osx_debug

release-debuginfo
assertions
debug-llvm
debug-swift
no-swift-stdlib-assertions


# macOS package with out test
[preset: buildbot_osx_package,no_test]
mixin-preset=
    buildbot_osx_package

dash-dash

skip-test-swift
skip-test-swiftpm
skip-test-llbuild
skip-test-lldb
skip-test-cmark
skip-test-playgroundsupport
skip-test-swiftsyntax
skip-test-skstresstester
skip-test-swiftevolve

#===------------------------------------------------------------------------===#
# LLDB build configurations
#
# Use to build the compiler sources nested in LLDB.
#
# This is only used from Xcode, and expects the following configuration:
## an argument, swift_install_destdir=[path for Swift installed products]
## an environment variable, SWIFT_SOURCE_ROOT=[parent of swift/]
## an environment variable, SWIFT_BUILD_ROOT=[parent of Swift build directory]
#===------------------------------------------------------------------------===#

[preset: LLDB_Nested]
dash-dash
skip-build-benchmarks
install-destdir=%(swift_install_destdir)s
llvm-targets-to-build=X86;ARM;AArch64;PowerPC;SystemZ;Mips

[preset: LLDB_Swift_DebugAssert]
mixin-preset=
    LLDB_Nested

assertions

[preset: LLDB_Swift_DebugAssert_asan]
mixin-preset=
    LLDB_Swift_DebugAssert

enable-asan

[preset: LLDB_Swift_DebugAssert_with_devices]
mixin-preset=
    LLDB_Swift_DebugAssert

ios
tvos
watchos
swift-stdlib-build-type=Release

[preset: LLDB_Swift_ReleaseAssert]
mixin-preset=
    LLDB_Nested

release-debuginfo
assertions

[preset: LLDB_Swift_ReleaseAssert_asan]
mixin-preset=
    LLDB_Swift_ReleaseAssert

enable-asan

[preset: LLDB_Swift_ReleaseAssert_with_devices]
mixin-preset=
    LLDB_Swift_ReleaseAssert

ios
tvos
watchos
swift-stdlib-build-type=Release

#===------------------------------------------------------------------------===#
# Test all platforms on OS X builder
#===------------------------------------------------------------------------===#

[preset: buildbot_all_platforms,tools=RA,stdlib=RA]
mixin-preset=
    buildbot_incremental_base_all_platforms
    lldb-smoketest,tools=RA
    mixin_buildbot_install_components_with_clang

build-subdir=buildbot_incremental

# Build Release without debug info, because it is faster to build.
release
assertions

build-swift-stdlib-unittest-extra

libcxx

# Build llbuild & swiftpm here
llbuild
swiftpm
swiftsyntax

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
# are checked in.
swiftsyntax-verify-generated-files

# Build sourcekit-lsp & indexstore-db
indexstore-db
sourcekit-lsp
install-swift
install-llbuild
install-swiftpm
install-libcxx

# Build Playground support
playgroundsupport

dash-dash

# Run the SIL verifier after each transform when building swift files
sil-verify-all

# Don't run host tests for iOS, tvOS and watchOS platforms to make the build
# faster.
skip-test-ios-host
skip-test-tvos-host
skip-test-watchos-host


#===------------------------------------------------------------------------===#
# Test watchOS on OS X builder
#===------------------------------------------------------------------------===#

[preset: buildbot_watch_platform,tools=RA,stdlib=RA]
mixin-preset=buildbot_incremental_base_all_platforms

build-subdir=buildbot_incremental

# Build Release without debug info, because it is faster to build.
release
assertions

build-swift-stdlib-unittest-extra

# Build llbuild & swiftpm here
llbuild
swiftpm

dash-dash

# Only run watchOS tests
skip-test-ios
skip-test-tvos
skip-test-osx


#===------------------------------------------------------------------------===#
# Mixins for LLBuild, SwiftPM and downstream package project PR tests.
#===------------------------------------------------------------------------===#
[preset: mixin_swiftpm_base]
mixin-preset=buildbot_incremental_base
build-subdir=buildbot_incremental

libcxx
llbuild
swiftpm

install-swift
install-llbuild
install-swiftpm
install-libcxx

skip-test-swift
skip-test-cmark

[preset: mixin_swiftpm_macos_platform]
mixin-preset=
    mixin_swiftpm_base
    mixin_buildbot_install_components_with_clang

[preset: mixin_swiftpm_linux_platform]
mixin-preset=
    mixin_swiftpm_base
    mixin_linux_install_components_with_clang

libdispatch
foundation
xctest

install-foundation
install-libdispatch
install-xctest

skip-test-foundation
skip-test-libdispatch
skip-test-xctest

# Builds enough of the the toolchain to build a swift pacakge on macOS.
[preset: mixin_swiftpm_package_macos_platform]
mixin-preset=mixin_swiftpm_macos_platform

# We don't need to build the benchmark if we just want SwiftPM
skip-build-benchmarks

# We don't need these platforms. Skip them
skip-ios
skip-tvos
skip-watchos

skip-test-llbuild
skip-test-swiftpm

# Builds enough of the the toolchain to build a swift pacakge on Linux.
[preset: mixin_swiftpm_package_linux_platform]
mixin-preset=mixin_swiftpm_linux_platform

skip-test-llbuild
skip-test-swiftpm


#===------------------------------------------------------------------------===#
# Test swiftPM on macOS builder
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftpm_macos_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_macos_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

toolchain-benchmarks
skip-test-toolchain-benchmarks

skip-test-llbuild

#===------------------------------------------------------------------------===#
# Test swiftPM on Linux builder
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftpm_linux_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_linux_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

toolchain-benchmarks
skip-test-toolchain-benchmarks

skip-test-llbuild

#===------------------------------------------------------------------------===#
# Test llbuild on macOS builder
#===------------------------------------------------------------------------===#

[preset: buildbot_llbuild_macos_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_macos_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

#===------------------------------------------------------------------------===#
# Test llbuild on Linux builder
#===------------------------------------------------------------------------===#

[preset: buildbot_llbuild_linux_platform,tools=RA,stdlib=RA]
mixin-preset=mixin_swiftpm_linux_platform

# Build Release without debug info, because it is faster to build.
release
assertions

# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

#===------------------------------------------------------------------------===#
# Test Swift Syntax
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftsyntax_macos]
mixin-preset=mixin_swiftpm_package_macos_platform
release
assertions
swiftsyntax
swiftsyntax-verify-generated-files
skstresstester
swiftevolve

[preset: buildbot_swiftsyntax_linux]
mixin-preset=mixin_swiftpm_package_linux_platform
release
assertions
swiftsyntax
swiftsyntax-verify-generated-files


#===------------------------------------------------------------------------===#
# Test Swift Stress Tester
#===------------------------------------------------------------------------===#

{'fraction_non_alphanumeric': 0.15248369362008557, 'fraction_numerical': 0.006010164656354295, 'mean_word_length': 3.814775303373783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2097426', 'n_tokens_mistral': 24481, 'n_tokens_neox': 23280, 'n_words': 5200}