Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9302f6f

Browse files
committed
ci: Upgrade macOS version from 13 to 14.
1. Previously we were using ghcr.io/cirruslabs/macos-XXX-base:latestimages, but Cirrus has started ignoring that and using a particularimage, currently ghcr.io/cirruslabs/macos-runner:sonoma, for githubaccounts using free CI resources (as opposed to dedicated runnermachines, as cfbot uses). Let's just ask for that image anyway, to stayin sync.2. Instead of hard-coding a MacPorts installation URL, deduce it fromthe running macOS version and the available releases. This removes theneed to keep the ci_macports_packages.sh in sync with .cirrus.task.yml,and to advance the MacPorts version from time to time.3. Change the cache key we use to cache the whole macports installationacross builds to include the OS major version, to trigger a freshinstallation when appropriate.Back-patch to 15 where CI began.Reviewed-by: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/CA%2BhUKGLqJdv6RcwyZ_0H7khxtLTNJyuK%2BvDFzv3uwYbn8hKH6A%40mail.gmail.com
1 parent7c32f22 commit9302f6f

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

‎.cirrus.tasks.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ task:
409409

410410

411411
task:
412-
name:macOS -Ventura - Meson
412+
name:macOS -Sonoma - Meson
413413

414414
env:
415415
CPUS:4# always get that much for cirrusci macOS instances
@@ -418,7 +418,7 @@ task:
418418
# work OK. See
419419
# https://postgr.es/m/20220927040208.l3shfcidovpzqxfh%40awork3.anarazel.de
420420
TEST_JOBS:8
421-
IMAGE:ghcr.io/cirruslabs/macos-ventura-base:latest
421+
IMAGE:ghcr.io/cirruslabs/macos-runner:sonoma
422422

423423
CIRRUS_WORKING_DIR:${HOME}/pgsql/
424424
CCACHE_DIR:${HOME}/ccache
@@ -456,6 +456,11 @@ task:
456456
# updates macports every time.
457457
macports_cache:
458458
folder:${MACPORTS_CACHE}
459+
fingerprint_script:|
460+
# Include the OS major version in the cache key. If the OS image changes
461+
# to a different major version, we need to reinstall.
462+
sw_vers -productVersion | sed 's/\..*//'
463+
reupload_on_changes:true
459464
setup_additional_packages_script:|
460465
sh src/tools/ci/ci_macports_packages.sh \
461466
ccache \

‎src/tools/ci/ci_macports_packages.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@ set -e
1313

1414
packages="$@"
1515

16-
macports_url="https://github.com/macports/macports-base/releases/download/v2.8.1/MacPorts-2.8.1-13-Ventura.pkg"
16+
macos_major_version="` sw_vers -productVersion| sed's/\..*//'`"
17+
echo"macOS major version:$macos_major_version"
18+
19+
# Scan the avialable MacPorts releases to find the latest one for the
20+
# running macOS release. By default we assume the first match is the most
21+
# recent MacPorts version but that can be changed below if it turns out to be
22+
# problematic or a particular MacPorts release turns out to be broken.
23+
macports_release_list_url="https://api.github.com/repos/macports/macports-base/releases"
24+
macports_version_pattern=".*"
25+
#macports_version_pattern="2\.9\.3"
26+
macports_url="$( curl -s$macports_release_list_url| grep"\"https://github.com/macports/macports-base/releases/download/v$macports_version_pattern/MacPorts-$macports_version_pattern-$macos_major_version-[A-Za-z]*\.pkg\""| sed's/.*: "//;s/".*//'| head -1)"
27+
echo"MacPorts package URL:$macports_url"
28+
1729
cache_dmg="macports.hfs.dmg"
1830

1931
if ["$CIRRUS_CI"!="true" ];then

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp