Skip to content

Commit 483e6d6

Browse files
authored
[6.3] Fix GitHub Actions workflow (#2034)
Cherry-pick of #2017, merged as cede0c2 **Explanation**: Fix GitHub actions including updating linux build dependencies and windows build. Disable soundness checks that are not passing yet. The current failures are real test failures that needs to be fixed. **Scope**: limited to GitHub Actions. **Risk**: low due to isolated scope. **Testing**: automated with GitHub Actions. **Issue**: N/A **Reviewer**: @cachemeifyoucan
1 parent c3e6a55 commit 483e6d6

File tree

4 files changed

+58
-9
lines changed

4 files changed

+58
-9
lines changed

.github/scripts/prebuild.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
##===----------------------------------------------------------------------===##
3+
##
4+
## This source file is part of the Swift open source project
5+
##
6+
## Copyright (c) 2025 Apple Inc. and the Swift project authors
7+
## Licensed under Apache License v2.0 with Runtime Library Exception
8+
##
9+
## See http://swift.org/LICENSE.txt for license information
10+
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11+
##
12+
##===----------------------------------------------------------------------===##
13+
14+
set -e
15+
16+
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy
17+
export DEBIAN_FRONTEND=noninteractive
18+
19+
apt-get update -y
20+
21+
# Build dependencies
22+
apt-get install -y libsqlite3-dev libncurses-dev
23+
24+
# Debug symbols
25+
apt-get install -y libc6-dbg
26+
elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
27+
dnf update -y
28+
29+
# Build dependencies
30+
dnf install -y sqlite-devel ncurses-devel
31+
32+
# Debug symbols
33+
dnf debuginfo-install -y glibc
34+
elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2
35+
yum update -y
36+
37+
# Build dependencies
38+
yum install -y sqlite-devel ncurses-devel
39+
40+
# Debug symbols
41+
yum install -y yum-utils
42+
debuginfo-install -y glibc
43+
fi

.github/workflows/pull_request.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ jobs:
1717
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1818
with:
1919
linux_os_versions: '["jammy"]'
20+
linux_pre_build_command: ./.github/scripts/prebuild.sh
2021
linux_swift_versions: '["nightly-main", "nightly-6.2"]'
2122
windows_swift_versions: '["nightly-main"]'
2223
windows_build_command: 'Invoke-Program swift test'
23-
enable_linux_static_sdk_build: true
24-
linux_static_sdk_build_command: SWIFTBUILD_STATIC_LINK=1 LLBUILD_STATIC_LINK=1 swift build
2524
enable_macos_checks: true
2625
macos_xcode_versions: "[\"26.0\"]"
2726
macos_build_command: swift test
@@ -33,3 +32,7 @@ jobs:
3332
license_header_check_project_name: "Swift"
3433
api_breakage_check_enabled: false
3534
format_check_enabled: false
35+
unacceptable_language_check_enabled: false
36+
license_header_check_enabled: false
37+
python_lint_check_enabled: false
38+
yamllint_check_enabled: false

Package.resolved

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ let package = Package(
139139
// Do not enforce checks for LLVM's ABI-breaking build settings.
140140
// makeOptions runtime uses some header-only code from LLVM's ADT classes,
141141
// but we do not want to link libSupport into the executable.
142-
cxxSettings: [.unsafeFlags(["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"])]),
142+
cxxSettings: [.unsafeFlags(["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"])],
143+
linkerSettings: [
144+
.linkedLibrary("swiftCore", .when(platforms: [.windows])), // for swift_addNewDSOImage
145+
]),
143146
],
144147
cxxLanguageStandard: .cxx17
145148
)

0 commit comments

Comments
 (0)