Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add Cirrus CI config for aarch64 build tests #168

Merged
merged 3 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
task:
only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BRANCH == 'develop' || $CIRRUS_TAG != '' || $CIRRUS_PR != ''
env:
CIRRUS_CLONE_SUBMODULES: true

matrix:
- name: Test build

# Default is 2 CPUs and 4 GB of memory
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These jobs just take a lot of memory

lots-of-memory

arm_container:
cpu: 4
memory: 6G
matrix:
- image: python:3.7
- image: python:3.11

install_build_dependencies_script: |
matthewfeickert marked this conversation as resolved.
Show resolved Hide resolved
apt-get update
apt-get -qq -y install --no-install-recommends \
gcc \
g++ \
libboost-dev \
libmpfr-dev \
libgmp-dev \
swig \
autoconf \
libtool \
patch \
automake

create_venv_script: |
python -m venv ../venv

install_script: |
. ../venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install --verbose .
python -m pip list

pytest_script: |
. ../venv/bin/activate
python -m pip install --upgrade pytest
python -m pip list
pytest -vv -rs -Wd
47 changes: 1 addition & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,51 +63,6 @@ jobs:
- name: Test package
run: python -m pytest -vv -rs -Wd

checks_alt:
name: Check Python ${{ matrix.python-version }}, ${{ matrix.arch }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.11"]
runs-on: [ubuntu-latest]
arch: [aarch64]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: uraimo/run-on-arch-action@v2.5.0
name: Install and test in image
with:
# workaround for https://github.com/uraimo/run-on-arch-action/issues/55
env: |
GITHUB_WORKFLOW: ${{ github.workflow }}-python${{ matrix.python-version }}
arch: ${{ matrix.arch }}
distro: ubuntu_latest
# Not required, but speeds up builds
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/fastjet" --platform linux/arm64 --workdir /fastjet
install: |
uname -m
apt-get update
apt-get -y install --no-install-recommends ca-certificates gnupg2 build-essential libboost-dev libmpfr-dev swig patch automake autoconf libtool
echo 'deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main' >> /etc/apt/sources.list
echo 'deb-src https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main' >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776
apt-get update
apt-get -y install --no-install-recommends python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-distutils python${{ matrix.python-version }}-venv
python${{ matrix.python-version }} -m venv /venv
run: |
uname -m
echo "PATH: ${PATH}"
echo "PWD: ${PWD}"
. /venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install '.[test]' -v
pytest -vv -rs -Wd

test_wheels:
name: "Wheel: ${{ matrix.python }}, ${{ matrix.arch }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -146,7 +101,7 @@ jobs:
path: wheelhouse/*.whl

pass:
needs: [pre-commit, checks, checks_alt, test_wheels]
needs: [pre-commit, checks, test_wheels]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ graft fastjet-contrib
graft pybind11
global-exclude .git .gitmodules
include LICENSE README.md pyproject.toml setup.py setup.cfg patch_fastjet_i.txt patch_clustersequence.txt
exclude .cirrus.yml
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<img src="https://raw.githubusercontent.com/scikit-hep/fastjet/main/docs/logo.svg">

[![Actions Status][actions-badge]][actions-link]
[![cirrus-ci Status][cirrus-ci-badge]][cirrus-ci-link]
[![PyPI version][pypi-version]][pypi-link]
[![Conda-Forge][conda-badge]][conda-link]

Expand All @@ -13,6 +14,8 @@

[actions-badge]: https://github.com/scikit-hep/fastjet/workflows/CI/badge.svg
[actions-link]: https://github.com/scikit-hep/fastjet/actions
[cirrus-ci-badge]: https://api.cirrus-ci.com/github/scikit-hep/fastjet.svg?branch=main
[cirrus-ci-link]: https://cirrus-ci.com/github/scikit-hep/fastjet
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/fastjet
[conda-link]: https://github.com/conda-forge/fastjet-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
Expand Down