Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS support #151

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: macOS CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
ubuntu:
name: macOS ${{ matrix.version }} (${{ matrix.compiler }})
strategy:
fail-fast: false
matrix:
compiler: [clang++]
version: [latest]

runs-on: macos-${{ matrix.version }}
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -Werror

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
brew upgrade
brew install boost boost-python3 help2man

- name: Build and check
run: make distcheck
File renamed without changes.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with csdiff. If not, see <http://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.15)
project(csdiff CXX)
enable_testing()

Expand Down
7 changes: 3 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ macro(build_pycsdiff version)
message(STATUS "Python ${version} binding enabled. "
"The pycsdiff module will be built!")

add_library(pycsdiff_py${version} SHARED pycsdiff.cc)
target_include_directories(pycsdiff_py${version} SYSTEM
PRIVATE ${Python${version}_INCLUDE_DIRS})
add_library(pycsdiff_py${version} MODULE pycsdiff.cc)
target_link_libraries(pycsdiff_py${version}
PRIVATE ${Boost_PYTHON${PYTHON_VERSION_SUFFIX}_LIBRARY})
PRIVATE ${Boost_PYTHON${PYTHON_VERSION_SUFFIX}_LIBRARY}
Python${version}::Module)

# set correct name so that `python -c 'import pycsdiff' works`
set_target_properties(pycsdiff_py${version} PROPERTIES
Expand Down