From 48858cd04b4cb9699421d11cb61198f063d6847a Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Thu, 19 Oct 2023 13:58:27 +0200 Subject: [PATCH] Debug macOS screen resolution --- .github/workflows/installer.yml | 40 ++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 495b1dd..2b5c9b0 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -17,12 +17,25 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-12, windows-2022] + os: [macos-13] steps: - name: Check-out repository uses: actions/checkout@v3 + + - name: Set up screen (macOS) + if: runner.os == 'macOS' + run: | + brew install screenresolution + screenresolution list + screenresolution get + system_profiler SPDisplaysDataType | grep Resolution + screenresolution set 1920x1080x32@30 + screenresolution get + + + - name: Set up Python environment uses: actions/setup-python@v4 with: @@ -69,7 +82,6 @@ jobs: python -m pip install git+https://github.com/ikibalin/cryspy.git@beta python -m pip install git+https://github.com/easyscience/EasyApp.git@new-easy-app2 - - name: Create python resources file run: | cd ${{ env.PACKAGE_NAME }} @@ -90,11 +102,22 @@ jobs: Xvfb :0 -screen 0 1920x1080x24 -ac & echo "DISPLAY=:0" >> $GITHUB_ENV + # Method 1: + # Not working since Oct 2023. VMware is replaced by VirtualBox + # "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080 + # system_profiler SPDisplaysDataType | grep Resolution + # Method 2: + # Worked on macOS 12.6.9, but the default resolution already was 1920x1080: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6575129372/job/17861583655 + # Fails on macOS 12.7, where default resolution is 1176x885: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6576347514/job/17865526935 - name: Set up screen (macOS) if: runner.os == 'macOS' run: | - "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080 + brew install screenresolution + screenresolution list + screenresolution get system_profiler SPDisplaysDataType | grep Resolution + screenresolution set 1920x1080x32@30 + screenresolution get - name: Set up screen (Windows) if: runner.os == 'Windows' @@ -229,11 +252,18 @@ jobs: Xvfb :0 -screen 0 1920x1080x24 -ac & echo "DISPLAY=:0" >> $GITHUB_ENV + # Method 1: Not working since Oct 2023. VMware is replaced by VirtualBox + # "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080 + # system_profiler SPDisplaysDataType | grep Resolution + # Method 2 - name: Set up screen (macOS) if: runner.os == 'macOS' run: | - "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080 - system_profiler SPDisplaysDataType | grep Resolution + brew install screenresolution + screenresolution list + screenresolution get + screenresolution set 1920x1080x32@30 + screenresolution get - name: Set up screen (Windows) if: runner.os == 'Windows'