diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 00000000..efc6d05e --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,29 @@ +name: Pull request + +on: + pull_request: + types: [opened, reopened, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + name: Test + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main + with: + linux_os_versions: '["noble", "jammy", "focal", "rhel-ubi9"]' + linux_pre_build_command: command -v apt >/dev/null 2>&1 && apt update && apt install -y libsqlite3-dev libncurses-dev || (command -v yum >/dev/null 2>&1 && yum update -y && yum install -y sqlite-devel ncurses-devel) + linux_build_command: 'swift build' + linux_swift_versions: '["nightly-main", "nightly-6.2"]' + windows_swift_versions: '["nightly-main"]' + windows_build_command: 'swift build' + soundness: + name: Soundness + uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main + with: + license_header_check_project_name: "Swift" + api_breakage_check_enabled: false + unacceptable_language_check_enabled: false + format_check_enabled: false diff --git a/.license_header_template b/.license_header_template new file mode 100644 index 00000000..52d6f278 --- /dev/null +++ b/.license_header_template @@ -0,0 +1,11 @@ +@@===----------------------------------------------------------------------===@@ +@@ +@@ This source file is part of the Swift open source project +@@ +@@ Copyright (c) YEARS Apple Inc. and the Swift project authors +@@ Licensed under Apache License v2.0 with Runtime Library Exception +@@ +@@ See http://swift.org/LICENSE.txt for license information +@@ See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +@@ +@@===----------------------------------------------------------------------===@@ diff --git a/.licenseignore b/.licenseignore new file mode 100644 index 00000000..21fbce89 --- /dev/null +++ b/.licenseignore @@ -0,0 +1,9 @@ +**/*.mlmodel +**/*.pbxproj +**/*.png +**/*.xcworkspacedata +**/Package.swift +.dir-locals.el +.editorconfig +CODEOWNERS +Package.swift diff --git a/Tests/SWBCoreTests/ProductTypesTests.swift b/Tests/SWBCoreTests/ProductTypesTests.swift index 3baeb0ef..5bc412bb 100644 --- a/Tests/SWBCoreTests/ProductTypesTests.swift +++ b/Tests/SWBCoreTests/ProductTypesTests.swift @@ -1,9 +1,14 @@ +//===----------------------------------------------------------------------===// // -// ProductTypesTests.swift -// SWBCoreTests +// This source file is part of the Swift open source project // -// Copyright © 2024 Apple Inc. All rights reserved. +// Copyright (c) 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception // +// See http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// import Testing diff --git a/Tests/SwiftBuildTests/TestData/CommandLineTool/CommandLineTool/main.c b/Tests/SwiftBuildTests/TestData/CommandLineTool/CommandLineTool/main.c index 33c14ce1..cdee1235 100644 --- a/Tests/SwiftBuildTests/TestData/CommandLineTool/CommandLineTool/main.c +++ b/Tests/SwiftBuildTests/TestData/CommandLineTool/CommandLineTool/main.c @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project +// +// Copyright (c) 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + int main() { return 0; } diff --git a/Tests/SwiftBuildTests/TestData/CommandLineToolPackage/Sources/CommandLineToolPackage/main.swift b/Tests/SwiftBuildTests/TestData/CommandLineToolPackage/Sources/CommandLineToolPackage/main.swift index e69de29b..380508dc 100644 --- a/Tests/SwiftBuildTests/TestData/CommandLineToolPackage/Sources/CommandLineToolPackage/main.swift +++ b/Tests/SwiftBuildTests/TestData/CommandLineToolPackage/Sources/CommandLineToolPackage/main.swift @@ -0,0 +1,12 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project +// +// Copyright (c) 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + diff --git a/Utilities/swift-ci-perf-tests.sh b/Utilities/swift-ci-perf-tests.sh index 255c7e09..92b4f169 100755 --- a/Utilities/swift-ci-perf-tests.sh +++ b/Utilities/swift-ci-perf-tests.sh @@ -1,4 +1,15 @@ -#!/usr/bin/env bash +#!/bin/bash +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift open source project +## +## Copyright (c) 2025 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See http://swift.org/LICENSE.txt for license information +## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## set -euo pipefail