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

Distribute CLI in a Python package #266

Merged
merged 93 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
6014c45
Add nix files
alecandido Aug 8, 2023
4df6ce6
Add maturin, update nixos distribution
alecandido Oct 11, 2023
936cd0c
Add lhapdf dependency, setup shell to ease its usage
alecandido Feb 24, 2024
b657b74
Propagate Python version to the LHAPDF package
alecandido Feb 25, 2024
5d38e64
Use PATH variable from module system
alecandido Feb 25, 2024
87e52a8
Drop path extension, temporarily
alecandido Feb 25, 2024
ca96f73
Set pineappl PATH in the trivial way
alecandido Feb 25, 2024
ff404db
Document Nix files added to the repo
alecandido Feb 25, 2024
2a05674
feat: Add Python CLI packaging workflow
alecandido Mar 21, 2024
8ceef17
Switch from maturin action to manual maturin usage
alecandido Mar 26, 2024
a52ad6a
Patch CLI wheels with auditwheel and delocate
alecandido Mar 26, 2024
44948d6
Add LHAPDF installation in the CI
alecandido Mar 26, 2024
7e65f0d
Set bash as default shell for all jobs
alecandido Mar 26, 2024
3f42300
Write curl output on file
alecandido Mar 26, 2024
9f39dec
Add LHAPDF installation script
alecandido Mar 26, 2024
6175f4e
Replace shell LHAPDF installation with Python-based one
alecandido Mar 26, 2024
18bd0eb
Downgrade checkout action to run within container
alecandido Mar 26, 2024
3251aed
Downgrade setup python action as well
alecandido Mar 26, 2024
ac45fbd
Drop PyPy 3.7 on Linux
alecandido Mar 26, 2024
f2a262f
Add MacOS wheel patching script
alecandido Mar 26, 2024
b20d336
Fix typo in script name
alecandido Mar 26, 2024
e6c987f
Set suitable targets for macos
alecandido Mar 26, 2024
62a2e34
Use cibuildwheel on Linux, disable Windows
alecandido Mar 26, 2024
107ed5f
Attempt building macos wheels on native runners
alecandido Mar 26, 2024
2da9b5e
Restore Node 20 version of actions on Linux
alecandido Mar 26, 2024
c16acde
Drop architecture specification from setup python
alecandido Mar 26, 2024
dc4a376
Skip building wheels for CPython 3.6
alecandido Mar 26, 2024
8322249
Skip PyPy 3.7 on macos
alecandido Mar 26, 2024
6101d5d
Skip CPython 3.7 as well
alecandido Mar 26, 2024
43f601a
Attempt exporting env var for cibuildwheel
alecandido Mar 26, 2024
c449f1e
Fix cibuildwheel invocation, drop one Python 3.8 as well on macos
alecandido Mar 26, 2024
c19ef0d
Install Rust toolchain on Linux
alecandido Mar 26, 2024
66cc22a
Restore maturin action on linux
alecandido Mar 26, 2024
392cbfd
Temporary ignore macos arm
alecandido Mar 26, 2024
70c8c36
Back to maturin action for macos
alecandido Mar 27, 2024
e135b0c
Ignore macos aarch64 once more
alecandido Mar 27, 2024
f1d080d
Disambiguate python major in command
alecandido Mar 27, 2024
33165a1
Restore python versions and target
alecandido Mar 27, 2024
8417243
Remove again some Python 3.7
alecandido Mar 27, 2024
326fa2b
Install g++ in manylinux containers
alecandido Mar 27, 2024
2ad020e
Add even more packages to manylinux container
alecandido Mar 27, 2024
3855495
Unlock windows wheels
alecandido Mar 27, 2024
97a6bb9
Install cygwin for windows LHAPDF compilation
alecandido Mar 27, 2024
c4fa8e0
Propagate scripts' names fix
alecandido Mar 27, 2024
fa512a2
Avoid autoreconf during LHAPDF installation
alecandido Mar 27, 2024
1bd3d09
Replace cygwin with msys2
alecandido Mar 27, 2024
6fc7a4f
Consistently use msys2 to run windows
alecandido Mar 27, 2024
2b4c8fd
Disambiguate python major in windows
alecandido Mar 27, 2024
4c06c8f
Explicitly add tools to msys2
alecandido Mar 27, 2024
b1cc3fb
Change make version in msys2
alecandido Mar 27, 2024
e771c69
Link binary statically
cschwan Jun 28, 2024
1828b3d
Merge branch 'master' into pycli
cschwan Jun 28, 2024
b82b3f5
Use a different container when building CLI on Linux
cschwan Jun 28, 2024
4534082
Try fixing macOS CLI wheel generation
cschwan Jun 28, 2024
01601b6
Do not cross-compile macOS targets
cschwan Jun 28, 2024
8283730
Fix YAML error in `cli-wheels.yml`
cschwan Jun 28, 2024
6330056
Print `config.log` to debug Windows build
cschwan Jun 28, 2024
f3b532d
Move CLI building for Linux and macOS to Release workflow
cschwan Jun 28, 2024
9b9b8b6
Debug LHAPDF installation on Windows
cschwan Jun 28, 2024
0cf77ac
Use same `actions/upload-artifact` version everywhere
cschwan Jun 28, 2024
68af11d
Disable workflows temporarily
cschwan Jun 28, 2024
1605829
Fix printing `config.log`
cschwan Jun 28, 2024
aa6e70f
Disable LHAPDF Python CLI
cschwan Jun 28, 2024
d343eb2
Use standard gcc and make
cschwan Jun 28, 2024
3087388
Add `pkgconf` dependency
cschwan Jun 28, 2024
d591b4b
Make and install LHAPDF
cschwan Jun 28, 2024
d359373
Print path of `pkgconf`
cschwan Jun 28, 2024
545e768
Try using `pkgconfig` instead of `pkg-config`
cschwan Jun 28, 2024
c2a41f4
Use `pkg-config` instead `pkgconf`
cschwan Jun 28, 2024
d952c62
Try a different name for `pkg-config`
cschwan Jun 28, 2024
621cec4
Set the path to `pkg-config` explicitly
cschwan Jun 28, 2024
228c34d
Disable shared library generation for LHAPDF
cschwan Jun 28, 2024
dde69ae
Debug `pkg-config` paths
cschwan Jun 28, 2024
371ffe5
Rename jobs
cschwan Jun 28, 2024
11fd8b4
Activate converters on Linux
cschwan Jun 28, 2024
b742558
Build CLI with all features enabled
cschwan Jun 28, 2024
70ac438
Install CLI dependencies on macOS
cschwan Jun 28, 2024
9b4394c
Export environment variables properly
cschwan Jun 28, 2024
36ab312
Add cosmetic changes
cschwan Jun 28, 2024
c29b056
Try running `maturin` manually
cschwan Jun 28, 2024
f1336ca
Remove binary patching
cschwan Jun 28, 2024
cab2cb9
Correct names of Rust and maturin packages
cschwan Jun 28, 2024
fb5b4dc
Remove obsolete/unrelated files
cschwan Jun 29, 2024
295a275
Rename CLI wheel for Windows workflow file
cschwan Jun 29, 2024
e408b2b
Publish also CLI wheels
cschwan Jun 29, 2024
c032325
Make wheels-only release
cschwan Jun 29, 2024
0e45d2f
Release v0.8.0-alpha.1.testwheels.1
cschwan Jun 29, 2024
7400237
Release v0.8.0-alpha.2
cschwan Jun 29, 2024
6e71ec7
Allow prereleases from every branch
cschwan Jun 29, 2024
7e5213b
Try to fix cli-wheels not being downloaded in CI
cschwan Jun 29, 2024
8ff4a70
Release v0.8.0-alpha.3
cschwan Jun 29, 2024
cdeadc7
Upload wheels and cli-wheels separately
cschwan Jun 29, 2024
84188bd
Release v0.8.0-alpha.4
cschwan Jun 29, 2024
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/capi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CAPI

on:
push:
branches-ignore:
- pycli

jobs:
capi:
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/cli-wheels-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Generate CLI wheels for Windows

# this workflow doesn't do (yet) what it promises; we keep this file to not lose the progress

on:
workflow_dispatch:

jobs:
cli-wheels-windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64]
defaults:
run:
shell: msys2 {0}

steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
git
gcc
make
autoconf
python3
curl
tar
mingw-w64-ucrt-x86_64-pkg-config
mingw-w64-rust
mingw-w64-python-maturin
- uses: actions/setup-python@v5
with:
# WARNING: be careful with the ordering - the last version is the
# default one. Apparently maturin doesn't find all Python versions
# when one chooses a PyPy version instead of CPython as default
python-version: |
pypy3.7
pypy3.8
pypy3.9
pypy3.10
3.7
3.8
3.9
3.11
3.12
3.10
- name: Install LHAPDF
run: |
curl "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.5.4.tar.gz" | tar xzf -
cd LHAPDF-6.5.4
# compiling with Python gives errors, but we also don't need Python
./configure --disable-python --disable-shared
make -j
make install
# print the path of `pkgconf`
command -v pkg-config
- name: Set pkg-config paths
run: |
# for some reason `pkg-config` isn't properly found by Rust
echo "PKG_CONFIG=$(command -v pkg-config)" >> ${GITHUB_ENV}
echo "PKG_CONFIG_PATH=/ucrt64/lib/pkgconfig:${PKG_CONFIG_PATH}" >> ${GITHUB_ENV}
echo "${PKG_CONFIG_PATH}"
- name: Build wheels
run:
maturin build --release --out dist --find-interpreter --manifest-path pineappl_cli/Cargo.toml --target ${{ matrix.target }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ matrix.target }}
path: dist
2 changes: 2 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: MSRV

on:
push:
branches-ignore:
- pycli

env:
CARGO_TERM_COLOR: always
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Python

on:
push:
branches-ignore:
- pycli

jobs:
test:
Expand Down
Loading
Loading