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 Ubuntu on ARM runner to CI #894

Open
wants to merge 3 commits into
base: dev2
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions .github/workflows/build-arch-emu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ jobs:
matrix:
# For available CPU architectures, see:
# https://github.com/marketplace/actions/setup-alpine-linux-environment
arch: [x86, aarch64, armv7, ppc64le, s390x, riscv64]
arch: [x86, armv7, ppc64le, s390x, riscv64]
include:
- arch: x86
ccache-max: 64M
extra-build-libs: ":GraphBLAS:LAGraph"
extra-check-libs: ":GraphBLAS:LAGraph"
- arch: aarch64
ccache-max: 28M
- arch: armv7
ccache-max: 25M
- arch: ppc64le
Expand Down
47 changes: 27 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,54 @@ jobs:
ubuntu:
# For available GitHub-hosted runners, see:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

name: ubuntu (${{ matrix.compiler }} ${{ matrix.cuda }} CUDA ${{ matrix.openmp }} OpenMP, ${{ matrix.link }})
name: ${{ matrix.os }} (${{ matrix.compiler }} ${{ matrix.cuda }} CUDA ${{ matrix.openmp }} OpenMP, ${{ matrix.link }})

strategy:
# Allow other runners in the matrix to continue if some fail
fail-fast: false

matrix:
os: [ubuntu-latest]
compiler: [gcc]
cuda: [with]
openmp: [with]
link: [both]
include:
- compiler: gcc
- os: ubuntu-latest
compiler: gcc
cuda: with
openmp: with
link: both
- compiler: gcc
- os: ubuntu-latest
compiler: gcc
cuda: without
openmp: with
link: both
- compiler: clang
cuda: with
openmp: with
link: both
- compiler: clang
cuda: without
openmp: with
link: both
- compiler: gcc
- os: ubuntu-latest
compiler: gcc
cuda: without
openmp: without
link: both
- compiler: gcc
- os: ubuntu-latest
compiler: clang
cuda: with
openmp: with
link: both
- os: ubuntu-latest
compiler: gcc
cuda: with
openmp: with
link: static
# "Fake" a cross-compilation to exercise that build system path
extra-cmake-flags:
-DCMAKE_SYSTEM_NAME="Linux"
- os: ubuntu-24.04-arm
compiler: gcc
cuda: without
openmp: with
link: both

env:
CC: ${{ matrix.compiler == 'gcc' && 'gcc' || 'clang' }}
Expand Down Expand Up @@ -92,7 +99,7 @@ jobs:
# used in action/cache/restore and action/cache/save steps
id: ccache-prepare
run: |
echo "key=ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ matrix.link }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
echo "key=ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ matrix.link }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT

- name: restore ccache
# setup the GitHub cache used to maintain the ccache from one job to the next
Expand All @@ -102,8 +109,8 @@ jobs:
key: ${{ steps.ccache-prepare.outputs.key }}
# Prefer caches from the same branch. Fall back to caches from the dev branch.
restore-keys: |
ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ matrix.link }}:${{ github.ref }}
ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ matrix.link }}:
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ matrix.link }}:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ matrix.link }}:

- name: create empty libraries
# This is to work around a bug in nvlink.
Expand All @@ -116,9 +123,9 @@ jobs:
ar rcsv librt.a empty.o
ar rcsv libpthread.a empty.o
# overwrite system libraries with "valid" empty libraries
sudo mv ./libdl.a /usr/lib/x86_64-linux-gnu/libdl.a
sudo mv ./librt.a /usr/lib/x86_64-linux-gnu/librt.a
sudo mv ./libpthread.a /usr/lib/x86_64-linux-gnu/libpthread.a
sudo mv ./libdl.a /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libdl.a
sudo mv ./librt.a /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/librt.a
sudo mv ./libpthread.a /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libpthread.a

- name: configure ccache
env:
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/root-cmakelists.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,40 @@ jobs:
ubuntu:
# For available GitHub-hosted runners, see:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

name: ubuntu (${{ matrix.compiler }} ${{ matrix.cuda }} CUDA, ${{ matrix.link }})
name: ${{ matrix.os }} (${{ matrix.compiler }} ${{ matrix.cuda }} CUDA, ${{ matrix.link }})

strategy:
# Allow other runners in the matrix to continue if some fail
fail-fast: false

matrix:
os: [ubuntu-latest]
compiler: [gcc]
cuda: [with]
link: [both]
include:
- compiler: gcc
- os: ubuntu-latest
compiler: gcc
cuda: with
link: both
- compiler: gcc
- os: ubuntu-latest
compiler: gcc
cuda: without
link: both
- compiler: clang
- os: ubuntu-latest
compiler: clang
cuda: with
link: both
- compiler: clang
cuda: without
link: both
- compiler: gcc
- os: ubuntu-latest
compiler: gcc
cuda: with
link: static
- os: ubuntu-24.04-arm
compiler: gcc
cuda: without
link: both

env:
CC: ${{ matrix.compiler == 'gcc' && 'gcc' || 'clang' }}
Expand Down Expand Up @@ -77,7 +83,7 @@ jobs:
# used in action/cache/restore and action/cache/save steps
id: ccache-prepare
run: |
echo "key=ccache:ubuntu:root:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
echo "key=ccache:${{ matrix.os }}:root:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT

- name: restore ccache
# setup the GitHub cache used to maintain the ccache from one job to the next
Expand All @@ -87,8 +93,8 @@ jobs:
key: ${{ steps.ccache-prepare.outputs.key }}
# Prefer caches from the same branch. Fall back to caches from the dev branch.
restore-keys: |
ccache:ubuntu:root:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}
ccache:ubuntu:root:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.link }}
ccache:${{ matrix.os }}:root:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}
ccache:${{ matrix.os }}:root:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.link }}

- name: create empty libraries
# This is to work around a bug in nvlink.
Expand All @@ -101,9 +107,9 @@ jobs:
ar rcsv librt.a empty.o
ar rcsv libpthread.a empty.o
# overwrite system libraries with "valid" empty libraries
sudo mv ./libdl.a /usr/lib/x86_64-linux-gnu/libdl.a
sudo mv ./librt.a /usr/lib/x86_64-linux-gnu/librt.a
sudo mv ./libpthread.a /usr/lib/x86_64-linux-gnu/libpthread.a
sudo mv ./libdl.a /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libdl.a
sudo mv ./librt.a /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/librt.a
sudo mv ./libpthread.a /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libpthread.a

- name: configure ccache
run: |
Expand Down
Loading