Skip to content

Commit ebd48f2

Browse files
Install Linux deps
1 parent 83f8460 commit ebd48f2

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ 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'

0 commit comments

Comments
 (0)