-
Notifications
You must be signed in to change notification settings - Fork 4
Fix build and release process #20
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
Open
knopki
wants to merge
15
commits into
tilde-lab:master
Choose a base branch
from
knopki:fix-actions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f2dbad6
style(workflows): fix formatting
knopki 16aa4b8
ci: bump actions/checkout to v5
knopki baf7b8b
fix: find Python interpreter in virtual env first
knopki 27de5ae
fix: wrong module loading
knopki d9e0210
fix: do not use editable install
knopki 9f7e05e
fix: bump versions of build tools and supported interpreters
knopki 9a7a3f0
ci: bump versions of actions and supported interpreters
knopki a1c0c36
ci: no need to install deps manually
knopki 0208e7e
ci: update build matrix
knopki cf3d4af
ci: update action versions
knopki 796d9ef
ci: fixes
knopki 897e434
fix: bump min cmake version to 3.15
knopki 072e818
ci: fix codacy
knopki eb2edd7
ci: fix codeql
knopki f5cff44
fix: port to GCC 13 (Ubuntu 24.04)
knopki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,75 +1,94 @@ | ||
| name: Build and publish pyfactxx | ||
| name: Build and publish pyfactxx | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: read # access to check out code and install dependencies | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: ["ubuntu-20.04", "windows-latest"] | ||
| python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
| os: ["ubuntu-22.04", "windows-2025"] | ||
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| defaults: | ||
| run: | ||
| working-directory: ./FaCT++.Python | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: ilammy/msvc-dev-cmd@v1 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install setuptools wheel auditwheel scikit-build cmake cython | ||
| - name: Build a wheel | ||
| run: | | ||
| python setup.py bdist_wheel | ||
| - name: Audit a wheel | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| auditwheel repair --plat manylinux_2_27_x86_64 dist/* | ||
| rm -rf dist/* | ||
| mv wheelhouse/* dist | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: ${{ runner.os }}-${{ matrix.python-version }} | ||
| path: FaCT++.Python/dist/pyfactxx* | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "24" | ||
| # TODO: migrate to the upstream | ||
| - uses: knopki/msvc-dev-cmd@221ec3af3b87c0c8189236347c1c0788d2022272 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install setuptools wheel scikit-build cmake cython | ||
| - name: Install Linux-only dependencies | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| pip install auditwheel patchelf | ||
| - name: Build a wheel | ||
| run: | | ||
| python setup.py bdist_wheel | ||
| - name: Audit a wheel | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| auditwheel repair --plat manylinux_2_34_x86_64 dist/*whl | ||
| rm -rf dist/* | ||
| mv wheelhouse/* dist | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ runner.os }}-${{ matrix.python-version }} | ||
| path: FaCT++.Python/dist/pyfactxx* | ||
|
|
||
| publish: | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| runs-on: ubuntu-24.04 | ||
| needs: build | ||
| defaults: | ||
| run: | ||
| working-directory: ./FaCT++.Python | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/pyfactxx | ||
| permissions: | ||
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python 3.8 | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install setuptools wheel auditwheel scikit-build cmake cython | ||
| - name: Build a source distribution | ||
| run: | | ||
| python setup.py sdist | ||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| path: FaCT++.Python/wheels/ | ||
| - name: Move wheels | ||
| run: | | ||
| mv wheels/*/*.whl dist/ | ||
| - name: Publish packages | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| user: __token__ | ||
| password: ${{ secrets.PYPI_API_TOKEN }} | ||
| packages_dir: FaCT++.Python/dist | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: 3.14 | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install setuptools wheel scikit-build cmake cython | ||
| - name: Build a source distribution | ||
| run: | | ||
| python setup.py sdist | ||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| path: FaCT++.Python/wheels/ | ||
| - name: Move wheels | ||
| run: | | ||
| mv wheels/*/*.whl dist/ | ||
| - name: Publish packages | ||
| uses: pypa/[email protected] | ||
| with: | ||
| packages-dir: FaCT++.Python/dist/ | ||
| # # useful for testing: | ||
| # verbose: true | ||
| # repository-url: https://test.pypi.org/legacy/ | ||
| # user: __token__ | ||
| # password: ${{ secrets.PYPI_API_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knopki marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| cmake_minimum_required(VERSION 2.8.11) | ||
| cmake_minimum_required(VERSION 3.15) | ||
|
|
||
| set(SOURCE_FILES | ||
| fact.cpp | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.