Skip to content

Unit tests (macOS) #273

Unit tests (macOS)

Unit tests (macOS) #273

name: Unit tests (macOS)
# Should run at 2am Pacific time
on:
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 9 * * *"
workflow_dispatch:
jobs:
macos-unit-tests:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Update Homebrew
run: brew update
- name: Install dependencies
run: |
brew install zlib libdeflate
- name: Configure for unit tests
run: |
cmake -B build \
-DCMAKE_VERBOSE_MAKEFILE=on \
-DCMAKE_CXX_FLAGS="-I$(brew --prefix)/include" \
-DCMAKE_EXE_LINKER_FLAGS="-L$(brew --prefix)/lib" \
-DZLIB_LIBRARY=$(brew --prefix zlib)/lib/libz.a \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DUNIT_TESTS=on \
-DCMAKE_BUILD_TYPE=Build
- name: Build transferase
run: |
cmake --build build -j3
- name: Run the tests
run: |
ctest --test-dir build/lib --output-on-failure
ctest --test-dir build/cli --output-on-failure