Skip to content

Commit 331c6d7

Browse files
committed
Test linux arm ci
1 parent daf829f commit 331c6d7

File tree

2 files changed

+56
-11
lines changed

2 files changed

+56
-11
lines changed

.github/actions/setup_optimizers_linux/action.yml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ inputs:
1616
CHECK_LICENSE:
1717
description: "..."
1818
required: true
19+
ARCH:
20+
description: "..."
21+
required: true
22+
type: choice
23+
default: "X64"
24+
options:
25+
- "X64"
26+
- "ARM64"
1927

2028
runs:
2129
using: "composite"
@@ -32,29 +40,51 @@ runs:
3240
cache-name: cache-installers-linux
3341
with:
3442
path: ~/installers
35-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('optimizer_version.toml') }}
43+
key: ${{ runner.os }}--${{ runner.arch }}-build-${{ env.cache-name }}-${{ hashFiles('optimizer_version.toml') }}
3644
restore-keys: |
37-
${{ runner.os }}-build-${{ env.cache-name }}-
45+
${{ runner.os }}--${{ runner.arch }}-build-${{ env.cache-name }}-
3846
39-
- if: ${{ steps.cache-installers-linux.outputs.cache-hit != 'true' }}
47+
- if: ${{ (steps.cache-installers-linux.outputs.cache-hit != 'true') && (inputs.ARCH == 'X64') }}
4048
shell: bash
41-
name: Download Installers
49+
name: Download X64 Installers
4250
run: |
4351
curl -L -o ~/installers/gurobi.tar.gz https://packages.gurobi.com/11.0/gurobi11.0.0_linux64.tar.gz
4452
curl -L -o ~/installers/copt.tar.gz https://pub.shanshu.ai/download/copt/7.2.2/linux64/CardinalOptimizer-7.2.2-lnx64.tar.gz
4553
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.2.0/mosektoolslinux64x86.tar.bz2
4654
curl -L -o ~/installers/idaes-solvers.tar.gz https://github.com/IDAES/idaes-ext/releases/download/3.4.2/idaes-solvers-ubuntu2204-x86_64.tar.gz
4755
48-
- name: Setup Gurobi Installation
56+
- if: ${{ (steps.cache-installers-linux.outputs.cache-hit != 'true') && (inputs.ARCH == 'ARM64') }}
57+
shell: bash
58+
name: Download ARM64 Installers
59+
run: |
60+
curl -L -o ~/installers/gurobi.tar.gz https://packages.gurobi.com/11.0/gurobi11.0.0_armlinux64.tar.gz
61+
curl -L -o ~/installers/copt.tar.gz https://pub.shanshu.ai/download/copt/7.2.2/linux64/CardinalOptimizer-7.2.2-aarch64_lnx.tar.gz
62+
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.2.0/mosektoolslinuxaarch64.tar.bz2
63+
curl -L -o ~/installers/idaes-solvers.tar.gz https://github.com/IDAES/idaes-ext/releases/download/3.4.2/idaes-lib-ubuntu2204-aarch64.tar.gz
64+
65+
- name: Setup Gurobi Installation Home
66+
if: ${{ inputs.ARCH == 'X64' }}
4967
shell: bash
50-
env:
51-
GUROBI_WLS: ${{ inputs.GUROBI_WLS }}
5268
run: |
5369
tar xfz ~/installers/gurobi.tar.gz -C ~/
5470
ls ~/gurobi1100/linux64
5571
# set environment variables
5672
export GUROBI_HOME="${HOME}/gurobi1100/linux64"
5773
echo "GUROBI_HOME=${GUROBI_HOME}" >> $GITHUB_ENV
74+
- name: Setup Gurobi Installation Home
75+
if: ${{ inputs.ARCH == 'ARM64' }}
76+
shell: bash
77+
run: |
78+
tar xfz ~/installers/gurobi.tar.gz -C ~/
79+
ls ~/gurobi1100/armlinux64
80+
# set environment variables
81+
export GUROBI_HOME="${HOME}/gurobi1100/armlinux64"
82+
echo "GUROBI_HOME=${GUROBI_HOME}" >> $GITHUB_ENV
83+
- name: Setup Gurobi Installation
84+
shell: bash
85+
env:
86+
GUROBI_WLS: ${{ inputs.GUROBI_WLS }}
87+
run: |
5888
echo "PATH=${PATH}:${GUROBI_HOME}/bin" >> $GITHUB_ENV
5989
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib" >> $GITHUB_ENV
6090
echo $GUROBI_HOME
@@ -91,16 +121,29 @@ runs:
91121
run: |
92122
copt_cmd -c "quit"
93123
94-
- name: Setup MOSEK Installation
124+
- name: Setup MOSEK Installation Env
125+
if: ${{ inputs.ARCH == 'X64' }}
95126
shell: bash
96-
env:
97-
MOSEK_LICENSE: ${{ inputs.MOSEK_LICENSE }}
98127
run: |
99128
tar jxf ~/installers/mosek.tar.bz2 -C ~/
100129
ls ~/mosek
101130
# set environment variables
102131
export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/linux64x86/bin"
103132
echo "MOSEK_10_2_BINDIR=${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
133+
- name: Setup MOSEK Installation Env
134+
if: ${{ inputs.ARCH == 'ARM64' }}
135+
shell: bash
136+
run: |
137+
tar jxf ~/installers/mosek.tar.bz2 -C ~/
138+
ls ~/mosek
139+
# set environment variables
140+
export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/linuxaarch64/bin"
141+
echo "MOSEK_10_2_BINDIR=${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
142+
- name: Setup MOSEK Installation
143+
shell: bash
144+
env:
145+
MOSEK_LICENSE: ${{ inputs.MOSEK_LICENSE }}
146+
run: |
104147
echo "PATH=${PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
105148
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
106149
echo $MOSEK_10_2_BINDIR

.github/workflows/linux-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010

1111
linux_build:
12-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
1313

1414
# Only allow one build at a time otherwise we can run out of licenses
1515
concurrency:
@@ -18,6 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: true
2020
matrix:
21+
os: [ubuntu-latest, ubuntu-24.04-arm64]
2122
# python-version: ["3.9", "3.10", "3.11", "3.12"]
2223
python-version: ["3.9", "3.12"]
2324

@@ -38,6 +39,7 @@ jobs:
3839
MOSEK_LICENSE: ${{ secrets.MOSEK_LICENSE }}
3940
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4041
CHECK_LICENSE: true
42+
ARCH: ${{ runner.arch }}
4143

4244
- name: Build
4345
run: |

0 commit comments

Comments
 (0)