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

update un/download artefacts action to v4 #174

Merged
merged 7 commits into from
Jan 7, 2025
Merged
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
23 changes: 12 additions & 11 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ jobs:
run: |
bash -x .install-pari.sh
env:
PARI_VERSION: pari-2.15.4
PARI_VERSION: pari-2.17.1
URLDIR: unix
- uses: actions/setup-python@v4
- name: make sdist
run: |
python3 -m pip install build
python3 -m build --sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: "dist/*.tar.gz"
name: dist
name: dist-ubuntu-latest
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
#
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
# Environment during wheel build
CIBW_ENVIRONMENT: "PATH=$(pwd)/local/bin:$PATH CPATH=$(pwd)/local/include:$CPATH LIBRARY_PATH=$(pwd)/local/lib:$LIBRARY_PATH LD_LIBRARY_PATH=$(pwd)/local/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/local/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal"
# Use 'build', not 'pip wheel'
Expand All @@ -79,17 +80,17 @@ jobs:
repository: sagemath/sage
ref: develop

- uses: actions/download-artifact@v4.1.7
- uses: actions/download-artifact@v4
with:
name: dist
pattern: dist-*
path: dist

- uses: actions/setup-python@v5
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
id: python
with:
python-version: "3.8 - 3.12"
python-version: "3.10 - 3.12"
update-environment: false

- name: Build platform wheels
Expand All @@ -105,13 +106,13 @@ jobs:
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE"
mkdir -p unpacked
for pkg in cypari2; do
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
(cd unpacked && tar xfz - ) < dist/dist-ubuntu-latest/$pkg*.tar.gz
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
done

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

pypi-publish:
Expand All @@ -124,7 +125,7 @@ jobs:
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
steps:

- uses: actions/download-artifact@v4.1.7
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
&& echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
&& ls -l upstream/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: upstream
name: upstream
Expand Down
7 changes: 4 additions & 3 deletions .install-pari.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ PARI_URL1="http://pari.math.u-bordeaux.fr/pub/pari/unix"
PARI_URL2="http://pari.math.u-bordeaux.fr/pub/pari/unstable"

# Download PARI sources
wget --no-verbose "$PARI_URL/$PARI_VERSION.tar.gz" || wget --no-verbose "$PARI_URL1/$PARI_VERSION.tar.gz" || wget --no-verbose "$PARI_URL2/$PARI_VERSION.tar.gz" || wget --no-verbose "$PARI_URL3/$PARI_VERSION.tar.gz"
wget --no-verbose "$PARI_URL/$PARI_VERSION.tar.gz" -O pari.tgz || wget --no-verbose "$PARI_URL1/pari-$PARI_VERSION.tar.gz" -O pari.tgz || wget --no-verbose "$PARI_URL2/pari-$PARI_VERSION.tar.gz" -O pari.tgz

# Install
tar xzf "$PARI_VERSION.tar.gz"
cd "$PARI_VERSION"
mkdir Pari42
tar xzf pari.tgz -C Pari42
cd Pari42/*
./Configure --prefix=/usr
make gp
sudo make install
Loading