Skip to content

Commit fe80b75

Browse files
Create aarch64.yml
1 parent 3310feb commit fe80b75

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/aarch64.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CMake on ARM64
2+
3+
on:
4+
push:
5+
branches: [ main, adaptiveDt ]
6+
paths-ignore: '**/.md'
7+
pull_request:
8+
branches: [ main ]
9+
paths-ignore: '**/.md'
10+
11+
jobs:
12+
build-arm64:
13+
runs-on: ubuntu-24.04-arm64 # GitHub ARM runner
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
build_type: [Release]
18+
c_compiler: [gcc, clang]
19+
include:
20+
- c_compiler: gcc
21+
cpp_compiler: g++
22+
- c_compiler: clang
23+
cpp_compiler: clang++
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
# ------------------------
29+
# Install dependencies
30+
# ------------------------
31+
- name: Install OpenMP + HDF5 (ARM64 Ubuntu)
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y libomp-dev libhdf5-dev
35+
36+
# ------------------------
37+
# Set build directory
38+
# ------------------------
39+
- name: Set reusable strings
40+
id: strings
41+
run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
42+
43+
# ------------------------
44+
# Configure CMake
45+
# ------------------------
46+
- name: Configure CMake
47+
run: >
48+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
49+
-S ${{ github.workspace }}
50+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
51+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
52+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
53+
54+
# ------------------------
55+
# Build
56+
# ------------------------
57+
- name: Build
58+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
59+
60+
# ------------------------
61+
# Test
62+
# ------------------------
63+
- name: Test
64+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
65+
run: ctest --output-on-failure --build-config ${{ matrix.build_type }}
66+
67+
# ------------------------
68+
# Upload artifacts
69+
# ------------------------
70+
- name: Upload binaries
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: next-arm64-${{ matrix.c_compiler }}
74+
path: ${{ github.workspace }}/next*

0 commit comments

Comments
 (0)