Skip to content

Commit 1bb5daf

Browse files
committed
ci: add compiler settings and executables to failure repro commands
1 parent 3015f13 commit 1bb5daf

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/ci-clang-tidy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ jobs:
168168
echo "" >> $GITHUB_STEP_SUMMARY
169169
echo "**Local repro:**" >> $GITHUB_STEP_SUMMARY
170170
echo '```sh' >> $GITHUB_STEP_SUMMARY
171-
echo "conan build . -b missing -c user.mp-units.build:all=True -c user.mp-units.analyze:clang-tidy=True -c tools.build:skip_test=True ${{ matrix.conan-config }}" >> $GITHUB_STEP_SUMMARY
171+
CC="${{ matrix.toolchain.compiler.cc }}"
172+
CXX="${{ matrix.toolchain.compiler.cxx }}"
173+
SETTINGS="-s compiler=clang -s compiler.version=${{ matrix.toolchain.compiler.version }} -s compiler.libcxx=libc++ -s compiler.cppstd=${{ matrix.std }} -s build_type=${{ matrix.build_type }}"
174+
echo "conan build . -b missing ${SETTINGS} -c 'tools.build:compiler_executables={\"c\": \"${CC}\", \"cpp\": \"${CXX}\"}' -c user.mp-units.build:all=True -c user.mp-units.analyze:clang-tidy=True -c tools.build:skip_test=True ${{ matrix.conan-config }}" >> $GITHUB_STEP_SUMMARY
172175
echo '```' >> $GITHUB_STEP_SUMMARY
173176
else
174177
echo "## ⏹️ Clang-Tidy Cancelled: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY

.github/workflows/ci-conan.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,19 @@ jobs:
211211
echo "" >> $GITHUB_STEP_SUMMARY
212212
echo "**Local repro:**" >> $GITHUB_STEP_SUMMARY
213213
echo '```sh' >> $GITHUB_STEP_SUMMARY
214-
echo "conan create . -b mp-units/* -b missing -c user.mp-units.build:all=True ${{ matrix.conan-config }}" >> $GITHUB_STEP_SUMMARY
214+
case "${{ matrix.toolchain.compiler.type }}" in
215+
GCC) CONAN_COMPILER="gcc" ;;
216+
CLANG) CONAN_COMPILER="clang" ;;
217+
APPLE_CLANG) CONAN_COMPILER="apple-clang" ;;
218+
MSVC) CONAN_COMPILER="msvc" ;;
219+
esac
220+
SETTINGS="-s compiler=${CONAN_COMPILER} -s compiler.version=${{ matrix.toolchain.compiler.version }} -s compiler.cppstd=${{ matrix.std }} -s build_type=${{ matrix.build_type }}"
221+
[ "${{ matrix.toolchain.compiler.type }}" = "CLANG" ] && SETTINGS="${SETTINGS} -s compiler.libcxx=libc++"
222+
CC="${{ matrix.toolchain.compiler.cc }}"
223+
CXX="${{ matrix.toolchain.compiler.cxx }}"
224+
[ -n "${CC}" ] && COMPILER_CONF="-c 'tools.build:compiler_executables={\"c\": \"${CC}\", \"cpp\": \"${CXX}\"}'" || COMPILER_CONF=""
225+
[ "${{ matrix.toolchain.compiler.type }}" != "MSVC" ] && ALL="True" || ALL="False"
226+
echo "conan create . -b mp-units/* -b missing ${SETTINGS} ${COMPILER_CONF} -c user.mp-units.build:all=${ALL} ${{ matrix.conan-config }}" >> $GITHUB_STEP_SUMMARY
215227
echo '```' >> $GITHUB_STEP_SUMMARY
216228
else
217229
echo "## ⏹️ Build Cancelled: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY

.github/workflows/ci-freestanding.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,15 @@ jobs:
174174
echo "" >> $GITHUB_STEP_SUMMARY
175175
echo "**Local repro:**" >> $GITHUB_STEP_SUMMARY
176176
echo '```sh' >> $GITHUB_STEP_SUMMARY
177-
echo "conan build . -b missing -c user.mp-units.build:all=True -c tools.build:cxxflags=\"['-ffreestanding']\" ${{ matrix.conan-config }}" >> $GITHUB_STEP_SUMMARY
177+
case "${{ matrix.toolchain.compiler.type }}" in
178+
GCC) CONAN_COMPILER="gcc" ;;
179+
CLANG) CONAN_COMPILER="clang" ;;
180+
esac
181+
SETTINGS="-s compiler=${CONAN_COMPILER} -s compiler.version=${{ matrix.toolchain.compiler.version }} -s compiler.cppstd=${{ matrix.std }} -s build_type=${{ matrix.build_type }}"
182+
[ "${{ matrix.toolchain.compiler.type }}" = "CLANG" ] && SETTINGS="${SETTINGS} -s compiler.libcxx=libc++"
183+
CC="${{ matrix.toolchain.compiler.cc }}"
184+
CXX="${{ matrix.toolchain.compiler.cxx }}"
185+
echo "conan build . -b missing ${SETTINGS} -c 'tools.build:compiler_executables={\"c\": \"${CC}\", \"cpp\": \"${CXX}\"}' -c user.mp-units.build:all=True -c tools.build:cxxflags=\"['-ffreestanding']\" ${{ matrix.conan-config }}" >> $GITHUB_STEP_SUMMARY
178186
echo '```' >> $GITHUB_STEP_SUMMARY
179187
else
180188
echo "## ⏹️ Freestanding Build Cancelled: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)