11name : " Install optimizers on linux"
22
33inputs :
4- GUROBI_WLS :
4+ GUROBI_WLS :
55 description : " ..."
6- required : true
6+ required : false
7+ default : ' '
78 COPT_CLIENT_INI :
89 description : " ..."
9- required : true
10+ required : false
11+ default : ' '
1012 MOSEK_LICENSE :
1113 description : " ..."
12- required : true
14+ required : false
15+ default : ' '
1316 GITHUB_TOKEN :
1417 description : " ..."
1518 required : true
6366 curl -L -o ~/installers/idaes-solvers.tar.gz https://github.com/IDAES/idaes-ext/releases/download/3.4.2/idaes-solvers-ubuntu2204-aarch64.tar.gz
6467
6568 - name : Setup Gurobi Installation Home
66- if : ${{ inputs.ARCH == 'X64' }}
69+ if : ${{ ( inputs.ARCH == 'X64') && (inputs.GUROBI_WLS != '') }}
6770 shell : bash
6871 run : |
6972 tar xfz ~/installers/gurobi.tar.gz -C ~/
7275 export GUROBI_HOME="${HOME}/gurobi1300/linux64"
7376 echo "GUROBI_HOME=${GUROBI_HOME}" >> $GITHUB_ENV
7477 - name : Setup Gurobi Installation Home
75- if : ${{ inputs.ARCH == 'ARM64' }}
78+ if : ${{ ( inputs.ARCH == 'ARM64') && (inputs.GUROBI_WLS != '') }}
7679 shell : bash
7780 run : |
7881 tar xfz ~/installers/gurobi.tar.gz -C ~/
8184 export GUROBI_HOME="${HOME}/gurobi1300/armlinux64"
8285 echo "GUROBI_HOME=${GUROBI_HOME}" >> $GITHUB_ENV
8386 - name : Setup Gurobi Installation
87+ if : ${{ inputs.GUROBI_WLS != '' }}
8488 shell : bash
8589 env :
8690 GUROBI_WLS : ${{ inputs.GUROBI_WLS }}
9397 echo "$GUROBI_WLS" > ~/gurobi.lic
9498 echo "GRB_LICENSE_FILE=${HOME}/gurobi.lic" >> $GITHUB_ENV
9599 - name : Test Gurobi
96- if : ${{ inputs.CHECK_LICENSE == 'true' }}
100+ if : ${{ ( inputs.CHECK_LICENSE == 'true') && (inputs.GUROBI_WLS != '') }}
97101 shell : bash
98102 run : |
99103 gurobi_cl
@@ -122,7 +126,7 @@ runs:
122126 copt_cmd -c "quit"
123127
124128 - name : Setup MOSEK Installation Env
125- if : ${{ inputs.ARCH == 'X64' }}
129+ if : ${{ ( inputs.ARCH == 'X64') && (inputs.MOSEK_LICENSE != '') }}
126130 shell : bash
127131 run : |
128132 tar jxf ~/installers/mosek.tar.bz2 -C ~/
@@ -131,7 +135,7 @@ runs:
131135 export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/linux64x86/bin"
132136 echo "MOSEK_10_2_BINDIR=${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
133137 - name : Setup MOSEK Installation Env
134- if : ${{ inputs.ARCH == 'ARM64' }}
138+ if : ${{ ( inputs.ARCH == 'ARM64') && (inputs.MOSEK_LICENSE != '') }}
135139 shell : bash
136140 run : |
137141 tar jxf ~/installers/mosek.tar.bz2 -C ~/
@@ -140,6 +144,7 @@ runs:
140144 export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/linuxaarch64/bin"
141145 echo "MOSEK_10_2_BINDIR=${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
142146 - name : Setup MOSEK Installation
147+ if : ${{ inputs.MOSEK_LICENSE != '' }}
143148 shell : bash
144149 env :
145150 MOSEK_LICENSE : ${{ inputs.MOSEK_LICENSE }}
@@ -152,7 +157,7 @@ runs:
152157 echo "$MOSEK_LICENSE" > ~/mosek.lic
153158 echo "MOSEKLM_LICENSE_FILE=${HOME}/mosek.lic" >> $GITHUB_ENV
154159 - name : Test MOSEK
155- if : ${{ inputs.CHECK_LICENSE == 'true' }}
160+ if : ${{ ( inputs.CHECK_LICENSE == 'true') && (inputs.MOSEK_LICENSE != '') }}
156161 shell : bash
157162 run : |
158163 msktestlic
0 commit comments