Skip to content

Commit

Permalink
fileset_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergAtGithub committed Jun 9, 2024
1 parent 7753387 commit 107c9e8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/vectorization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
flags: "-O3 -Rpass=loop-vectorize",
}
- { os: windows-latest, compiler: cl, flags: "/O2 /Qvec-report:2" }
files:
fileset_matrix:
- ["src/util/sample.cpp", "src/util/sample.h"]
steps:
- name: "Check out repository"
Expand All @@ -47,14 +47,15 @@ jobs:
id: check
shell: bash
run: |
for FILE in "${{ matrix.files }}"; do
if [[ "${{ runner.os }}" == "Windows" ]]; then
OUTPUT=$(pwsh -c "& '${{ matrix.config.compiler }}' '${{ matrix.config.flags }}' '$FILE'")
echo "result=$OUTPUT" >> $GITHUB_ENV
else
OUTPUT=$("${{ matrix.config.compiler }}" "${{ matrix.config.flags }}" "$FILE")
echo "result=$OUTPUT" >> $GITHUB_ENV
fi
FILESET=${{ toJson(matrix.files) }}
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
done
- name: Print vectorization results
Expand Down

0 comments on commit 107c9e8

Please sign in to comment.