Skip to content

Commit 6f5ff3a

Browse files
gitsterdscho
authored andcommitted
Merge branch 'backport/jx/ci-ubuntu-fix' into maint-2.30
Adjust the GitHub CI to newer ubuntu release. * jx/ci-ubuntu-fix: github-actions: run gcc-8 on ubuntu-20.04 image ci: install python on ubuntu ci: use the same version of p4 on both Linux and macOS ci: remove the pipe after "p4 -V" to catch errors
2 parents 0737200 + a69043d commit 6f5ff3a

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ jobs:
282282
pool: ubuntu-latest
283283
- jobname: linux-gcc
284284
cc: gcc
285-
pool: ubuntu-latest
285+
pool: ubuntu-20.04
286286
- jobname: osx-clang
287287
cc: clang
288288
pool: macos-latest

ci/install-dependencies.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
. ${0%/*}/lib.sh
77

8-
P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
8+
P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
99
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
1010
UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
1111
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
@@ -16,7 +16,7 @@ linux-clang|linux-gcc)
1616
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
1717
sudo apt-get -q update
1818
sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \
19-
$UBUNTU_COMMON_PKGS
19+
$UBUNTU_COMMON_PKGS $PYTHON_PACKAGE
2020
case "$jobname" in
2121
linux-gcc)
2222
sudo apt-get -q -y install gcc-8
@@ -44,13 +44,15 @@ osx-clang|osx-gcc)
4444
test -z "$BREW_INSTALL_PACKAGES" ||
4545
brew install $BREW_INSTALL_PACKAGES
4646
brew link --force gettext
47-
brew install --cask --no-quarantine perforce || {
48-
# Update the definitions and try again
49-
cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask &&
50-
git -C "$cask_repo" pull --no-stat --ff-only &&
51-
brew install --cask --no-quarantine perforce
52-
} ||
53-
brew install homebrew/cask/perforce
47+
mkdir -p $HOME/bin
48+
(
49+
cd $HOME/bin
50+
wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" &&
51+
tar -xf helix-core-server.tgz &&
52+
sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true
53+
)
54+
PATH="$PATH:${HOME}/bin"
55+
export PATH
5456
case "$jobname" in
5557
osx-gcc)
5658
brew install gcc@9
@@ -81,9 +83,9 @@ esac
8183
if type p4d >/dev/null && type p4 >/dev/null
8284
then
8385
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
84-
p4d -V | grep Rev.
86+
p4d -V
8587
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
86-
p4 -V | grep Rev.
88+
p4 -V
8789
fi
8890
if type git-lfs >/dev/null
8991
then

ci/lib.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ export SKIP_DASHED_BUILT_INS=YesPlease
184184

185185
case "$jobname" in
186186
linux-clang|linux-gcc)
187+
PYTHON_PACKAGE=python2
187188
if [ "$jobname" = linux-gcc ]
188189
then
189190
export CC=gcc-8
190-
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3"
191-
else
192-
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python2"
191+
PYTHON_PACKAGE=python3
193192
fi
193+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
194194

195195
export GIT_TEST_HTTPD=true
196196

@@ -199,7 +199,6 @@ linux-clang|linux-gcc)
199199
# were recorded in the Homebrew database upon creating the OS X
200200
# image.
201201
# Keep that in mind when you encounter a broken OS X build!
202-
export LINUX_P4_VERSION="16.2"
203202
export LINUX_GIT_LFS_VERSION="1.5.2"
204203

205204
P4_PATH="$HOME/custom/p4"

0 commit comments

Comments
 (0)