Fix deprecated version of github actions #29
This file contains 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
name: Extralibs Packaging | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout | |
- uses: conda-incubator/setup-miniconda | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniconda-version: "latest" | |
channels: conda-forge | |
auto-activate-base: true | |
activate-environment: true | |
- name: Create Conda environment and install libraries | |
shell: bash -el {0} | |
run: | | |
conda install --file requirements.txt -y | |
- name: Prepare extlibs | |
shell: bash -el {0} | |
run: | | |
if [ ${{ matrix.os }} == 'windows-latest' ]; then | |
SITE_PACKAGES_PATH=$CONDA_PREFIX/Lib/site-packages | |
else | |
SITE_PACKAGES_PATH=$CONDA_PREFIX/lib/python${{ matrix.python-version }}/site-packages | |
fi | |
mv $SITE_PACKAGES_PATH ./extlibs | |
# clean up the extlibs | |
rm -rf ./extlibs/plotly* ./extlibs/pip* ./extlibs/setuptools* ./extlibs/panel* \ | |
./extlibs/bokeh* ./extlibs/babel* ./extlibs/rtree* ./extlibs/numpy* ./extlibs/jupyterlab* | |
find ./extlibs -iname "examples" -prune -exec rm -Rf {} \; | |
find ./extlibs -iname "tests" -prune -exec rm -Rf {} \; | |
find ./extlibs -iname "__pycache__" -prune -exec rm -Rf {} \; | |
# create a zip file with the extlibs | |
- uses: vimtor/action-zip | |
with: | |
files: extlibs | |
dest: extlibs_${{ matrix.os }}_py${{ matrix.python-version }}.zip | |
# upload the zip file as an artifact | |
- name: Upload extlibs zip artifact | |
uses: actions/upload-artifact | |
with: | |
name: extlibs_${{ matrix.os }}_py${{ matrix.python-version }} | |
path: ${{ github.workspace }}/extlibs_${{ matrix.os }}_py${{ matrix.python-version }}.zip | |
packages: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout | |
- uses: actions/download-artifact |