Skip to content

Commit

Permalink
Add 32-bit build to GitHub CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
crisluengo committed Jun 24, 2024
1 parent 2860fd2 commit 1feba16
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- os: ubuntu-latest
n_cores: 4
wheel_location: pydip/staging/dist
- os: ubuntu-latest # cross-compile 32-bit
n_cores: 4
wheel_location: pydip/staging/dist
dip_cmake_opts: -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" -DDIP_BUILD_DIPVIEWER=Off -DDIP_BUILD_JAVAIO=Off -DDIP_BUILD_PYDIP=Off
# currently only building DIPlib, as we can't install 32-bit Python, GLUT, etc.
cross_compile: true
- os: macos-latest
n_cores: 3
dip_cmake_opts: -DCMAKE_CXX_FLAGS="-I/opt/homebrew/opt/libomp/include -L/opt/homebrew/opt/libomp/lib"
Expand Down Expand Up @@ -73,6 +78,11 @@ jobs:
fi
shell: bash

- name: Install cross-compiler
if: matrix.cross_compile
run: |
sudo apt-get install gcc-multilib g++-multilib
- name: Configure
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
Expand All @@ -91,10 +101,12 @@ jobs:

- name: Package
# Create the Python distribution wheel
if: ! matrix.cross_compile
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target bdist_wheel

- name: Archive
# Store the Python distribution wheel
if: ! matrix.cross_compile
uses: actions/upload-artifact@v4
with:
name: Python-wheel-${{matrix.os}}
Expand Down

0 comments on commit 1feba16

Please sign in to comment.