Skip to content

Commit 3954e81

Browse files
committed
meson: ci: wip: move compilerwarnings task to meson
1 parent eda3f96 commit 3954e81

File tree

2 files changed

+61
-46
lines changed

2 files changed

+61
-46
lines changed

.cirrus.tasks.yml

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,10 @@ task:
690690
ccache_cache:
691691
folder: $CCACHE_DIR
692692

693+
ccache_stats_start_script:
694+
ccache -s
695+
ccache -z
696+
693697
setup_additional_packages_script: |
694698
#apt-get update
695699
#DEBIAN_FRONTEND=noninteractive apt-get -y install ...
@@ -698,79 +702,73 @@ task:
698702
# Test that code can be built with gcc/clang without warnings
699703
###
700704

701-
setup_script: echo "COPT=-Werror" > src/Makefile.custom
702-
703705
# Trace probes have a history of getting accidentally broken. Use the
704706
# different compilers to build with different combinations of dtrace on/off
705707
# and cassert on/off.
706708

707709
# gcc, cassert off, dtrace on
708710
always:
709711
gcc_warning_script: |
710-
time ./configure \
711-
--cache gcc.cache \
712-
--enable-dtrace \
713-
${LINUX_CONFIGURE_FEATURES} \
714-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang-16"
715-
make -s -j${BUILD_JOBS} clean
716-
time make -s -j${BUILD_JOBS} world-bin
712+
mkdir build-gcc && cd build-gcc
713+
CC="ccache gcc" CXX="ccache g++" \
714+
meson setup \
715+
-Dwerror=true \
716+
-Dcassert=false \
717+
-Ddtrace=enabled \
718+
${LINUX_MESON_FEATURES} \
719+
..
720+
time ninja -j${BUILD_JOBS}
717721
718722
# gcc, cassert on, dtrace off
719723
always:
720724
gcc_a_warning_script: |
721-
time ./configure \
722-
--cache gcc.cache \
723-
--enable-cassert \
724-
${LINUX_CONFIGURE_FEATURES} \
725-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang-16"
726-
make -s -j${BUILD_JOBS} clean
727-
time make -s -j${BUILD_JOBS} world-bin
725+
cd build-gcc
726+
meson configure \
727+
-Dcassert=true \
728+
-Ddtrace=disabled
729+
time ninja -j${BUILD_JOBS}
728730
729731
# clang, cassert off, dtrace off
730732
always:
731733
clang_warning_script: |
732-
time ./configure \
733-
--cache clang.cache \
734-
${LINUX_CONFIGURE_FEATURES} \
735-
CC="ccache clang" CXX="ccache clang++-16" CLANG="ccache clang-16"
736-
make -s -j${BUILD_JOBS} clean
737-
time make -s -j${BUILD_JOBS} world-bin
734+
mkdir build-clang && cd build-clang
735+
CC="ccache clang" CXX="ccache clang++" \
736+
meson setup \
737+
-Dwerror=true \
738+
-Dcassert=false \
739+
-Ddtrace=disabled \
740+
${LINUX_MESON_FEATURES} \
741+
..
742+
time ninja -j${BUILD_JOBS}
738743
739744
# clang, cassert on, dtrace on
740745
always:
741746
clang_a_warning_script: |
742-
time ./configure \
743-
--cache clang.cache \
744-
--enable-cassert \
745-
--enable-dtrace \
746-
${LINUX_CONFIGURE_FEATURES} \
747-
CC="ccache clang" CXX="ccache clang++-16" CLANG="ccache clang-16"
748-
make -s -j${BUILD_JOBS} clean
749-
time make -s -j${BUILD_JOBS} world-bin
747+
cd build-clang
748+
meson configure \
749+
-Dcassert=true \
750+
-Ddtrace=enabled
751+
time ninja -j${BUILD_JOBS}
750752
751753
# cross-compile to windows
752754
always:
753755
mingw_cross_warning_script: |
754-
time ./configure \
755-
--host=x86_64-w64-mingw32 \
756-
--enable-cassert \
757-
--without-icu \
758-
CC="ccache x86_64-w64-mingw32-gcc" \
759-
CXX="ccache x86_64-w64-mingw32-g++"
760-
make -s -j${BUILD_JOBS} clean
761-
time make -s -j${BUILD_JOBS} world-bin
756+
mkdir build-w64 && cd build-w64
757+
meson setup \
758+
--cross-file=../src/tools/ci/linux-mingw-w64-64bit.txt \
759+
-Dwerror=true \
760+
-Dcassert=true \
761+
..
762+
time ninja -j${BUILD_JOBS}
762763
763764
###
764765
# Verify docs can be built
765766
###
766767
# XXX: Only do this if there have been changes in doc/ since last build
767768
always:
768769
docs_build_script: |
769-
time ./configure \
770-
--cache gcc.cache \
771-
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang-16"
772-
make -s -j${BUILD_JOBS} clean
773-
time make -s -j${BUILD_JOBS} -C doc
770+
cd build-gcc
771+
time ninja docs
774772
775773
###
776774
# Verify headerscheck / cpluspluscheck succeed
@@ -783,15 +781,19 @@ task:
783781
###
784782
always:
785783
headers_headerscheck_script: |
786-
time ./configure \
784+
mkdir build-ac && cd build-ac
785+
time ../configure \
787786
${LINUX_CONFIGURE_FEATURES} \
788787
--without-icu \
789788
--quiet \
790-
CC="gcc" CXX"=g++" CLANG="clang-16"
791-
make -s -j${BUILD_JOBS} clean
789+
CC="gcc" CXX="g++" CLANG="clang"
790+
make -s -j${BUILD_JOBS} world-bin
792791
time make -s headerscheck EXTRAFLAGS='-fmax-errors=10'
793792
headers_cpluspluscheck_script: |
793+
cd build-ac
794794
time make -s cpluspluscheck EXTRAFLAGS='-fmax-errors=10'
795795
796796
always:
797+
ccache_stats_end_script:
798+
ccache -s
797799
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)