Skip to content

Commit 97368d5

Browse files
committed
ci: yet another approach to fix repro text and actions
1 parent 93b2b2c commit 97368d5

File tree

5 files changed

+22
-29
lines changed

5 files changed

+22
-29
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
clang-tidy-${{ matrix.toolchain.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-
100100
clang-tidy-${{ matrix.toolchain.os }}-${{ matrix.formatting }}-
101101
clang-tidy-${{ matrix.toolchain.os }}-
102-
- uses: hendrikmuhs/ccache-action@v1.2.14
102+
- uses: hendrikmuhs/ccache-action@v1.2.22
103103
if: runner.os == 'Linux'
104104
with:
105105
key: ${{ matrix.toolchain.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-${{ matrix.toolchain.compiler.type }}-${{ matrix.toolchain.lib }}-${{ matrix.build_type }}-${{ matrix.toolchain.compiler.version }}-${{ matrix.std }}
@@ -197,15 +197,13 @@ jobs:
197197
- name: Generate clang-tidy summary
198198
if: failure()
199199
shell: bash
200+
env:
201+
CONAN_SETTINGS: ${{ matrix.conan-settings }}
202+
CONAN_ARGS: ${{ matrix.conan-args }}
200203
run: |
201204
echo "## ⚠️ Clang-Tidy Issues: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY
202205
echo "" >> $GITHUB_STEP_SUMMARY
203206
echo "**Local repro** (in the provided '.devcontainer' or GitHub CodeSpaces environment):" >> $GITHUB_STEP_SUMMARY
204207
echo '```sh' >> $GITHUB_STEP_SUMMARY
205-
{
206-
echo -n "conan build . -b missing "
207-
echo -n '${{ matrix.conan-settings }}'
208-
echo -n " -c user.mp-units.build:all=True -c user.mp-units.analyze:clang-tidy=True -c tools.build:skip_test=True "
209-
echo '${{ matrix.conan-args }}'
210-
} >> $GITHUB_STEP_SUMMARY
208+
echo "conan build . -b missing ${CONAN_SETTINGS} -c user.mp-units.build:all=True -c user.mp-units.analyze:clang-tidy=True -c tools.build:skip_test=True ${CONAN_ARGS}" >> $GITHUB_STEP_SUMMARY
211209
echo '```' >> $GITHUB_STEP_SUMMARY

.github/workflows/ci-conan.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
conan-${{ matrix.toolchain.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-
103103
conan-${{ matrix.toolchain.os }}-${{ matrix.formatting }}-
104104
conan-${{ matrix.toolchain.os }}-
105-
- uses: hendrikmuhs/ccache-action@v1.2.14
105+
- uses: hendrikmuhs/ccache-action@v1.2.22
106106
if: runner.os == 'Linux'
107107
with:
108108
key: ${{ matrix.toolchain.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-${{ matrix.toolchain.compiler.type }}-${{ matrix.toolchain.lib }}-${{ matrix.build_type }}-${{ matrix.toolchain.compiler.version }}-${{ matrix.std }}
@@ -236,18 +236,17 @@ jobs:
236236
- name: Generate job summary
237237
if: failure()
238238
shell: bash
239+
env:
240+
CONAN_SETTINGS: ${{ matrix.conan-settings }}
241+
CONAN_ARGS: ${{ matrix.conan-args }}
242+
COMPILER_TYPE: ${{ matrix.toolchain.compiler.type }}
239243
run: |
240244
echo "## ❌ Build Failed: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY
241245
echo "" >> $GITHUB_STEP_SUMMARY
242246
echo "**Local repro** (in the provided '.devcontainer' or GitHub CodeSpaces environment):" >> $GITHUB_STEP_SUMMARY
243247
echo '```sh' >> $GITHUB_STEP_SUMMARY
244-
[ "${{ matrix.toolchain.compiler.type }}" != "MSVC" ] && ALL="True" || ALL="False"
245-
{
246-
echo -n "conan create . -b 'mp-units/*' -b missing "
247-
echo -n '${{ matrix.conan-settings }}'
248-
echo -n " -c user.mp-units.build:all=${ALL} "
249-
echo '${{ matrix.conan-args }}'
250-
} >> $GITHUB_STEP_SUMMARY
248+
[ "${COMPILER_TYPE}" != "MSVC" ] && ALL="True" || ALL="False"
249+
echo "conan create . -b 'mp-units/*' -b missing ${CONAN_SETTINGS} -c user.mp-units.build:all=${ALL} ${CONAN_ARGS}" >> $GITHUB_STEP_SUMMARY
251250
echo '```' >> $GITHUB_STEP_SUMMARY
252251
253252
outputs:

.github/workflows/ci-freestanding.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
freestanding-${{ matrix.toolchain.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-
100100
freestanding-${{ matrix.toolchain.os }}-${{ matrix.formatting }}-
101101
freestanding-${{ matrix.toolchain.os }}-
102-
- uses: hendrikmuhs/ccache-action@v1.2.14
102+
- uses: hendrikmuhs/ccache-action@v1.2.22
103103
if: runner.os == 'Linux'
104104
with:
105105
key: ${{ matrix.toolchain.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-${{ matrix.toolchain.compiler.type }}-${{ matrix.toolchain.lib }}-${{ matrix.build_type }}-${{ matrix.toolchain.compiler.version }}-${{ matrix.std }}
@@ -189,15 +189,13 @@ jobs:
189189
- name: Generate freestanding summary
190190
if: failure()
191191
shell: bash
192+
env:
193+
CONAN_SETTINGS: ${{ matrix.conan-settings }}
194+
CONAN_ARGS: ${{ matrix.conan-args }}
192195
run: |
193196
echo "## ❌ Freestanding Build Failed: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY
194197
echo "" >> $GITHUB_STEP_SUMMARY
195198
echo "**Local repro** (in the provided '.devcontainer' or GitHub CodeSpaces environment):" >> $GITHUB_STEP_SUMMARY
196199
echo '```sh' >> $GITHUB_STEP_SUMMARY
197-
{
198-
echo -n "conan build . -b missing "
199-
echo -n '${{ matrix.conan-settings }}'
200-
echo -n " -c user.mp-units.build:all=True "
201-
echo '${{ matrix.conan-args }}'
202-
} >> $GITHUB_STEP_SUMMARY
200+
echo "conan build . -b missing ${CONAN_SETTINGS} -c user.mp-units.build:all=True ${CONAN_ARGS}" >> $GITHUB_STEP_SUMMARY
203201
echo '```' >> $GITHUB_STEP_SUMMARY

.github/workflows/ci-sonarqube-cloud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
sonarqube-${{ matrix.config.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-
8585
sonarqube-${{ matrix.config.os }}-${{ matrix.formatting }}-
8686
sonarqube-${{ matrix.config.os }}-
87-
- uses: hendrikmuhs/ccache-action@v1.2.14
87+
- uses: hendrikmuhs/ccache-action@v1.2.22
8888
if: runner.os == 'Linux'
8989
with:
9090
key: ${{ matrix.config.os }}-${{ matrix.formatting }}-${{ matrix.contracts }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-${{ matrix.std }}

.github/workflows/ci-test-package-cmake.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ jobs:
300300
- name: Generate test package summary
301301
if: failure()
302302
shell: bash
303+
env:
304+
CONAN_SETTINGS: ${{ matrix.conan-settings }}
305+
CONAN_ARGS: ${{ matrix.conan-args }}
303306
run: |
304307
echo "## ❌ CMake Test Package Failed: ${{ matrix.config-summary-str }}" >> $GITHUB_STEP_SUMMARY
305308
echo "" >> $GITHUB_STEP_SUMMARY
@@ -308,12 +311,7 @@ jobs:
308311
BUILD_TYPE_LOWER=$(echo "${{ matrix.build_type }}" | tr '[:upper:]' '[:lower:]')
309312
echo '```sh' >> $GITHUB_STEP_SUMMARY
310313
echo "echo 'tools.cmake.cmake_layout:build_folder_vars=[\"settings.compiler\", \"settings.compiler.version\", \"settings.compiler.cppstd\"]' >> ~/.conan2/global.conf" >> $GITHUB_STEP_SUMMARY
311-
{
312-
echo -n "conan install . -b missing "
313-
echo -n '${{ matrix.conan-settings }}'
314-
echo -n " -c user.mp-units.build:all=False "
315-
echo '${{ matrix.conan-args }}'
316-
} >> $GITHUB_STEP_SUMMARY
314+
echo "conan install . -b missing ${CONAN_SETTINGS} -c user.mp-units.build:all=False ${CONAN_ARGS}" >> $GITHUB_STEP_SUMMARY
317315
echo "echo '{\"version\":4,\"include\":[\"../CMakeUserPresets.json\"]}' > src/CMakeUserPresets.json" >> $GITHUB_STEP_SUMMARY
318316
echo "echo '{\"version\":4,\"include\":[\"../CMakeUserPresets.json\"]}' > test_package/CMakeUserPresets.json" >> $GITHUB_STEP_SUMMARY
319317
echo "(cd src && source ../build/${{ matrix.conan-build-folder }}/generators/conanbuild.sh && cmake --preset conan-${{ matrix.conan-build-folder }} -DCMAKE_INSTALL_PREFIX=../out && cmake --build --preset conan-${{ matrix.conan-build-folder }}-${BUILD_TYPE_LOWER} --target install)" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)