Skip to content

Bump conda-incubator/setup-miniconda from 2 to 3 #517

Bump conda-incubator/setup-miniconda from 2 to 3

Bump conda-incubator/setup-miniconda from 2 to 3 #517

Workflow file for this run

name: Test/build
on: [push, pull_request]
jobs:
build:
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache location
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest Cython wheel build
- name: Build sdist and wheel
run: |
python -m build
- name: Install vpython
run: |
pip install .
- name: Run tests
run: |
pytest vpython
- name: Import test
run: |
python -c "import vpython"
build_aarch64:
strategy:
fail-fast: false
matrix:
python-version: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311]
runs-on: ubuntu-latest
env:
py: /opt/python/${{ matrix.python-version }}/bin/python
img: quay.io/pypa/manylinux2014_aarch64
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Build and Test
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '${{ env.py }} -m venv .env && \
source .env/bin/activate && \
echo -e "\e[1;34m Install dependencies \e[0m" && \
python -m pip install --upgrade pip && \
pip install pytest Cython wheel && \
echo -e "\e[1;34m Build wheel \e[0m" && \
python setup.py bdist_wheel && \
echo -e "\e[1;34m Install vpython \e[0m" && \
pip install . && \
echo -e "\e[1;34m Run tests \e[0m" && \
pytest vpython && \
echo -e "\e[1;34m Import test \e[0m" && \
python -c "import vpython" && \
deactivate'