Skip to content

Commit a5cd311

Browse files
authored
Update CI (#53)
Modernize the CI config.
1 parent 3130a1d commit a5cd311

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v2
3030

31-
- name: Install Visual C++ for Python 2.7 and SWIG
31+
- name: Install SWIG
3232
if: runner.os == 'Windows'
3333
run: choco install swig -f -y
3434

35+
- name: Set up QEMU
36+
if: runner.os == 'Linux'
37+
uses: docker/setup-qemu-action@v1
38+
with:
39+
platforms: all
40+
3541
- name: Get versions
3642
id: version
3743
run: |
@@ -44,12 +50,15 @@ jobs:
4450
env:
4551
NEW_GLPK_VERSION: ${{ steps.version.outputs.glpk_version }}
4652
GLPK_HEADER_PATH: glpk-${{ steps.version.outputs.glpk_version }}/src
53+
CIBW_ENVIRONMENT_LINUX: GLPK_HEADER_PATH=/include
4754
# install swig before build in each python environment
4855
# each job runs a python environment so this is equivalent to CIBW_BEFORE_ALL
4956
CIBW_BEFORE_BUILD_LINUX: source {project}/config.sh && pre_build
5057
CIBW_BEFORE_BUILD_MACOS: source {project}/config.sh && IS_OSX=true pre_build
5158
CIBW_BEFORE_BUILD_WINDOWS: rm -rf glpk_build && python scripts/build_glpk.py
52-
CIBW_SKIP: pp*-win*
59+
CIBW_ARCHS_MACOS: "x86_64" # GLPK will not compile on silicon
60+
CIBW_ARCHS_LINUX: "auto"
61+
CIBW_SKIP: pp*-win* *-musllinux*
5362
# install before tests
5463
CIBW_TEST_COMMAND: cp {project}/test_swiglpk.py . && python test_swiglpk.py
5564

config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ function pre_build {
3232
&& make \
3333
&& make install) || cat "glpk-$NEW_GLPK_VERSION/config.log"
3434
echo "Installed to $BUILD_PREFIX"
35+
ls -ls /include
36+
ls -ls .
3537
}

0 commit comments

Comments
 (0)