Skip to content

Commit

Permalink
gui: upgrades, enhancements, and deprecations (#1092)
Browse files Browse the repository at this point in the history
- upgrade to PySide6 (bug 1782252)
- various renamed methods related to PySide6
- fix deprecated method calls
- upgrade CI images to use ubuntu 20.04 (bug 1786367)
- remove Python 3.6 support (bug 1767535)
- keep bundle intact to prevent corrupt signature (bug 1786365)
- move windows build + test to github actions (bug 1786362)
- move gui uploads to separate workflow (bug 1786363)
  • Loading branch information
zzzeid authored Aug 22, 2022
1 parent 5ccd5a8 commit 3a7156c
Show file tree
Hide file tree
Showing 53 changed files with 545 additions and 1,578 deletions.
90 changes: 37 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
name: Build
name: Build and test

on:
push:
branches:
- main
tags:
- "*"

pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand All @@ -25,8 +19,8 @@ jobs:
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
pip install -r requirements/requirements-3.9-Linux.txt
pip install -e .
python -m pip install -r requirements/requirements-3.9-Linux.txt
python -m pip install -e .
- name: Lint
run: |
source env/bin/activate
Expand All @@ -39,10 +33,14 @@ jobs:
strategy:
matrix:
os:
- ubuntu-18.04
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
- ubuntu-20.04
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo apt-get update
sudo apt-get install libegl-dev -y
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -52,16 +50,16 @@ jobs:
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
pip install -r requirements/requirements-${{ matrix.python-version }}-${{ runner.os }}.txt
pip install -e .
python -m pip install -r requirements/requirements-${{ matrix.python-version }}-${{ runner.os }}.txt
python -m pip install -e .
- name: Test
run: |
source env/bin/activate
coverage run -m pytest tests
coveralls --service=github
build-and-test-linux-gui:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
DISPLAY: ":99.0"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -70,7 +68,8 @@ jobs:
- uses: actions/checkout@v2
- name: setup
run: |
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
sudo apt-get update
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl-dev -y
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -81,8 +80,8 @@ jobs:
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
pip install -r requirements/requirements-3.9-Linux.txt
pip install -e .
python -m pip install -r requirements/requirements-3.9-Linux.txt
python -m pip install -e .
- name: Build
run: |
source env/bin/activate
Expand All @@ -93,24 +92,6 @@ jobs:
source env/bin/activate
coverage run -m pytest -v gui/tests
coveralls --service=github
- name: Get the version
if: startsWith(github.ref, 'refs/tags/')
id: get_version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Get upload URL
if: startsWith(github.ref, 'refs/tags/')
id: geturl
run: |
upload_url=$(curl -sL https://api.github.com/repos/mozilla/mozregression/releases/tags/${{ steps.get_version.outputs.version }} | jq -r '.upload_url')
echo ::set-output name=upload_url::$upload_url
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.geturl.outputs.upload_url }}
asset_path: ./gui/mozregression-gui.tar.gz
asset_name: mozregression-gui.tar.gz
asset_content_type: application/gzip
build-and-test-mac-gui:
runs-on: macos-latest
Expand Down Expand Up @@ -148,21 +129,24 @@ jobs:
source env/bin/activate
coverage run -m pytest -v gui/tests
coveralls --service=github
- name: Get the version
if: startsWith(github.ref, 'refs/tags/')
id: get_version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Get upload URL
if: startsWith(github.ref, 'refs/tags/')
id: geturl
run: |
upload_url=$(curl -sL https://api.github.com/repos/mozilla/mozregression/releases/tags/${{ steps.get_version.outputs.version }} | jq -r '.upload_url')
echo ::set-output name=upload_url::$upload_url
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
build-and-test-windows-gui:
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
upload_url: ${{ steps.geturl.outputs.upload_url }}
asset_path: ./gui/dist/mozregression-gui.dmg
asset_name: mozregression-gui.dmg
asset_content_type: application/octet-stream
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.10-Windows.txt
python -m pip install -e .
- name: Build and test
run: |
python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
python gui\build.py test
108 changes: 108 additions & 0 deletions .github/workflows/deploy-gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build and upload GUI packages

on:
release:
types: [published]

jobs:
build-and-publish-linux-gui:
runs-on: ubuntu-20.04
env:
DISPLAY: ":99.0"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo apt-get update
sudo apt install libxcb-xinerama0 libegl-dev -y
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.9-Linux.txt
python -m pip install -e .
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
ls -alh gui/mozregression-gui.tar.gz
- name: Upload
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gui/mozregression-gui.tar.gz
asset_name: mozregression-gui.tar.gz
asset_content_type: application/gzip

build-and-publish-mac-gui:
runs-on: macos-latest
env:
# We need the official Python, because the GA ones only support newer macOS versions
# The deployment target is picked up by the Python build tools automatically
PYTHON_VERSION: 3.9.1
MACOSX_DEPLOYMENT_TARGET: 10.13
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Get Python
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg -o "python.pkg"
- name: Install Python
# See: https://github.com/actions/virtual-environments/issues/1256#issuecomment-770270252
run: |
sudo installer -pkg python.pkg -target /
python3 -m venv env
source env/bin/activate
which python
python --version
- name: Install dependencies
run: |
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.9-macOS.txt
python -m pip install -e .
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
ls -alh gui/dist/mozregression-gui.dmg
- name: Upload
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gui/dist/mozregression-gui.dmg
asset_name: mozregression-gui.dmg
asset_content_type: application/octet-stream
build-and-publish-windows-gui:
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.10-Windows.txt
python -m pip install -e .
- name: Build and test
run: |
python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
python gui\build.py test
- name: Upload
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gui/wininst/mozregression-gui.exe
asset_name: mozregression-gui.exe
asset_content_type: application/octet-stream
2 changes: 1 addition & 1 deletion .github/workflows/run-compile-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
requirements_files: '["base.in dev.in gui-dev.in gui.in linters.in"]'
os: '["ubuntu-latest"]'
python: '["3.6", "3.7", "3.8", "3.9", "3.10"]'
python: '["3.7", "3.8", "3.9", "3.10"]'

call-compile-requirements-windows:
needs: call-compile-requirements-linux
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude .coveragerc .gitignore .linter-files .travis.yml CODE_OF_CONDUCT.md appveyor.yml setup.cfg
exclude .coveragerc .gitignore .linter-files .travis.yml CODE_OF_CONDUCT.md setup.cfg
recursive-exclude bin *
recursive-exclude docs *
recursive-exclude tests *
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ You can start using mozregression today:
Build status:

- Linux:
[![Linux Build Status](https://travis-ci.org/mozilla/mozregression.svg?branch=master)](https://travis-ci.org/mozilla/mozregression)
[![Coverage Status](https://img.shields.io/coveralls/mozilla/mozregression.svg)](https://coveralls.io/r/mozilla/mozregression)
- Windows: [![Windows Build status](https://ci.appveyor.com/api/projects/status/bcg7t1pt2bahggdr?svg=true)](https://ci.appveyor.com/project/wlach/mozregression/branch/master)

For more information see:

Expand Down
33 changes: 0 additions & 33 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 3a7156c

Please sign in to comment.