@@ -49,16 +49,24 @@ jobs:
49
49
shared_library : ${{ fromJSON(inputs.shared_lib)}}
50
50
os : ${{ fromJSON(inputs.os)}}
51
51
build_type : ${{ fromJSON(inputs.build_type)}}
52
- include :
53
- - os : ' Ubuntu'
54
- compiler : {c: gcc, cxx: g++}
55
- number_of_processors : ' $(nproc)'
56
- - os : ' Windows'
57
- compiler : {c: cl, cxx: cl}
58
- number_of_processors : ' $Env:NUMBER_OF_PROCESSORS'
59
52
60
53
runs-on : ["DSS-${{inputs.runner}}", "DSS-${{matrix.os}}"]
61
54
steps :
55
+ # Set number of processes and compiler based on OS
56
+ - name : " [Win] Establish build params"
57
+ if : ${{ matrix.os == 'Windows' }}
58
+ run : |
59
+ echo "C_COMPILER=cl" >> $GITHUB_ENV
60
+ echo "CXX_COMPILER=cl" >> $GITHUB_ENV
61
+ echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $GITHUB_ENV
62
+
63
+ - name : " [Lin] Establish build params"
64
+ if : ${{ matrix.os == 'Ubuntu' }}
65
+ run : |
66
+ echo "C_COMPILER=gcc" >> $GITHUB_ENV
67
+ echo "CXX_COMPILER=g++" >> $GITHUB_ENV
68
+ echo "PROCS=$(nproc)" >> $GITHUB_ENV
69
+
62
70
- name : Checkout
63
71
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
64
72
with :
89
97
-B ${{env.BUILD_DIR}}
90
98
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
91
99
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
92
- -DCMAKE_C_COMPILER=${{matrix.compiler.c }}
93
- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx }}
100
+ -DCMAKE_C_COMPILER=${{env.C_COMPILER }}
101
+ -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER }}
94
102
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
95
103
-DUMF_BUILD_BENCHMARKS=ON
96
104
-DUMF_BUILD_BENCHMARKS_MT=ON
@@ -107,7 +115,7 @@ jobs:
107
115
${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }}
108
116
109
117
- name : Build UMF
110
- run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors }}
118
+ run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{env.PROCS }}
111
119
112
120
- name : Run tests
113
121
working-directory : ${{env.BUILD_DIR}}
0 commit comments