fix: target macOS 14 for swift helper #211
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 | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| name: test on ${{ matrix.os }} (py-${{ matrix.python_version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python_version: [3.9] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Create virtualenv | |
| shell: bash | |
| run: | | |
| python -m venv venv | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| # we need poetry==1.3.2 | |
| # due to: https://github.com/python-poetry/poetry/issues/7611 | |
| # seen in: https://github.com/ActivityWatch/aw-watcher-window/actions/runs/5891369412/job/15978283144 | |
| pip install poetry==1.3.2 | |
| source venv/bin/activate || source venv/Scripts/activate | |
| if [ "${{ runner.os }}" = "macOS" ]; then | |
| MACOSX_DEPLOYMENT_TARGET=14.0 make build | |
| else | |
| make build | |
| fi | |
| - name: Check macOS deployment target | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| otool -l aw_watcher_window/aw-watcher-window-macos | grep -A4 'LC_BUILD_VERSION' | grep 'minos 14.0' | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| source venv/bin/activate || source venv/Scripts/activate | |
| make test | |
| - name: Package | |
| shell: bash | |
| run: | | |
| source venv/bin/activate || source venv/Scripts/activate | |
| if [ "${{ runner.os }}" = "macOS" ]; then | |
| MACOSX_DEPLOYMENT_TARGET=14.0 make package | |
| else | |
| make package | |
| fi | |
| - name: Test package | |
| shell: bash | |
| run: | | |
| dist/aw-watcher-window/aw-watcher-window --help | |
| - name: Upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aw-watcher-window-${{ runner.os }}-py${{ matrix.python_version }} | |
| path: dist/aw-watcher-window | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.9 | |
| - name: Create virtualenv | |
| shell: bash | |
| run: | | |
| python -m venv venv | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| pip install poetry | |
| source venv/bin/activate || source venv/Scripts/activate | |
| make build | |
| - name: Typecheck | |
| shell: bash | |
| run: | | |
| source venv/bin/activate || source venv/Scripts/activate | |
| make typecheck |