Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple architectures #15

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions .github/workflows/this-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ jobs:
uses: ./
with:
tox_env: ${{ matrix.tox_env }}
arch: ${{ matrix.arch }}
dnf_install: ${{ matrix.dnf_install }}
strategy:
matrix:
tox_env: [py39]
arch: [amd64, arm64, ppc64le, s390x]
dnf_install: ["", "libffi-devel", "--enablerepo=updates-testing libffi-devel libyaml-devel"]

# Use GitHub's Linux Docker host
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ from your Tox configuration.
(As far as we know, this is required in order to have individual environments
show up as separate runs on GitHub. Discuss this limitation in [issue 8].)

Similarly, you can run tox on multiple architectures:

```yaml
strategy:
matrix:
arch: [amd64, arm64, ppc64le, s390x]
...
- uses: fedora-python/tox-github-action
with:
tox_env: py38
arch: ${{ matrix.arch }}
```

You can also install RPM packages from Fedora by setting `dnf_install` to
a space-separated list of *provides*, such as:

Expand Down
6 changes: 5 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ inputs:
required: true
default: 'py38'
description: Tox environment to run the tests on
arch:
required: false
default: 'amd64'
description: The architecture to run on (amd64 (default), arch64, ppc64le or s390x)
dnf_install:
required: false
default: ''
description: Space separated packages to install via dnf install (can contain options)
runs:
using: docker
image: docker://fedorapython/fedora-python-tox
image: docker://fedorapython/fedora-python-tox:${{ inputs.arch }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, apparently, this is not possible :(

https://github.community/t/expressions-in-docker-uri/16271/4

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd appreciate ideas for workarounds.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env:
TOXENV: ${{ inputs.tox_env }}
DNF_INSTALL: ${{ inputs.dnf_install }}
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ skipsdist = True

[testenv]
deps = pytest >= 3.0.0, <4
commands = pytest test/test.py
commands =
python -m platform
pytest test/test.py
"""