Skip to content

Commit 264f0a0

Browse files
committed
use if: for Clang suppression
1 parent 02381eb commit 264f0a0

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

github-actions/ci-dist/action.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,18 @@ runs:
168168
169169
- name: setup Clang noise suppression (MacOS)
170170
shell: bash
171+
if: runner.os == 'macOS'
171172
run: |
172-
# This is needed for Clang 12 due to
173-
# <https://github.com/Perl/perl5/issues/18780>.
174-
echo "::group::setup Clang noise suppression (MacOS)"
175-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
176-
PATCH_EUMM_DIR=$HOME/build_aux
177-
[ -d $PATCH_EUMM_DIR ] || mkdir $PATCH_EUMM_DIR
178-
if [ ! -f $PATCH_EUMM_DIR/clang12_no_warnings.pm ]; then
179-
echo 'package clang12_no_warnings; use ExtUtils::MakeMaker::Config; $Config{ccflags} = join " ", $Config{ccflags}, "-Wno-compound-token-split-by-macro"; 1;' > $PATCH_EUMM_DIR/clang12_no_warnings.pm
180-
echo "PERL5OPT=${PERL5OPT:+${PERL5OPT} }-I$PATCH_EUMM_DIR -Mclang12_no_warnings" >> $GITHUB_ENV
181-
fi
182-
fi
183-
echo "::endgroup::"
173+
# This is needed for Clang 12 due to
174+
# <https://github.com/Perl/perl5/issues/18780>.
175+
echo "::group::setup Clang noise suppression (MacOS)"
176+
PATCH_EUMM_DIR=$HOME/build_aux
177+
[ -d $PATCH_EUMM_DIR ] || mkdir $PATCH_EUMM_DIR
178+
if [ ! -f $PATCH_EUMM_DIR/clang12_no_warnings.pm ]; then
179+
echo 'package clang12_no_warnings; use ExtUtils::MakeMaker::Config; $Config{ccflags} = join " ", $Config{ccflags}, "-Wno-compound-token-split-by-macro"; 1;' > $PATCH_EUMM_DIR/clang12_no_warnings.pm
180+
echo "PERL5OPT=${PERL5OPT:+${PERL5OPT} }-I$PATCH_EUMM_DIR -Mclang12_no_warnings" >> $GITHUB_ENV
181+
fi
182+
echo "::endgroup::"
184183
# Shared step for setting up graphical display.
185184
- name: Set up graphical display
186185
shell: bash

0 commit comments

Comments
 (0)