Skip to content

Feature/macos build#3698

Draft
xcodebuild wants to merge 15 commits into
abraunegg:masterfrom
xcodebuild:feature/macos-build
Draft

Feature/macos build#3698
xcodebuild wants to merge 15 commits into
abraunegg:masterfrom
xcodebuild:feature/macos-build

Conversation

@xcodebuild
Copy link
Copy Markdown

Add support for build from source on macOS, see #3683

@abraunegg abraunegg linked an issue Apr 28, 2026 that may be closed by this pull request
@abraunegg
Copy link
Copy Markdown
Owner

@xcodebuild

Many thanks for looking at this and developing this PR.

Just one quick comment - changing existing logging / adding additional logging for differences between inotify and what MacOS uses such as this:

image

IMHO it would be better to use:

version (OSX) {

} else {

}

Then the logging for the platform being targeted is correct.

Also, there is a LOT of work going on at the moment for smoke testing / CI testing. It would be great if you could, in the first instance, add a yaml file for MacOS build .. to ensure the build is working correctly.

Unfortunately due to how the CI Secrets work, adding a smoke test to your PR is not going to work, but I can add one for MacOS shortly thereafter.

@abraunegg
Copy link
Copy Markdown
Owner

@xcodebuild
Another item - please can you keep your changes in this PR to supporting MacOS.

These 3 commits seem to be potentially a workflow or related to a potential bug with how the internal accounting is done - id rather those fixes be attributed to a bug report, with the correct evidence, than have this added in here.

offending commits (thus far):

@abraunegg abraunegg marked this pull request as draft April 28, 2026 05:46
@abraunegg abraunegg added this to the v2.5.11 milestone Apr 28, 2026
@abraunegg abraunegg added the Needs Work Needs Work label Apr 28, 2026
Comment thread src/main.d Outdated
Comment thread src/main.d Outdated
Comment thread src/main.d Outdated
Comment thread src/main.d Outdated
Comment thread src/main.d Outdated
Comment thread src/sync.d Outdated
Comment thread src/sync.d Outdated
Comment thread src/sync.d Outdated
@xcodebuild xcodebuild force-pushed the feature/macos-build branch from 56df797 to 4666978 Compare April 30, 2026 01:50
@abraunegg
Copy link
Copy Markdown
Owner

@xcodebuild

Please add a 'macOS Test Build' GitHub Action for this new platform, and example is below:

name: macOS Test Build

on:
  push:
    branches:
      - master
      - feature/**
    paths:
      - 'src/**'
      - 'ci/**'
      - '.github/workflows/macos-testbuild.yaml'
      - 'configure'
      - 'Makefile.in'
      - 'DUB.json'
      - 'dub.json'
  pull_request:
    branches:
      - master
    paths:
      - 'src/**'
      - 'ci/**'
      - '.github/workflows/macos-testbuild.yaml'
      - 'configure'
      - 'Makefile.in'
      - 'DUB.json'
      - 'dub.json'
  workflow_dispatch:

permissions:
  contents: read

jobs:
  macos-build:
    name: macOS ${{ matrix.macos }} test build
    runs-on: ${{ matrix.macos }}
    timeout-minutes: 45
    strategy:
      fail-fast: false
      matrix:
        macos:
          - macos-14
          - macos-15

    steps:
      - name: Checkout repository with full history and tags
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          fetch-tags: true
          submodules: recursive

      - name: Install build dependencies
        shell: bash
        run: |
          set -euo pipefail
          brew update
          brew install ldc pkg-config curl sqlite

      - name: Configure Homebrew build environment
        shell: bash
        run: |
          set -euo pipefail
          BREW_PREFIX="$(brew --prefix)"
          {
            echo "PATH=$BREW_PREFIX/opt/ldc/bin:$BREW_PREFIX/opt/curl/bin:$BREW_PREFIX/bin:$PATH"
            echo "PKG_CONFIG_PATH=$BREW_PREFIX/opt/curl/lib/pkgconfig:$BREW_PREFIX/opt/sqlite/lib/pkgconfig:$BREW_PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
            echo "CPPFLAGS=-I$BREW_PREFIX/opt/curl/include -I$BREW_PREFIX/opt/sqlite/include ${CPPFLAGS:-}"
            echo "LDFLAGS=-L$BREW_PREFIX/opt/curl/lib -L$BREW_PREFIX/opt/sqlite/lib ${LDFLAGS:-}"
          } >> "$GITHUB_ENV"

      - name: Show toolchain versions
        shell: bash
        run: |
          set -euo pipefail
          uname -a
          ldc2 --version
          pkg-config --modversion libcurl
          pkg-config --modversion sqlite3

      - name: Configure
        shell: bash
        run: |
          set -euo pipefail
          ./configure

      - name: Compile
        shell: bash
        run: |
          set -euo pipefail
          make clean
          make -j"$(sysctl -n hw.ncpu)"

      - name: Install
        shell: bash
        run: |
          set -euo pipefail
          sudo make install

      - name: Run version sanity check
        shell: bash
        run: |
          set -euo pipefail
          onedrive --version

Remove code that has no bug or feature request behind it
@xcodebuild xcodebuild force-pushed the feature/macos-build branch from 3e2c137 to 6419b40 Compare May 3, 2026 02:18
@xcodebuild xcodebuild force-pushed the feature/macos-build branch from 6419b40 to 8bc862d Compare May 3, 2026 02:25
@abraunegg abraunegg closed this May 6, 2026
@abraunegg abraunegg reopened this May 6, 2026
@abraunegg abraunegg modified the milestones: v2.5.11, v2.5.x May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Work Needs Work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support macOS

2 participants