Skip to content

Commit

Permalink
ci: Use GHA-native Linux arm64 runners (cvc5#11546)
Browse files Browse the repository at this point in the history
With this change, we can now easily build Java bindings for Linux ARM64
and include them in releases. We can also build cvc5 wheels for CPython
3.7 and PyPy 3.7 for Linux ARM64 again, as the CI no longer times out.
  • Loading branch information
daniel-larraz authored Jan 22, 2025
1 parent aa396e1 commit 5096065
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 114 deletions.
4 changes: 2 additions & 2 deletions .github/actions/store-to-latest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ runs:
delete = False
# We generate 10 packages per build:
# {Linux-x86_64, Linux-arm64, macOS-x86_64, macOS-arm64, Win64-x86_64} * {static, shared}
# and 4 JARS {Linux-x86_64, macOS-x86_64, macOS-arm64, Win64-x86_64}
if cnt >= 28: # Keep at most 2 builds
# and 5 JARS {Linux-x86_64, Linux-arm64, macOS-x86_64, macOS-arm64, Win64-x86_64}
if cnt >= 30: # Keep at most 2 builds
delete = True
if asset.name.startswith(samedayprefix):
delete = True
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,23 @@ jobs:
exclude_regress: 3-4
run_regression_args: --tester base --tester model --tester synth --tester abduct --tester dump

- name: ubuntu:production-arm64
os: ubuntu-22.04-arm
config: production --auto-download --all-bindings --editline -DBUILD_GMP=1
cache-key: production-arm64
strip-bin: strip
python-bindings: true
java-bindings: true
check-examples: true
package-name: cvc5-Linux-arm64
exclude_regress: 3-4
run_regression_args: --tester base --tester model --tester synth --tester abduct --tester dump

- name: ubuntu:production-arm64-cross
os: ubuntu-latest
config: production --auto-download --arm64
cache-key: production-arm64-cross
strip-bin: aarch64-linux-gnu-strip
package-name: cvc5-Linux-arm64

- name: macos:production
os: macos-13
Expand Down Expand Up @@ -129,6 +140,14 @@ jobs:
package-name: cvc5-Linux-x86_64
gpl-tag: -gpl

- name: ubuntu:production-arm64-gpl
os: ubuntu-22.04-arm
config: production --auto-download --editline --gpl --cln --glpk --cocoa -DBUILD_GMP=1 -DBUILD_CLN=1
cache-key: production-arm64-gpl
strip-bin: strip
package-name: cvc5-Linux-arm64
gpl-tag: -gpl

- name: macos:production-gpl
os: macos-13
config: production --auto-download --editline --gpl --cln --glpk --cocoa -DBUILD_GMP=1 -DBUILD_CLN=1
Expand All @@ -151,6 +170,9 @@ jobs:
- has-tag: false
build:
name: ubuntu:production-gpl
- has-tag: false
build:
name: ubuntu:production-arm64-gpl
- has-tag: false
build:
name: macos:production-gpl
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/gpl-linux-arm64.yml

This file was deleted.

15 changes: 2 additions & 13 deletions .github/workflows/package_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ jobs:
arch: x86_64
shell: bash
- name: manylinux-aarch64
os: ubuntu-latest
os: ubuntu-24.04-arm
arch: aarch64
shell: bash
cibw_skip: "cp37-* pp37-*"
- name: macos-x86_64
os: macos-13
macos-target: 10.13
Expand Down Expand Up @@ -61,15 +60,6 @@ jobs:
python3 -m venv ~/.venv
echo "$HOME/.venv/bin" >> $GITHUB_PATH
# cibuildwheel only supports arm64 Linux wheels through emulation.
# It works fine, but it is slow. Cross-compilation is not supported yet,
# see: https://github.com/pypa/cibuildwheel/issues/598
- name: Set up QEMU for arm64 Linux builds
if: runner.os == 'Linux' && matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: "linux/arm64"

- uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
Expand Down Expand Up @@ -110,7 +100,7 @@ jobs:
with:
package-dir: ./build/src/api/python/
env:
CIBW_SKIP: "cp36-* pp*-win* *-win32 *-manylinux_i686 *-musllinux_* ${{ matrix.cibw_skip }}"
CIBW_SKIP: "cp36-* pp*-win* *-win32 *-manylinux_i686 *-musllinux_*"
CIBW_ARCHS_LINUX: "${{ matrix.arch }}"
CIBW_BEFORE_ALL_LINUX: bash ./contrib/cibw/before_all_linux.sh ${{ matrix.gpl }}
CIBW_BEFORE_ALL_MACOS: bash ./contrib/cibw/before_all_macos.sh ${{ matrix.gpl }}
Expand All @@ -125,7 +115,6 @@ jobs:
DYLD_LIBRARY_PATH="$(pwd)/install/lib:$DYLD_LIBRARY_PATH"
MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos-target }}
CIBW_TEST_COMMAND: python {project}/examples/api/python/quickstart.py
CIBW_TEST_SKIP: "*-*linux_aarch64"

# - uses: actions/upload-artifact@v4
# with:
Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,12 @@ if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,100000000")
endif ()

# Changing the default linker on MSYS prevents the build system from
# using the GMP system library if available
if (NOT ("${CMAKE_GENERATOR}" STREQUAL "MSYS Makefiles") AND NOT USE_DEFAULT_LINKER)
# Keep the default linker on MSYS, as switching it prevents the build system from
# using the GMP system library if available. For Linux ARM64, the default linker is
# also required due to a bug in the gold linker specific to ARM64 architectures.
if (NOT ("${CMAKE_GENERATOR}" STREQUAL "MSYS Makefiles") AND
NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND
NOT USE_DEFAULT_LINKER)
#-----------------------------------------------------------------------------#
# Use ld.mold if available, otherwise use ld.gold if available

Expand Down
32 changes: 0 additions & 32 deletions contrib/arm64-gpl.Dockerfile

This file was deleted.

0 comments on commit 5096065

Please sign in to comment.