Skip to content

Commit 052cc78

Browse files
resolve merge confilct
2 parents 27af3bf + 8250a19 commit 052cc78

File tree

15 files changed

+230
-135
lines changed

15 files changed

+230
-135
lines changed

lib/travis/build/addons/apt.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Apt < Base
1616
bionic
1717
focal
1818
jammy
19+
noble
1920
).freeze
2021

2122
attr_reader :safelisted, :disallowed_while_sudo

lib/travis/build/addons/snaps.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Snaps < Base
1414
bionic
1515
focal
1616
jammy
17+
noble
1718
).freeze
1819

1920
def before_prepare?

lib/travis/build/bash/travis_setup_go.bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ travis_setup_go() {
2323
sudo ln -s "${TRAVIS_HOME}/gopath/bin/go${go_version}" "${TRAVIS_HOME}/gopath/bin/go"
2424
travis_cmd "export GOROOT=$(go"${go_version}" env GOROOT)" --echo
2525
travis_cmd "export PATH=${GOROOT}/bin:${PATH}" --echo
26+
mkdir -p "$(dirname "${GOPATH}/src/${go_import_path}")"
27+
ln -s "${TRAVIS_BUILD_DIR}" "$GOPATH/src/${go_import_path}"
2628
}

lib/travis/build/bash/travis_setup_postgresql.bash

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ travis_setup_postgresql() {
2222
jammy)
2323
version='14'
2424
;;
25+
noble)
26+
version='16'
27+
;;
2528
*)
26-
echo -e "${ANSI_RED}Unrecognized operating system.${ANSI_CLEAR}"
29+
:
2730
;;
2831
esac
2932
fi
3033

3134
echo -e "${ANSI_YELLOW}Starting PostgreSQL v${version}${ANSI_CLEAR}"
32-
export PATH="/usr/lib/postgresql/${version}/bin:$PATH"
35+
export PATH="/usr/lib/postgresql/${version}/bin:$PATH" 2>/dev/null
3336

3437
if [[ "${TRAVIS_INIT}" == upstart ]]; then
3538
start_cmd="sudo service postgresql start ${version}"
@@ -39,7 +42,9 @@ travis_setup_postgresql() {
3942
stop_cmd="sudo systemctl stop postgresql"
4043
fi
4144

42-
${stop_cmd}
45+
${stop_cmd} &>/dev/null
46+
47+
sudo pg_createcluster ${version} main &>/dev/null
4348

4449
sudo bash -c "
4550
if [[ -d /var/ramfs && ! -d \"/var/ramfs/postgresql/${version}\" ]]; then
@@ -48,13 +53,12 @@ travis_setup_postgresql() {
4853
fi
4954
" &>/dev/null
5055

51-
${start_cmd}
52-
echo "${start_cmd}"
56+
${start_cmd} &>/dev/null
5357

5458
pushd / &>/dev/null || true
5559
for port in 5432 5433; do
56-
sudo -u postgres createuser -s -p "${port}" travis
57-
sudo -u postgres createdb -O travis -p "${port}" travis
58-
done &>/dev/null
60+
sudo -u postgres createuser -s -p "${port}" travis &>/dev/null
61+
sudo -u postgres createdb -O travis -p "${port}" travis &>/dev/null
62+
done
5963
popd &>/dev/null || true
6064
}

lib/travis/build/config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def sc_data
5454
bionic: ENV.fetch('TRAVIS_BUILD_APT_PACKAGE_SAFELIST_BIONIC', ''),
5555
focal: ENV.fetch('TRAVIS_BUILD_APT_PACKAGE_SAFELIST_FOCAL', ''),
5656
jammy: ENV.fetch('TRAVIS_BUILD_APT_PACKAGE_SAFELIST_JAMMY', ''),
57+
noble: ENV.fetch('TRAVIS_BUILD_APT_PACKAGE_SAFELIST_NOBLE', ''),
5758
},
5859
apt_proxy: ENV.fetch('TRAVIS_BUILD_APT_PROXY', ''),
5960
apt_source_alias_list: {
@@ -63,6 +64,7 @@ def sc_data
6364
bionic: ENV.fetch('TRAVIS_BUILD_APT_SOURCE_ALIAS_LIST_BIONIC', ''),
6465
focal: ENV.fetch('TRAVIS_BUILD_APT_SOURCE_ALIAS_LIST_FOCAL', ''),
6566
jammy: ENV.fetch('TRAVIS_BUILD_APT_SOURCE_ALIAS_LIST_JAMMY', ''),
67+
noble: ENV.fetch('TRAVIS_BUILD_APT_SOURCE_ALIAS_LIST_NOBLE', ''),
6668
},
6769
apt_source_alias_list_key_url_template: ENV.fetch(
6870
'TRAVIS_BUILD_APT_SOURCE_ALIAS_LIST_KEY_URL_TEMPLATE',

lib/travis/build/script/android.rb

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ class Android < Script
1010

1111
def setup
1212
super
13-
13+
set_android_environment_variables
1414
if build_tools_desired.empty?
15-
sh.echo "No build-tools version is specified in android.components. Consider adding one of:", ansi: :yellow
16-
sh.cmd "android list sdk --extended --no-ui --all | awk -F\\\" '/^id.*build-tools/ {print $2}'", echo: false, timing: false
17-
sh.echo "The following versions are pre-installed:", ansi: :yellow
18-
sh.cmd "for v in $(ls /usr/local/android-sdk/build-tools/ | sort -r 2>/dev/null); do echo build-tools-$v; done; echo", echo: false, timing: false
15+
sh.echo "No build-tools version specified in android.components. Consider adding one of the following:", ansi: :yellow
16+
sh.cmd "#{@sdkmanager_bin} --list | grep 'build-tools' | cut -d'|' -f1", echo: false, timing: false
17+
sh.echo "The following versions are preinstalled:", ansi: :yellow
18+
sh.cmd "for v in $(ls #{android_sdk_build_tools_dir} | sort -r 2>/dev/null); do echo build-tools-$v; done; echo", echo: false, timing: false
1919
end
20-
2120
install_sdk_components unless components.empty?
22-
23-
ensure_tools_bin_path
2421
end
2522

2623
def script
@@ -40,33 +37,60 @@ def script
4037

4138
private
4239

40+
def set_android_environment_variables
41+
android_home = ENV['ANDROID_HOME'] || '/usr/local/android-sdk'
42+
sh.export 'ANDROID_HOME', android_home
43+
@sdkmanager_bin = "#{android_home}/cmdline-tools/bin/sdkmanager"
44+
sh.export 'PATH', "#{File.dirname(@sdkmanager_bin)}:#{android_home}/tools:#{android_home}/tools/bin:#{android_home}/platform-tools:$PATH"
45+
sh.cmd "mkdir -p #{File.dirname(@sdkmanager_bin)}", echo: false
46+
end
47+
4348
def install_sdk_components
4449
sh.fold 'android.install' do
4550
sh.echo 'Installing Android dependencies'
51+
android_home = ENV['ANDROID_HOME'] || '/usr/local/android-sdk'
52+
sh.cmd "yes | #{@sdkmanager_bin} --sdk_root=#{android_home} --licenses >/dev/null || true", echo: true
4653
components.each do |name|
4754
sh.cmd install_sdk_component(name)
4855
end
4956
end
5057
end
5158

5259
def install_sdk_component(name)
53-
code = "android-update-sdk --components=#{name}"
54-
code << " --accept-licenses='#{licenses.join('|')}'" unless licenses.empty?
55-
code
60+
android_home = ENV['ANDROID_HOME'] || '/usr/local/android-sdk'
61+
sdk_name = if name =~ /^build-tools-(.+)$/
62+
"build-tools;#{$1}"
63+
elsif name =~ /^platform-tools-(.+)$/
64+
"platform-tools"
65+
elsif name =~ /^tools-(.+)$/
66+
"tools"
67+
elsif name =~ /^platforms-android-(.+)$/
68+
"platforms;android-#{$1}"
69+
elsif name =~ /^android-(.+)$/
70+
"platforms;android-#{$1}"
71+
elsif name =~ /^system-images-android-(.+)-(.+)-(.+)$/
72+
"system-images;android-#{$1};#{$2};#{$3}"
73+
elsif name =~ /^extra-google-(.+)$/
74+
"extras;google;#{$1}"
75+
elsif name =~ /^extra-android-(.+)$/
76+
"extras;android;#{$1}"
77+
else
78+
name
79+
end
80+
"yes | #{@sdkmanager_bin} --sdk_root=#{android_home} \"#{sdk_name}\" --verbose"
5681
end
5782

5883
def build_tools_desired
59-
components.map { |component|
60-
match = /build-tools-(?<version>[\d\.]+)/.match(component)
61-
match[:version] if match
62-
}
84+
components.map do |component|
85+
if component =~ /^build-tools-(?<version>[\d\.]+)$/
86+
Regexp.last_match[:version]
87+
end
88+
end.compact
6389
end
6490

65-
def ensure_tools_bin_path
66-
tools_bin_path = '/usr/local/android-sdk/tools/bin'
67-
sh.if "$(echo :$PATH: | grep -v :#{tools_bin_path}:)" do
68-
sh.export "PATH", "#{tools_bin_path}:$PATH"
69-
end
91+
def android_sdk_build_tools_dir
92+
android_home = ENV['ANDROID_HOME'] || '/usr/local/android-sdk'
93+
File.join(android_home, 'build-tools')
7094
end
7195

7296
def components
@@ -80,8 +104,7 @@ def licenses
80104
def android_config
81105
config[:android] || {}
82106
end
83-
84-
end
107+
end
85108
end
86109
end
87110
end

lib/travis/build/script/csharp.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ def install_dotnet
148148
sh.elif '$(lsb_release -cs) = focal' do
149149
sh.cmd "sudo sh -c \"echo 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main' > /etc/apt/sources.list.d/dotnet-official.list\"", assert: true
150150
end
151+
sh.elif '$(lsb_release -cs) = jammy' do
152+
sh.cmd "sudo sh -c \"echo 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/22.04/prod jammy main' > /etc/apt/sources.list.d/dotnet-official.list\"", assert: true
153+
end
154+
sh.elif '$(lsb_release -cs) = noble' do
155+
sh.cmd "sudo sh -c \"echo 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/24.04/prod noble main' > /etc/apt/sources.list.d/dotnet-official.list\"", assert: true
156+
end
151157
sh.else do
152158
sh.failure "The version of this operating system is not supported by .NET Core. View valid versions at https://docs.travis-ci.com/user/languages/csharp/"
153159
end

lib/travis/build/script/go.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ def cache_slug
7171
if v == 'stable' || v == 'master'
7272
return File.read('/tmp/go-version') || ''
7373
end
74-
v.sub(/^go/, '')
74+
75+
v = v.sub(/^go/, '')
76+
return File.read("/tmp/go-version-#{v}") if v.match(/\d+.\d+.x/)
77+
78+
v
79+
rescue
80+
v
7581
end
7682

7783
private def gimme_config

lib/travis/build/script/php.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
require 'travis/build/script/shared/jvm'
2+
13
module Travis
24
module Build
35
class Script
4-
class Php < Script
6+
class Php < Jvm
7+
58
DEFAULTS = {
69
php: '7.2',
7-
composer: '--no-interaction --prefer-source'
10+
composer: '--no-interaction --prefer-source',
11+
jdk: 'default'
812
}
913

1014
DEPRECATIONS = [
@@ -28,7 +32,6 @@ def export
2832

2933
def setup
3034
super
31-
3235
if php_5_3_or_older?
3336
sh.if "$(lsb_release -sc 2>/dev/null) != precise" do
3437
sh.echo "PHP #{version} is supported only on Precise.", ansi: :red
@@ -61,6 +64,7 @@ def setup
6164
end
6265
sh.cmd "phpenv global #{version}", assert: true
6366
end
67+
6468
sh.cmd "phpenv rehash", assert: false, echo: false, timing: false
6569
composer_self_update
6670
end
@@ -155,7 +159,6 @@ def update_hhvm
155159
sh.raw "echo \"deb [ arch=amd64 ] http://dl.hhvm.com/ubuntu $(lsb_release -sc)-lts-#{hhvm_version} main\" | sudo tee -a /etc/apt/sources.list >&/dev/null"
156160
sh.raw 'sudo apt-get purge hhvm >&/dev/null'
157161
else
158-
# use latest
159162
sh.cmd 'echo "deb [ arch=amd64 ] http://dl.hhvm.com/ubuntu $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list'
160163
end
161164

@@ -182,8 +185,6 @@ def fix_hhvm_php_ini
182185
EOF
183186
sh.raw "sudo mkdir -p $(dirname #{ini_file_path}); echo '#{ini_file_addition}' | sudo tee -a #{ini_file_path} > /dev/null"
184187
sh.raw "sudo chown $(whoami) #{ini_file_path}"
185-
# Ensure that the configured session storage directory exists if
186-
# specified in the ini file.
187188
sh.raw "grep session.save_path #{ini_file_path} | cut -d= -f2 | sudo xargs mkdir -m 01733 -p"
188189
end
189190

public/version-aliases/ghc.json

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@
166166
"9.0.1-alpha1": "9.0.1-alpha1",
167167
"9.0": "9.0.2",
168168
"9.0.1": "9.0.1",
169-
"9": "9.10.1",
170-
"9.x": "9.10.1",
171-
"9.x.x": "9.10.1",
169+
"9": "9.12.20241014",
170+
"9.x": "9.12.20241014",
171+
"9.x.x": "9.12.20241014",
172172
"9.0.x": "9.0.2",
173173
"9.0.2": "9.0.2",
174174
"9.2.1-alpha1": "9.2.1-alpha1",
@@ -197,8 +197,8 @@
197197
"9.4.7": "9.4.7",
198198
"9.4.8": "9.4.8",
199199
"9.6.0.20230111": "9.6.0.20230111",
200-
"9.6.x": "9.6.6",
201-
"9.6": "9.6.6",
200+
"9.6.x": "9.6.7.20250131",
201+
"9.6": "9.6.7.20250131",
202202
"9.6.0.20230128": "9.6.0.20230128",
203203
"9.6.0.20230210": "9.6.0.20230210",
204204
"9.6.0.20230302": "9.6.0.20230302",
@@ -211,9 +211,10 @@
211211
"9.6.4": "9.6.4",
212212
"9.6.5": "9.6.5",
213213
"9.6.6": "9.6.6",
214+
"9.6.7.20250131": "9.6.7.20250131",
214215
"9.8.0.20230727": "9.8.0.20230727",
215-
"9.8.x": "9.8.2",
216-
"9.8": "9.8.2",
216+
"9.8.x": "9.8.4",
217+
"9.8": "9.8.4",
217218
"9.8.0.20230809": "9.8.0.20230809",
218219
"9.8.0.20230822": "9.8.0.20230822",
219220
"9.8.0.20230919": "9.8.0.20230919",
@@ -224,6 +225,8 @@
224225
"9.8.1-alpha4": "9.8.1-alpha4",
225226
"9.8.1": "9.8.1",
226227
"9.8.2": "9.8.2",
228+
"9.8.3": "9.8.3",
229+
"9.8.4": "9.8.4",
227230
"9.10.0.20240313": "9.10.0.20240313",
228231
"9.10.x": "9.10.1",
229232
"9.10": "9.10.1",
@@ -233,5 +236,17 @@
233236
"9.10.1-alpha1": "9.10.1-alpha1",
234237
"9.10.1-alpha2": "9.10.1-alpha2",
235238
"9.10.1-alpha3": "9.10.1-alpha3",
236-
"9.10.1": "9.10.1"
239+
"9.10.1": "9.10.1",
240+
"9.12.0.20241031": "9.12.0.20241031",
241+
"9.12.x": "9.12.20241014",
242+
"9.12": "9.12.20241014",
243+
"9.12.0.20241114": "9.12.0.20241114",
244+
"9.12.0.20241128": "9.12.0.20241128",
245+
"9.12.1-alpha1": "9.12.1-alpha1",
246+
"9.12.1-alpha2": "9.12.1-alpha2",
247+
"9.12.1-alpha3": "9.12.1-alpha3",
248+
"9.12.1": "9.12.1",
249+
"9.12.1.20250219": "9.12.1.20250219",
250+
"9.12.2": "9.12.2",
251+
"9.12.20241014": "9.12.20241014"
237252
}

0 commit comments

Comments
 (0)