Skip to content

Commit

Permalink
ci: test clang15
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Sep 23, 2023
1 parent 337ec88 commit 7adc484
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/mac-cmake-clang15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: mac-13 CMake clang15

on:
workflow_dispatch:
push:
branches: [ develop ]

jobs:
build:
strategy:
matrix:
name: ["macOS Latest Clang"]
include:
- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-13
build_type: "Release"
cpp: OFF
fortran: ON
java: ON
ts: OFF
hl: ON
parallel: ON
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"

name: ${{ matrix.name }}
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip-ci')"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Dependencies (macOS)
run: brew install ninja mpich

- name: Install gfortran
uses: awvwgk/setup-fortran@v1

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v4

- name: Configure
if: matrix.generator != 'autogen'
run: |
export CC=$(brew --prefix llvm@15)/bin/clang
echo $CC
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DMPIEXEC_MAX_NUMPROCS:STRING=2 $GITHUB_WORKSPACE
shell: bash

- name: Build
run: cmake --build . --config ${{ matrix.build_type }}
working-directory: ${{ runner.workspace }}/build

- name: Test
run: ctest --build . -C ${{ matrix.build_type }} -V
working-directory: ${{ runner.workspace }}/build

- name: Upload
uses: actions/upload-artifact@v2
with:
name: my-artifact
path: ${{ runner.workspace }}/build/Testing/Temporary/CTestCostData.txt

0 comments on commit 7adc484

Please sign in to comment.