File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 - name : Determine number of cpus on Windows
8484 if : startsWith(matrix.os, 'windows')
8585 run : echo "num_cpus=$env:NUMBER_OF_PROCESSORS" >> $env:GITHUB_ENV
86+
87+ - name : Determine number of compilation test jobs on macOS and Linux
88+ if : ${{ !startsWith(matrix.os, 'windows') }}
89+ shell : bash
90+ run : echo "num_comp_tests=$((${{env.num_cpus}} * 2))" >> $GITHUB_ENV
91+
92+ - name : Determine number of compilation test jobs on Windows
93+ if : startsWith(matrix.os, 'windows')
94+ shell : bash
95+ run : echo "num_comp_tests=1" >> $GITHUB_ENV
96+
8697 - name : Determine compiler flag
8798 if : ${{matrix.compiler}}
8899 run : echo "CXX=${{matrix.compiler}}" >> $GITHUB_ENV
@@ -97,10 +108,8 @@ jobs:
97108
98109 - name : Test
99110 working-directory : ${{github.workspace}}/build
100- run : cmake --build . --config ${BUILD_TYPE} --target test
101- ARGS=-j$((${num_cpus} * 2)) # don't pass --parallel, which would affect compilation tests,
102- # but do run twice as many compilation tests as the number of
103- # available threads
111+ run : cmake --build . --config ${{env.BUILD_TYPE}} --target test
112+ ARGS=-j${{env.num_comp_tests}} # don't pass --parallel, which would affect compilation tests
104113
105114 - name : Produce coverage reports
106115 if : contains(matrix.extra_build_flags, 'coverage')
You can’t perform that action at this time.
0 commit comments