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

Commitafe42f1

Browse files
committed
ci: sync with ndn-tools
Change-Id: I213e160a1f3f01acef23982ddf5d4f458ea0a9eb
1 parentb691ba1 commitafe42f1

File tree

4 files changed

+51
-27
lines changed

4 files changed

+51
-27
lines changed

‎.jenkins‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ case $(uname) in
1010
fi
1111
export ID VERSION_ID
1212
export ID_LIKE="${ID}${ID_LIKE} linux"
13-
export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
13+
if [[-z$GITHUB_ACTIONS ]];then
14+
export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
15+
fi
1416
;;
1517
Darwin)
1618
# Emulate a subset of os-release(5)
1719
export ID=macos
1820
export VERSION_ID=$(sw_vers -productVersion)
19-
export PATH="/usr/local/bin${PATH:+:}${PATH}"
21+
if [[-z$GITHUB_ACTIONS ]];then
22+
export PATH="/usr/local/bin${PATH:+:}${PATH}"
23+
fi
2024
if [[-x /opt/homebrew/bin/brew ]];then
2125
eval"$(/opt/homebrew/bin/brew shellenv)"
2226
elif [[-x /usr/local/bin/brew ]];then
@@ -27,9 +31,9 @@ esac
2731

2832
export CACHE_DIR=${CACHE_DIR:-/tmp}
2933

30-
if [[$JOB_NAME==*"code-coverage" ]];then
31-
export DISABLE_ASAN=yes
32-
export DISABLE_HEADERS_CHECK=yes
34+
if [[$JOB_NAME==*code-coverage ]];then
35+
export DISABLE_ASAN=1
36+
export DISABLE_HEADERS_CHECK=1
3337
fi
3438

3539
# https://reproducible-builds.org/docs/source-date-epoch/

‎.jenkins.d/00-deps.sh‎

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,39 @@ APT_PKGS=(
1515
libboost-thread-dev
1616
libsqlite3-dev
1717
libssl-dev
18-
pkg-config
18+
pkgconf
1919
python3
2020
)
21+
DNF_PKGS=(
22+
boost-devel
23+
gcc-c++
24+
libasan
25+
lld
26+
openssl-devel
27+
pkgconf
28+
python3
29+
sqlite-devel
30+
)
2131
FORMULAE=(boost openssl pkgconf)
22-
PIP_PKGS=()
2332
case$JOB_NAMEin
2433
*code-coverage)
25-
APT_PKGS+=(lcov python3-pip)
26-
PIP_PKGS+=('gcovr~=5.2')
34+
APT_PKGS+=(lcov)
2735
;;
2836
*Docs)
29-
APT_PKGS+=(python3-pip)
30-
PIP_PKGS+=(sphinx)
3137
;;
3238
esac
3339

40+
install_uv() {
41+
if [[-z$GITHUB_ACTIONS&&$ID_LIKE==*debian* ]];then
42+
sudo apt-get install -qy --no-install-recommends pipx
43+
pipx upgrade uv|| pipx install uv
44+
fi
45+
}
46+
3447
set -x
3548

3649
if [[$ID== macos ]];then
50+
export HOMEBREW_COLOR=1
3751
export HOMEBREW_NO_ENV_HINTS=1
3852
if [[-n$GITHUB_ACTIONS ]];then
3953
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
@@ -44,10 +58,17 @@ elif [[ $ID_LIKE == *debian* ]]; then
4458
sudo apt-get update -qq
4559
sudo apt-get install -qy --no-install-recommends"${APT_PKGS[@]}"
4660
elif [[$ID_LIKE==*fedora* ]];then
47-
sudo dnf install -y gcc-c++ libasan lld pkgconf-pkg-config python3 \
48-
boost-devel openssl-devel sqlite-devel
61+
sudo dnf install -y"${DNF_PKGS[@]}"
4962
fi
5063

51-
if((${#PIP_PKGS[@]}));then
52-
pip3 install --user --upgrade --upgrade-strategy=eager"${PIP_PKGS[@]}"
53-
fi
64+
case$JOB_NAMEin
65+
*code-coverage)
66+
install_uv
67+
;;
68+
*Docs)
69+
install_uv
70+
export FORCE_COLOR=1
71+
export UV_NO_MANAGED_PYTHON=1
72+
uv tool install sphinx --upgrade --with-requirements manpages/requirements.txt
73+
;;
74+
esac

‎.jenkins.d/10-build.sh‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ set -eo pipefail
44
if [[-z$DISABLE_ASAN ]];then
55
ASAN="--with-sanitizer=address"
66
fi
7-
if [[$JOB_NAME==*"code-coverage" ]];then
7+
if [[$JOB_NAME==*code-coverage ]];then
88
COVERAGE="--with-coverage"
99
fi
1010

1111
set -x
1212

13-
if [[$JOB_NAME!=*"code-coverage"&&$JOB_NAME!=*"limited-build" ]];then
13+
if [[$JOB_NAME!=*code-coverage&&$JOB_NAME!=*limited-build ]];then
1414
# Build in release mode with tests
1515
./waf --color=yes configure --with-tests
1616
./waf --color=yes build
@@ -30,7 +30,5 @@ fi
3030
./waf --color=yes configure --debug --with-tests$ASAN$COVERAGE
3131
./waf --color=yes build
3232

33-
# (tests will be run against the debug version)
34-
3533
# Install
3634
sudo ./waf --color=yes install

‎.waf-tools/default-compiler-flags.py‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def configure(conf):
1111
conf.start_msg('Checking C++ compiler version')
1212

1313
cxx=conf.env.CXX_NAME# generic name of the compiler
14-
ccver=tuple(int(i)foriinconf.env.CC_VERSION)
14+
ccver=get_compiler_ver(conf)
1515
ccverstr='.'.join(conf.env.CC_VERSION)
1616
errmsg=''
1717
warnmsg=''
@@ -60,6 +60,10 @@ def configure(conf):
6060
conf.env.DEFINES+=generalFlags['DEFINES']
6161

6262

63+
defget_compiler_ver(conf):
64+
returntuple(int(i)foriinconf.env.CC_VERSION)
65+
66+
6367
@Configure.conf
6468
defcheck_compiler_flags(conf):
6569
# Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
@@ -124,9 +128,6 @@ def add_supported_linkflags(self, linkflags):
124128

125129

126130
classCompilerFlags:
127-
defgetCompilerVersion(self,conf):
128-
returntuple(int(i)foriinconf.env.CC_VERSION)
129-
130131
defgetGeneralFlags(self,conf):
131132
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
132133
return {'CXXFLAGS': [],'LINKFLAGS': [],'DEFINES': []}
@@ -226,7 +227,7 @@ def getGeneralFlags(self, conf):
226227
elifUtils.unversioned_sys_platform()=='freebsd':
227228
# Bug #4790
228229
flags['CXXFLAGS']+= [['-isystem','/usr/local/include']]
229-
ifself.getCompilerVersion(conf)>= (18,0,0):
230+
ifget_compiler_ver(conf)>= (18,0,0)andget_compiler_ver(conf)< (20,1,0):
230231
# Bug #5300
231232
flags['CXXFLAGS']+= ['-Wno-enum-constexpr-conversion']
232233
returnflags
@@ -240,10 +241,10 @@ def getDebugFlags(self, conf):
240241
flags=super().getDebugFlags(conf)
241242
flags['CXXFLAGS']+=self.__cxxFlags
242243
# Enable assertions in libc++
243-
ifself.getCompilerVersion(conf)>= (18,0,0):
244+
ifget_compiler_ver(conf)>= (18,0,0):
244245
# https://libcxx.llvm.org/Hardening.html
245246
flags['DEFINES']+= ['_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE']
246-
elifself.getCompilerVersion(conf)>= (15,0,0):
247+
elifget_compiler_ver(conf)>= (15,0,0):
247248
# https://releases.llvm.org/15.0.0/projects/libcxx/docs/UsingLibcxx.html#enabling-the-safe-libc-mode
248249
flags['DEFINES']+= ['_LIBCPP_ENABLE_ASSERTIONS=1']
249250
# Tell libc++ to avoid including transitive headers

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp