feat: add Windows support using ReadDirectoryChangesW #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ main, release/*, feature/* ] | |
| pull_request: | |
| branches: [ main, release/* ] | |
| jobs: | |
| build-mac: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: swift build | |
| - name: Run tests | |
| run: swift test | |
| build-linux: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Swift | |
| run: | | |
| wget -q https://download.swift.org/swift-5.10.1-release/ubuntu2204/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu22.04.tar.gz | |
| tar xzf swift-5.10.1-RELEASE-ubuntu22.04.tar.gz | |
| echo "$PWD/swift-5.10.1-RELEASE-ubuntu22.04/usr/bin" >> $GITHUB_PATH | |
| - name: Build | |
| run: swift build -v | |
| - name: Run tests | |
| run: swift test -v | |
| timeout-minutes: 10 | |
| build-windows: | |
| # Use windows-2019 which has older MSVC (pre-14.44) toolchain | |
| # MSVC 14.44+ has cyclic module dependency issue with Swift | |
| # See: https://github.com/swiftlang/swift/issues/79745 | |
| runs-on: windows-2019 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: SwiftyLab/setup-swift@latest | |
| with: | |
| swift-version: "5.9" | |
| - name: Build | |
| # Build only the library target, skip examples which have @main compatibility issues on Windows | |
| run: swift build --target FileMonitor -v | |
| - name: Run tests | |
| run: swift test -v | |
| timeout-minutes: 10 |