Skip to content

Create aarch64.yml

Create aarch64.yml #1

Workflow file for this run

name: CMake on ARM64
on:
push:
branches: [ main, adaptiveDt ]
paths-ignore: '**/.md'
pull_request:
branches: [ main ]
paths-ignore: '**/.md'
jobs:
build-arm64:
runs-on: ubuntu-24.04-arm64 # GitHub ARM runner
strategy:
fail-fast: false
matrix:
build_type: [Release]
c_compiler: [gcc, clang]
include:
- c_compiler: gcc
cpp_compiler: g++
- c_compiler: clang
cpp_compiler: clang++
steps:
- uses: actions/checkout@v4
# ------------------------
# Install dependencies
# ------------------------
- name: Install OpenMP + HDF5 (ARM64 Ubuntu)
run: |
sudo apt-get update
sudo apt-get install -y libomp-dev libhdf5-dev
# ------------------------
# Set build directory
# ------------------------
- name: Set reusable strings
id: strings
run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
# ------------------------
# Configure CMake
# ------------------------
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-S ${{ github.workspace }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
# ------------------------
# Build
# ------------------------
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
# ------------------------
# Test
# ------------------------
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --output-on-failure --build-config ${{ matrix.build_type }}
# ------------------------
# Upload artifacts
# ------------------------
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: next-arm64-${{ matrix.c_compiler }}
path: ${{ github.workspace }}/next*