Does anybody have a slightly less crazy version of .github/workflows/ for just one build of one version on one Linux platform for a brief CI checking than what’s in python/cpython proper? I don’t need all platforms and all versions, just one version of Python (actually the ancient 3.6) on one Linux distro (openSUSE/Leap).
This isn’t in GH YAML or in a Dockerfile, and you’ll have to find the URL or branch for Python 3.6. If you have more cores, you can bump the -j2 higher too. But all that is required to build from source on Debian, in CI or in anything else, is:
Hmm, I have created my attempt for GitHub Actions, but apparently there is some weird setting on python/cpython, which disallows … something … I don’t even understand that weird message in the top of the pull request:
Make sure the workflow (.yml) file is on the main branch. Then push a commit to the opensuse_3.6 branch, and see if it runs.
Sometimes GHA requires workflow files to exist in the main branch, before it acknowledges their existence. It could all get very complicated and circular otherwise (e.g.if workflows in all branches can run, creating other branches, which could contain other workflows).
a) No, it shouldn’t be on the main branch, because that’s the faithful mirror of the main branch of python/cpython
b) Something happened, but then the action failed without any reasonable explanation Build and Test · openSUSE-Python/cpython@8e0aeed · GitHub
c) actionlint playground was happy with my workflow file
Workflows only need to be on main to use workflow_dispatch, sorry.
Anyway, I’ve built it twice now: Workflow runs · JamesParrott/BuildCPythonInOpenSuse · GitHub Running all 491 tests will take a while longer, and I wouldn’t be surprised if one of them fails.
The tests pass. Turns out that -j3 option is important.
I missed this small note on the bottom of the page (it is clearly not very clear):
actions/checkout@v4 is not allowed to be used in openSUSE-Python/cpython. Actions in this workflow must be: within a repository owned by openSUSE-Python.
So, I got rid of it, and it seems that at least the test runs now. Let’s see how it finishes!
I don’t understand. If this is done on push or pull_request event, I surely don’t care about branch 3.12, but I want the code being pushed or PRed in, don’t I?
run: ./python -m test -j3
I think the right replacement for -j is -j0, which should run on as many processors as available.
If you’re not developing CPython itself, if you just want to build it from source, there’s no need to work from a fork of it. The CPython repo can just be cloned fast enough into any workflow, of any other project’s repo.
Set the branch and the url to that of the git repo, of whichever Python you want to build. I just happen to know 3.12 builds, and have never tried 3.6.
I am a developer, even not primarily the upstream one (although, I am trying to help as well). I work for SUSE and that branch is our current Python 3.6 code for our SLE packages.