Skip to content
Draft
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
14 changes: 0 additions & 14 deletions .github/actions/egg/action.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/actions/wheel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Wheel
description: Test running avocado from a universal wheel
runs:
using: composite
steps:
- name: Test running avocado from a wheel
shell: sh
run: |
python3 -m pip install --user pip setuptools wheel
python3 -m pip wheel --no-deps -w /tmp .
WHL=$(ls /tmp/avocado_framework-*-py3-none-any.whl)
DEST=/tmp/avocado-wheel
python3 -c "import zipfile, sys; zipfile.ZipFile(sys.argv[1]).extractall(sys.argv[2])" "$WHL" "$DEST"
python3 -c "import sys; sys.path.insert(0, sys.argv[1]); from avocado.core.main import main; sys.exit(main())" "$DEST" run /bin/true
49 changes: 12 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,33 +220,6 @@ jobs:
retention-days: 1
- run: echo "🥑 This job's status is ${{ job.status }}."

egg-build:
name: Build Egg for Python ${{ matrix.python-version }}
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: ['3.10', 3.11, 3.12, 3.13, 3.14]
fail-fast: false

steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools on Python >= 3.12
run: python3 -c 'import setuptools' || python3 -m pip install "setuptools<80"
- name: Build eggs
run: make -f Makefile.gh build-egg
- name: Save eggs as artifacts
uses: actions/upload-artifact@v7
with:
name: eggs-${{ matrix.python-version }}
path: ${{github.workspace}}/EGG_UPLOAD/
retention-days: 1
- run: echo "🥑 This job's status is ${{ job.status }}."

vt-integration-check:
name: Integration with most major VT plugin
runs-on: ubuntu-latest
Expand Down Expand Up @@ -414,20 +387,21 @@ jobs:
uses: actions/checkout@v7
- uses: ./.github/actions/version

podman_egg_task:
podman_wheel_task:

name: Podman Egg task
name: Podman wheel task
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v7
- name: Test running avocado from eggs under Podman spawner
- name: Test running avocado from a wheel under Podman spawner
run: |
apt update && apt -y install python3 python3-setuptools
python3 setup.py bdist_egg
mv dist/avocado_framework-*egg /tmp/avocado_framework.egg
python3 setup.py clean --all
python3 -c 'import sys; sys.path.insert(0, "/tmp/avocado_framework.egg"); from avocado.core.main import main; sys.exit(main())' run --spawner=podman --spawner-podman-image=fedora:40 --spawner-podman-avocado-egg=file:///tmp/avocado_framework.egg -- /bin/true
sudo apt-get update
sudo apt-get install -y podman python3 python3-pip python3-setuptools
python3 -m pip wheel --no-deps -w /tmp .
WHL=$(ls /tmp/avocado_framework-*-py3-none-any.whl)
python3 -m pip install --user --no-deps "$WHL"
python3 -m avocado run --spawner=podman --spawner-podman-image=fedora:40 --spawner-podman-avocado-wheel="file://${WHL}" -- /bin/true

podman_external_runner_task:

Expand All @@ -436,9 +410,10 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v7
- name: Test running avocado from released eggs under Podman spawner with 3rd party plugins
- name: Test running avocado from a wheel under Podman spawner with 3rd party plugins
run: |
apt update && apt -y install python3 python3-setuptools
sudo apt-get update
sudo apt-get install -y podman python3 python3-setuptools
python3 setup.py develop --user
cd examples/plugins/tests/magic
python3 setup.py develop --user
Expand Down
33 changes: 9 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,10 @@ jobs:
- name: Publish avocado to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

build-and-publish-eggs:
name: Build eggs and publish them
runs-on: ubuntu-22.04
publish-wheels-to-github:
name: Publish wheels to GitHub release
runs-on: ubuntu-latest
needs: release
strategy:
matrix:
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
fail-fast: false

steps:
- name: Generate token
id: generate_token
Expand All @@ -120,26 +115,16 @@ jobs:
app_id: ${{ secrets.MR_AVOCADO_ID }}
installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }}
private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }}
- uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ github.event.inputs.version }}
- name: Set up Python
uses: actions/setup-python@v7
- name: Download wheels
uses: actions/download-artifact@v8
with:
python-version: ${{ matrix.python-version }}
- name: Build eggs
run: |
if python -c 'import sys; exit(0) if sys.version_info.minor > 11 else exit(1)' ; then
pip install "setuptools<80"
fi
make -f Makefile.gh build-egg
- name: Upload binaries to release
name: wheel
path: dist/
- name: Upload wheels to the GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ steps.generate_token.outputs.token }}
file: ${{ github.workspace }}/EGG_UPLOAD/avocado_framework*egg
file: dist/*.whl
tag: ${{ github.event.inputs.version }}
overwrite: true
file_glob: true
11 changes: 0 additions & 11 deletions Makefile.gh
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ check-wheel: build-wheel
$(PYTHON) -m pip install twine==6.1.0 packaging==24.2
twine check --strict ./PYPI_UPLOAD/*

build-egg:
if test ! -d EGG_UPLOAD; then mkdir EGG_UPLOAD; fi
$(PYTHON) setup.py bdist_egg -d EGG_UPLOAD
for PLUGIN in $(AVOCADO_OPTIONAL_PLUGINS); do\
if test -f $$PLUGIN/setup.py; then\
cd $$PLUGIN;\
$(PYTHON) setup.py bdist_egg -d ../../EGG_UPLOAD;\
cd -;\
fi;\
done

update-pypi:
ifndef TWINE_USERNAME
$(error TWINE_USERNAME is undefined)
Expand Down
Loading
Loading