Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 44 additions & 69 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
python-version: 3.12
enable-cache: true
python-version: "3.12"
# NOTE: `--all-groups` mirrors the previous behavior of installing the full
# `requirements-*.txt` everywhere. Trim per-job (e.g. `--only-group linters
# --only-group dev` for `lint`) once we're confident the migration is stable.
- 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.12-Linux.txt
python -m pip install -e .
run: uv sync --frozen --all-groups
- name: Lint
run: |
source env/bin/activate
./bin/lint-check.sh || (echo "Lint fix results:" && ./bin/lint-fix.sh && git diff && false)
run: uv run ./bin/lint-check.sh || (echo "Lint fix results:" && uv run ./bin/lint-fix.sh && git diff && false)

build-and-test-linux-base:
runs-on: ${{ matrix.os }}
Expand All @@ -45,22 +41,16 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libegl-dev -y
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- 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-${{ matrix.python-version }}-${{ runner.os }}.txt
python -m pip install -e .
run: uv sync --frozen --all-groups
- name: Test
run: |
source env/bin/activate
coverage run -m pytest tests
coveralls --service=github
uv run --no-sync coverage run -m pytest tests
uv run --no-sync coveralls --service=github

build-and-test-windows-cli:
runs-on: windows-latest
Expand All @@ -70,16 +60,14 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
python-version: "3.11"
- name: Install dependencies and run tests
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.11-Windows.txt
python -m pip install -e .
python -m pytest tests
uv sync --frozen --all-groups
uv run --no-sync pytest tests

build-and-test-linux-gui:
runs-on: ${{ matrix.os }}
Expand All @@ -99,33 +87,28 @@ jobs:
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@v5
- uses: astral-sh/setup-uv@v3
with:
python-version: 3.9
enable-cache: true
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 .
run: uv sync --frozen --all-groups
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
uv run --no-sync python gui/build.py bundle
ls -alh gui/mozregression-gui.tar.gz
- name: Test
run: |
source env/bin/activate
coverage run -m pytest -v gui/tests
coveralls --service=github
uv run --no-sync coverage run -m pytest -v gui/tests
uv run --no-sync coveralls --service=github

build-and-test-mac-gui:
runs-on: macos-15
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
# We need the official `python.org` Python because the GitHub Actions
# builds only support newer macOS versions, and because the `python.org`
# build is `universal2` (required for PyInstaller's `target_arch=universal2`).
# The deployment target is picked up by the Python build tools automatically.
PYTHON_VERSION: 3.12.4
MACOSX_DEPLOYMENT_TARGET: 10.13
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -135,28 +118,23 @@ jobs:
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macos11.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.12 -m venv env
source env/bin/activate
which python
python --version
run: sudo installer -pkg python.pkg -target /
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install dependencies
run: |
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.12-macOS.txt
python -m pip install -e .
# Point `uv` at the `python.org` interpreter so the resulting `.venv`
# is `universal2` for PyInstaller bundling.
run: uv sync --frozen --all-groups --python /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
uv run --no-sync python gui/build.py bundle
ls -alh gui/mozregression-gui-app-bundle.tar.gz
- name: Test
run: |
source env/bin/activate
coverage run -m pytest -v gui/tests
coveralls --service=github
uv run --no-sync coverage run -m pytest -v gui/tests
uv run --no-sync coveralls --service=github

build-and-test-windows-gui:
runs-on: windows-latest
env:
Expand All @@ -165,16 +143,13 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
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 .
run: uv sync --frozen --all-groups
- name: Build and test
run: |
python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
python gui\build.py test
uv run --no-sync python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
uv run --no-sync python gui\build.py test
85 changes: 0 additions & 85 deletions .github/workflows/compile-requirements.yml

This file was deleted.

61 changes: 22 additions & 39 deletions .github/workflows/deploy-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,15 @@ jobs:
run: |
sudo apt-get update
sudo apt install libxcb-xinerama0 libxcb-cursor0 libegl-dev qt6-qpa-plugins -y
- name: Set up Python
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
python-version: "3.10"
- 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.10-Linux.txt
python -m pip install -e .
run: uv sync --frozen --all-groups
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
uv run --no-sync python gui/build.py bundle
mv gui/mozregression-gui.tar.gz gui/mozregression-gui-${{ matrix.os }}.tar.gz
ls -alh gui/mozregression-gui-${{ matrix.os }}.tar.gz
- name: Upload
Expand All @@ -50,8 +44,10 @@ jobs:
build-and-publish-mac-gui:
runs-on: macos-15
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
# We need the official `python.org` Python because the GitHub Actions
# builds only support newer macOS versions, and because the `python.org`
# build is `universal2` (required for PyInstaller's `target_arch=universal2`).
# The deployment target is picked up by the Python build tools automatically.
PYTHON_VERSION: 3.12.4
MACOSX_DEPLOYMENT_TARGET: 10.13
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -61,22 +57,15 @@ jobs:
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macos11.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.12 -m venv env
source env/bin/activate
which python
python --version
run: sudo installer -pkg python.pkg -target /
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install dependencies
run: |
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.12-macOS.txt
python -m pip install -e .
run: uv sync --frozen --all-groups --python /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
uv run --no-sync python gui/build.py bundle
ls -alh gui/mozregression-gui-app-bundle.tar.gz
- name: Upload
uses: actions/upload-release-asset@v1
Expand All @@ -86,9 +75,7 @@ jobs:
asset_name: mozregression-gui-app-bundle.tar.gz
asset_content_type: application/octet-stream
- name: Print signing manifest
run: |
source env/bin/activate
./bin/adhoc-sign.py --os macOS ${{ github.event.release.tag_name }}
run: uv run --no-sync ./bin/adhoc-sign.py --os macOS ${{ github.event.release.tag_name }}

build-and-publish-windows-gui:
runs-on: windows-2022
Expand All @@ -98,19 +85,16 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
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 .
run: uv sync --frozen --all-groups
- name: Build and test
run: |
python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
python gui\build.py test
uv run --no-sync python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
uv run --no-sync python gui\build.py test
- name: Upload
uses: actions/upload-release-asset@v1
with:
Expand All @@ -119,7 +103,6 @@ jobs:
asset_name: mozregression-gui-unsigned.exe
asset_content_type: application/octet-stream
- name: Print signing manifest
run: |
python ./bin/adhoc-sign.py --os windows ${{ github.event.release.tag_name }}
run: uv run --no-sync python ./bin/adhoc-sign.py --os windows ${{ github.event.release.tag_name }}
- name: Test binary for viruses
run: ./bin/virustotal-scan.py ${{ secrets.VIRUSTOTAL_API_KEY }}
run: uv run --no-sync ./bin/virustotal-scan.py ${{ secrets.VIRUSTOTAL_API_KEY }}
Loading
Loading