Skip to content

Commit 88de062

Browse files
committed
meson: ci: wip: move compilerwarnings task to meson
1 parent e65ff2e commit 88de062

File tree

2 files changed

+61
-47
lines changed

2 files changed

+61
-47
lines changed

.cirrus.yml

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ task:
712712
ccache_cache:
713713
folder: $CCACHE_DIR
714714

715+
ccache_stats_start_script:
716+
ccache -s
717+
ccache -z
718+
715719
setup_additional_packages_script: |
716720
#apt-get update
717721
#DEBIAN_FRONTEND=noninteractive apt-get -y install ...
@@ -720,80 +724,73 @@ task:
720724
# Test that code can be built with gcc/clang without warnings
721725
###
722726

723-
setup_script: echo "COPT=-Werror" > src/Makefile.custom
724-
725727
# Trace probes have a history of getting accidentally broken. Use the
726728
# different compilers to build with different combinations of dtrace on/off
727729
# and cassert on/off.
728730

729731
# gcc, cassert off, dtrace on
730732
always:
731733
gcc_warning_script: |
732-
time ./configure \
733-
--cache gcc.cache \
734-
--enable-dtrace \
735-
${LINUX_CONFIGURE_FEATURES} \
736-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
737-
make -s -j${BUILD_JOBS} clean
738-
time make -s -j${BUILD_JOBS} world-bin
734+
mkdir build-gcc && cd build-gcc
735+
CC="ccache gcc" CXX="ccache g++" \
736+
meson setup \
737+
-Dwerror=true \
738+
-Dcassert=false \
739+
-Ddtrace=enabled \
740+
${LINUX_MESON_FEATURES} \
741+
..
742+
time ninja -j${BUILD_JOBS}
739743
740744
# gcc, cassert on, dtrace off
741745
always:
742746
gcc_a_warning_script: |
743-
time ./configure \
744-
--cache gcc.cache \
745-
--enable-cassert \
746-
${LINUX_CONFIGURE_FEATURES} \
747-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
748-
make -s -j${BUILD_JOBS} clean
749-
time make -s -j${BUILD_JOBS} world-bin
747+
cd build-gcc
748+
meson configure \
749+
-Dcassert=true \
750+
-Ddtrace=disabled
751+
time ninja -j${BUILD_JOBS}
750752
751753
# clang, cassert off, dtrace off
752754
always:
753755
clang_warning_script: |
754-
time ./configure \
755-
--cache clang.cache \
756-
${LINUX_CONFIGURE_FEATURES} \
757-
CC="ccache clang" CXX="ccache clang++" CLANG="ccache clang"
758-
make -s -j${BUILD_JOBS} clean
759-
time make -s -j${BUILD_JOBS} world-bin
756+
mkdir build-clang && cd build-clang
757+
CC="ccache clang" CXX="ccache clang++" \
758+
meson setup \
759+
-Dwerror=true \
760+
-Dcassert=false \
761+
-Ddtrace=disabled \
762+
${LINUX_MESON_FEATURES} \
763+
..
764+
time ninja -j${BUILD_JOBS}
760765
761766
# clang, cassert on, dtrace on
762767
always:
763768
clang_a_warning_script: |
764-
time ./configure \
765-
--cache clang.cache \
766-
--enable-cassert \
767-
--enable-dtrace \
768-
${LINUX_CONFIGURE_FEATURES} \
769-
CC="ccache clang" CXX="ccache clang++" CLANG="ccache clang"
770-
make -s -j${BUILD_JOBS} clean
771-
time make -s -j${BUILD_JOBS} world-bin
769+
cd build-clang
770+
meson configure \
771+
-Dcassert=true \
772+
-Ddtrace=enabled
773+
time ninja -j${BUILD_JOBS}
772774
773775
# cross-compile to windows
774776
always:
775777
mingw_cross_warning_script: |
776-
time ./configure \
777-
--host=x86_64-w64-mingw32 \
778-
--enable-cassert \
779-
CC="ccache x86_64-w64-mingw32-gcc" \
780-
CXX="ccache x86_64-w64-mingw32-g++"
781-
make -s -j${BUILD_JOBS} clean
782-
time make -s -j${BUILD_JOBS} world-bin
778+
mkdir build-w64 && cd build-w64
779+
meson setup \
780+
--cross-file=../src/tools/ci/linux-mingw-w64-64bit.txt \
781+
-Dwerror=true \
782+
-Dcassert=true \
783+
..
784+
time ninja -j${BUILD_JOBS}
783785
784786
###
785787
# Verify docs can be built
786788
###
787789
# XXX: Only do this if there have been changes in doc/ since last build
788790
always:
789791
docs_build_script: |
790-
time ./configure \
791-
--cache gcc.cache \
792-
CC="ccache gcc" \
793-
CXX="ccache g++" \
794-
CLANG="ccache clang"
795-
make -s -j${BUILD_JOBS} clean
796-
time make -s -j${BUILD_JOBS} -C doc
792+
cd build-gcc
793+
time ninja docs
797794
798795
###
799796
# Verify headerscheck / cpluspluscheck succeed
@@ -806,15 +803,19 @@ task:
806803
###
807804
always:
808805
headers_headerscheck_script: |
809-
time ./configure \
806+
mkdir build-ac && cd build-ac
807+
time ../configure \
810808
${LINUX_CONFIGURE_FEATURES} \
811809
--without-icu \
812810
--quiet \
813-
CC="gcc" CXX"=g++" CLANG="clang"
814-
make -s -j${BUILD_JOBS} clean
811+
CC="gcc" CXX="g++" CLANG="clang"
812+
make -s -j${BUILD_JOBS} world-bin
815813
time make -s headerscheck EXTRAFLAGS='-fmax-errors=10'
816814
headers_cpluspluscheck_script: |
815+
cd build-ac
817816
time make -s cpluspluscheck EXTRAFLAGS='-fmax-errors=10'
818817
819818
always:
819+
ccache_stats_end_script:
820+
ccache -s
820821
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)