Skip to content

Added missed semicolon #186

Added missed semicolon

Added missed semicolon #186

Workflow file for this run

name: Linux/MacOS Build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master'}} # don't cancel jobs on master
#env:
jobs:
build:
strategy:
fail-fast: false
matrix:
build_type : [ Release, Debug ]
os : [ macos-14, ubuntu-24.04 ]
valgrind: [ true, false ]
sanitize: [ true, false ]
exclude:
- valgrind : true
sanitize : true
- build_type : Release
valgrind : true
- build_type : Release
sanitize : true
- os: macos-14
sanitize: true
- os: macos-14
valgrind: true
include:
- os: ubuntu-24.04
cc: /usr/bin/gcc-14
cxx: /usr/bin/g++-14
sanitize_flags: -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-omit-frame-pointer -fno-var-tracking
- os: macos-14
cc: clang
cxx: clang++
sanitize_flags: -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-var-tracking
name: "${{ matrix.valgrind && 'Valgrind' || matrix.sanitize && 'Sanitizers' || '' }} ${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }}"
runs-on: ${{ matrix.os }}
env:
CXX : ${{ matrix.cxx }}
CC : ${{ matrix.cc }}
DOXYGEN_VERSION : 1.9.1
CCACHE_DIR : ${{github.workspace}}/build/.ccache
CCACHE_COMPRESS : true
CCACHE_COMPRESSLEVEL : 6
BUILD_CONFIG : >
-G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_UNITY_BUILD=${{ matrix.build_type == 'Debug' || matrix.valgrind }}
-DTAPP_REFERENCE_USE_TBLIS=${{ !matrix.valgrind }}
steps:
- uses: actions/checkout@v4
- name: Get CPU Model (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
id: linux_cpu
run: echo "CPU_MODEL=$(lscpu | grep 'Model name:' | cut -f 2 -d ':' | awk '{$1=$1}1')" >> $GITHUB_OUTPUT
- name: Get CPU Model (macOS)
if: ${{ startsWith(matrix.os, 'macos') }}
id: macos_cpu
# Using sysctl command to get the brand string
run: echo "CPU_MODEL=$(sysctl -n machdep.cpu.brand_string)" >> $GITHUB_OUTPUT
- name: Display CPU Model
run: |
echo "Runner OS: ${{ runner.os }}"
if [ "${{ runner.os }}" == "Linux" ]; then
echo "Processor Model: ${{ steps.linux_cpu.outputs.CPU_MODEL }}"
elif [ "${{ runner.os }}" == "macOS" ]; then
echo "Processor Model: ${{ steps.macos_cpu.outputs.CPU_MODEL }}"
fi
shell: bash
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Install prerequisite MacOS packages
if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install ninja ccache
- name: Install prerequisites Ubuntu packages
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install ninja-build g++-14 liblapack-dev ccache valgrind
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Setup ccache cache files
uses: actions/cache@v4
with:
path: ${{github.workspace}}/build/.ccache
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.config.name }}-ccache-
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
# Pass sanitizer flags via CMAKE_{C,CXX}_FLAGS (not CFLAGS/CXXFLAGS env vars)
# to prevent them from leaking into BLIS's autotools build via the environment
run: |
cmake_args=($BUILD_CONFIG)
if [[ "${{ matrix.sanitize }}" == "true" ]]; then
cmake_args+=(
"-DCMAKE_C_FLAGS=${{ matrix.sanitize_flags }}"
"-DCMAKE_CXX_FLAGS=${{ matrix.sanitize_flags }}"
)
fi
cmake $GITHUB_WORKSPACE "${cmake_args[@]}"
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: ccache -p && ccache -z && cmake --build . && ccache -s
- name: Test
if: ${{ !matrix.valgrind }}
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest --output-on-failure
- name: Test (+ Valgrind)
if: ${{ matrix.valgrind }}
working-directory: ${{github.workspace}}/build
shell: bash
run: |
valgrind --error-exitcode=1 --leak-check=full ./tapp-reference-demo
valgrind --error-exitcode=1 --leak-check=full ./tapp-reference-driver
- name: Consume from build tree
if: ${{ !matrix.valgrind && !matrix.sanitize }}
shell: bash
run: |
cmake -S $GITHUB_WORKSPACE/test/consume -B ${{github.workspace}}/consume-build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-Dtapp_DIR=${{github.workspace}}/build
cmake --build ${{github.workspace}}/consume-build
ctest --test-dir ${{github.workspace}}/consume-build --output-on-failure
- name: Install
if: ${{ !matrix.valgrind && !matrix.sanitize }}
shell: bash
run: cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/install
- name: Consume from install tree
if: ${{ !matrix.valgrind && !matrix.sanitize }}
shell: bash
run: |
cmake -S $GITHUB_WORKSPACE/test/consume -B ${{github.workspace}}/consume-install \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_PREFIX_PATH=${{github.workspace}}/install
cmake --build ${{github.workspace}}/consume-install
ctest --test-dir ${{github.workspace}}/consume-install --output-on-failure