8000 meson: ci: wip: move compilerwarnings task to meson · nbyavuz/postgres@48856fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 48856fd

Browse files
committed
meson: ci: wip: move compilerwarnings task to meson
1 parent ae41b24 commit 48856fd

File tree

2 files changed

+61
-48
lines changed

2 files changed

+61
-48
lines changed

.cirrus.tasks.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,10 @@ task:
670670
ccache_cache:
671671
folder: $CCACHE_DIR
672672

673+
ccache_stats_start_script:
674+
ccache -s
675+
ccache -z
676+
673677
setup_additional_packages_script: |
674678
#apt-get update
675679
#DEBIAN_FRONTEND=noninteractive apt-get -y install ...
@@ -678,81 +682,73 @@ task:
678682
# Test that code can be built with gcc/clang without warnings
679683
###
680684

681-
setup_script: echo "COPT=-Werror" > src/Makefile.custom
682-
683685
# Trace probes have a history of getting accidentally broken. Use the
684686
# different compilers to build with different combinations of dtrace on/off
685687
# and cassert on/off.
686688

687689
# gcc, cassert off, dtrace on
688690
always:
689691
gcc_warning_script: |
690-
time ./configure \
691-
--cache gcc.cache \
692-
--enable-dtrace \
693-
${LINUX_CONFIGURE_FEATURES} \
694-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
695-
make -s -j${BUILD_JOBS} clean
696-
time make -s -j${BUILD_JOBS} world-bin
692+
mkdir build-gcc && cd build-gcc
693+
CC="ccache gcc" CXX="ccache g++" \
694+
meson setup \
695+
-Dwerror=true \
696+
-Dcassert=false \
697+
-Ddtrace=enabled \
698+
${LINUX_MESON_FEATURES} \
699+
..
700+
time ninja -j${BUILD_JOBS}
697701
698702
# gcc, cassert on, dtrace off
699703
always:
700704
gcc_a_warning_script: |
701-
time ./configure \
702-
--cache gcc.cache \
703-
--enable-cassert \
704-
${LINUX_CONFIGURE_FEATURES} \
705-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
706-
make -s -j${BUILD_JOBS} clean
707-
time make -s -j${BUILD_JOBS} world-bin
705+
cd build-gcc
706+
meson configure \
707+
-Dcassert=true \
708+
-Ddtrace=disabled
709+
time ninja -j${BUILD_JOBS}
708710
709711
# clang, cassert off, dtrace off
710712
always:
711713
clang_warning_script: |
712-
time ./configure \
713-
--cache clang.cache \
714-
${LINUX_CONFIGURE_FEATURES} \
715-
CC="ccache clang" CXX="ccache clang++" CLANG="ccache clang"
716-
make -s -j${BUILD_JOBS} clean
717-
time make -s -j${BUILD_JOBS} world-bin
714+
mkdir build-clang && cd build-clang
715+
CC="ccache clang" CXX="ccache clang++" \
716+
meson setup \
717+
-Dwerror=true \
718+
-Dcassert=false \
719+
-Ddtrace=disabled \
720+
${LINUX_MESON_FEATURES} \
721+
..
722+
time ninja -j${BUILD_JOBS}
718723
719724
# clang, cassert on, dtrace on
720725
always:
721726
clang_a_warning_script: |
722-
time ./configure \
723-
--cache clang.cache \
724-
--enable-cassert \
725-
--enable-dtrace \
726-
${LINUX_CONFIGURE_FEATURES} \
727-
CC="ccache clang" CXX="ccache clang++" CLANG="ccache clang"
728-
make -s -j${BUILD_JOBS} clean
729-
time make -s -j${BUILD_JOBS} world-bin
727+
cd build-clang
728+
meson configure \
729+
-Dcassert=true \
730+
-Ddtrace=enabled
731+
time ninja -j${BUILD_JOBS}
730732
731733
# cross-compile to windows
732734
always:
733735
mingw_cross_warning_script: |
734-
time ./configure \
735-
--host=x86_64-w64-mingw32 \
736-
--enable-cassert \
737-
--without-icu \
738-
CC="ccache x86_64-w64-mingw32-gcc" \
739-
CXX="ccache x86_64-w64-mingw32-g++"
740-
make -s -j${BUILD_JOBS} clean
741-
time make -s -j${BUILD_JOBS} world-bin
736+
mkdir build-w64 && cd build-w64
737+
meson setup \
738+
--cross-file=../src/tools/ci/linux-mingw-w64-64bit.txt \
739+
-Dwerror=true \
740+
-Dcassert=true \
741+
..
742+
time ninja -j${BUILD_JOBS}
742743
743744
###
744745
# Verify docs can be built
745746
###
746747
# XXX: Only do this if there have been changes in doc/ since last build
747748
always:
748749
docs_build_script: |
749-
time ./configure \
750-
--cache gcc.cache \
751-
CC="ccache gcc" \
752-
CXX="ccache g++" \
753-
CLANG="ccache clang"
754-
make -s -j${BUILD_JOBS} clean
755-
time make -s -j${BUILD_JOBS} -C doc
750+
cd build-gcc
751+
time ninja docs
756752
757753
###
758754
# Verify headerscheck / cpluspluscheck succeed
@@ -765,15 +761,19 @@ task:
765761
###
766762
always:
767763
headers_headerscheck_script: |
768-
time ./configure \
764+
mkdir build-ac && cd build-ac
765+
time ../configure \
769766
${LINUX_CONFIGURE_FEATURES} \
770767
--without-icu \
771768
--quiet \
772-
CC="gcc" CXX"=g++" CLANG="clang"
773-
make -s -j${BUILD_JOBS} clean
769+
CC="gcc" CXX="g++" CLANG="clang"
770+
make -s -j${BUILD_JOBS} world-bin
774771
time make -s headerscheck EXTRAFLAGS='-fmax-errors=10'
775772
headers_cpluspluscheck_script: |
773+
cd build-ac
776774
time make -s cpluspluscheck EXTRAFLAGS='-fmax-errors=10'
777775
778776
always:
777+
ccache_stats_end_script:
778+
ccache -s
779779
upload_caches: ccache
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[binaries]
2+
c = ['ccache', '/usr/bin/x86_64-w64-mingw32-gcc']
3+
cpp = ['ccache', '/usr/bin/x86_64-w64-mingw32-g++']
4+
ar = '/usr/bin/x86_64-w64-mingw32-ar'
5+
strip = '/usr/bin/x86_64-w64-mingw32-strip'
6+
pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
7+
windres = '/usr/bin/x86_64-w64-mingw32-windres'
8+
9+
[host_machine]
10+
system = 'windows'
11+
cpu_family = 'x86_64'
12+
cpu = 'x86_64'
13+
endian = 'little'

0 commit comments

Comments
 (0)
0