Use current Bonjour records for changed device IPs #1037
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| python-version: | |
| - "3.9" | |
| - "3.12" | |
| - "3.14" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install Python dependencies | |
| run: python -m pip install -r requirements.txt | |
| - name: Compile mdns-advertiser | |
| run: cc -Wall -Wextra -Werror -o /tmp/mdns-advertiser-test build/mdns-advertiser.c | |
| - name: Compile nbns-advertiser | |
| run: cc -Wall -Wextra -Werror -o /tmp/nbns-advertiser-test build/nbns-advertiser.c | |
| - name: Run artifact tests | |
| run: python -m pytest tests/test_artifacts.py tests/test_artifact_resolver.py | |
| - name: Run full test suite | |
| run: python -m pytest | |
| swift-test: | |
| name: Swift Tests (macOS) | |
| runs-on: macos-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Show tool versions | |
| run: | | |
| xcodebuild -version | |
| swift --version | |
| - name: Run Swift tests | |
| run: swift test --package-path macos/TimeCapsuleSMB | |
| package-app: | |
| name: Package App (macOS native) | |
| runs-on: macos-latest | |
| needs: | |
| - swift-test | |
| env: | |
| HOMEBREW_NO_INSTALL_CLEANUP: "1" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Restore package cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: macos/TimeCapsuleSMB/.build/package-app | |
| key: package-app-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('macos/TimeCapsuleSMB/tools/package_app.py', 'macos/TimeCapsuleSMB/Package.swift', 'macos/TimeCapsuleSMB/Assets/AppIcon/tcs.jpg', 'pyproject.toml', 'requirements.txt', 'src/**', 'bin/**') }} | |
| restore-keys: | | |
| package-app-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Install native packaging tools | |
| run: | | |
| brew install samba | |
| brew tap hudochenkov/sshpass | |
| brew install sshpass | |
| smbclient="$(brew --prefix samba)/bin/smbclient" | |
| sshpass="$(brew --prefix sshpass)/bin/sshpass" | |
| test -x "$smbclient" | |
| test -x "$sshpass" | |
| file "$smbclient" "$sshpass" | |
| lipo -archs "$smbclient" | |
| lipo -archs "$sshpass" | |
| { | |
| echo "TCAPSULE_PACKAGE_SMBCLIENT=$smbclient" | |
| echo "TCAPSULE_PACKAGE_SSHPASS=$sshpass" | |
| } >> "$GITHUB_ENV" | |
| - name: Package and validate native app | |
| run: | | |
| python3 macos/TimeCapsuleSMB/tools/package_app.py \ | |
| --configuration release \ | |
| --arch native \ | |
| --full-validation |