Skip to content

Commit

Permalink
Add github workflow to run tests in MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyWoo committed Mar 1, 2024
1 parent ab92967 commit 6ffa177
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build-and-test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build-and-test

on: # yamllint disable-line rule:truthy
push:
branches:
- master
paths-ignore:
- "**.md"
- "**/docs/**"
- "**/LICENSE"
- "**/NOTICE"
- "**/benchmark/**"
- "version.txt"
- "build.sh"
pull_request:
types:
- opened
- synchronize
- reopened
paths-ignore:
- "**.md"
- "**/docs/**"
- "**/LICENSE"
- "**/NOTICE"
- "**/benchmark/**"
- "version.txt"
- "build.sh"

workflow_dispatch:
inputs:
pr:
description: "Pull request#"
required: false

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

jobs:
build-and-test:
name: "macos clang"
runs-on: macos-13

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install tools
run: sudo brew install -y ninja ccache

- name: Generate Makefile
run: export CC=`which clang` CXX=`which clang++` && cmake -G Ninja -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
working-directory: ${{github.workspace}}/build
run: ninja -j 10

- name: Run unit Tests
working-directory: ${{github.workspace}}/build
run: ./src/unit_tests_dbms --gtest_color=yes

- name: Run integration Tests
working-directory: ${{github.workspace}}/tests/integration
run: bash ${{github.workspace}}/.github/workflows/run-integration-test.sh ${{github.workspace}}/tests/integration

0 comments on commit 6ffa177

Please sign in to comment.