Skip to content

Commit

Permalink
Powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergAtGithub committed Jun 9, 2024
1 parent 107c9e8 commit 35cb227
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/vectorization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
id: check
shell: bash
run: |
FILESET=${{ toJson(matrix.files) }}
FILESET_MATRIX=${{ toJson(matrix.fileset_matrix) }}
for FILESET in $(echo "$FILESET_MATRIX" | jq -r '.[]'); do
if [[ "${{ runner.os }}" == "Windows" ]]; then
OUTPUT=$(pwsh -c "& '${{ matrix.config.compiler }}' '${{ matrix.config.flags }}' '$FILESET'")
echo "result=$OUTPUT" >> $GITHUB_ENV
else
OUTPUT=$("${{ matrix.config.compiler }}" "${{ matrix.config.flags }}" "$FILESET")
echo "result=$OUTPUT" >> $GITHUB_ENV
fi
if [[ "${{ runner.os }}" == "Windows" ]]; then
shell: pwsh
run: |
if ("${{ matrix.config.compiler }}" -eq "gcc") {
$OUTPUT = & "${{ matrix.config.compiler }}" "${{ matrix.config.flags }}" "$FILESET"
echo "result=$OUTPUT" >> $env:GITHUB_ENV
}
else
OUTPUT=$("${{ matrix.config.compiler }}" "${{ matrix.config.flags }}" "$FILESET")
echo "result=$OUTPUT" >> $GITHUB_ENV
fi
done
- name: Print vectorization results
Expand Down

0 comments on commit 35cb227

Please sign in to comment.