Skip to content

Commit

Permalink
GitHub build workflow for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatliar committed Sep 19, 2024
1 parent 82886df commit 478ab32
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
File renamed without changes.
37 changes: 37 additions & 0 deletions .github/workflows/build-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI with ARM build

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU for ARM
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker image for ARM
run: |
docker buildx create --use
docker buildx build --platform linux/arm64 -t my-arm-build --load -f docker/arm64.dockerfile .
# - name: Run tests on ARM Docker container
# run: |
# docker run --rm my-arm-build ./run-tests.sh
44 changes: 44 additions & 0 deletions docker/arm64.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ubuntu:latest
WORKDIR /root
RUN apt-get update
RUN apt-get upgrade -y
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y \
build-essential clang-18 cmake git libopenblas-dev libboost-exception-dev pkg-config

# Install GTest
RUN git clone https://github.com/google/googletest.git
RUN cd googletest && cmake -DCMAKE_BUILD_TYPE=Release . && make -j `nproc` install

# Install Google benchmark
RUN git clone https://github.com/google/benchmark.git
RUN cd benchmark && cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=False . && make -j `nproc` install

# Install Blaze
RUN git clone https://bitbucket.org/blaze-lib/blaze.git
RUN cd blaze && cmake -DBLAZE_BLAS_MODE=True -DBLAZE_BLAS_USE_MATRIX_MATRIX_MULTIPLICATION=False \
-DBLAZE_BLAS_USE_MATRIX_VECTOR_MULTIPLICATION=False -DBLAZE_VECTORIZATION=False -DBLAZE_SHARED_MEMORY_PARALLELIZATION=False . && make install

# Install Eigen3
RUN apt install libeigen3-dev

# Install blasfeo
RUN apt-get install -y bc
RUN git clone https://github.com/giaf/blasfeo.git
RUN cd blasfeo && git checkout cc90e146ee9089de518f57dbb736e064bd82394e
COPY docker/blasfeo/Makefile.rule blasfeo
RUN cd blasfeo && make -j `nproc` static_library && make install_static

# Install libxsmm
RUN apt install libxsmm-dev

# Build blast
COPY bench blast/bench
COPY cmake blast/cmake
COPY include blast/include
COPY test blast/test
COPY CMakeLists.txt blast
COPY Makefile blast/Makefile
ENV PKG_CONFIG_PATH=/usr/local/lib
RUN mkdir -p blast/build && cd blast/build \
&& cmake CMAKE_CXX_FLAGS "-march=native -DXSIMD_DEFAULT_ARCH='neon64'" .. \
&& make -j `nproc` VERBOSE=1

0 comments on commit 478ab32

Please sign in to comment.