Skip to content

ci: update actions to newer version #400

ci: update actions to newer version

ci: update actions to newer version #400

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: '3.12', python: '3.12', os: ubuntu-latest, architecture: 'x64', cibuild: "no"}
- {name: '3.11', python: '3.11', os: ubuntu-latest, architecture: 'x64', cibuild: "no"}
- {name: '3.10', python: '3.10', os: ubuntu-latest, architecture: 'x64', cibuild: "no"}
- {name: '3.9', python: '3.9', os: ubuntu-latest, architecture: 'x64', cibuild: "yes"}
- {name: '3.8', python: '3.8', os: ubuntu-latest, architecture: 'x64', cibuild: "no"}
- {name: Windows, python: '3.8', os: windows-latest, architecture: 'x64', arch-cx: 'win-amd64', cx_name: 'amd64', cibuild: "yes"}
- {name: WindowsX86, python: '3.8', os: windows-latest, architecture: 'x86', arch-cx: 'win32', cx_name: 'win32', cibuild: "yes"}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
cache: 'pip'
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: install deps
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: per-commit|${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: per-commit|${{ runner.os }}-${{ matrix.python }}-
if: matrix.os == 'ubuntu-latest'
- name: pre-commit
run: pre-commit run --all-files --show-diff-on-failure
if: matrix.os == 'ubuntu-latest'
- name: pytest
run: pytest -v --cov
binaries-make:
name: "binaries make"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- name: update pip
run: |
pip install -U setuptools
python -m pip install -U pip
- name: install deps
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Build .zip fil for *nix
- run: make
- run: ./svtplay-dl --version
- name: cibuild
run: python scripts/cibuild.py
env:
CIBUILD: "yes"
BUILD_DOCKER: "no"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
OS: "ubuntu-latest"
binaries-exe:
name: "binaries exe ${{ matrix.architecture }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: Windows, python: '3.8', os: windows-latest, architecture: 'x64', arch-cx: 'win-amd64', cx_name: 'amd64', cibuild: "yes"}
- {name: WindowsX86, python: '3.8', os: windows-latest, architecture: 'x86', arch-cx: 'win32', cx_name: 'win32', cibuild: "yes"}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
cache: 'pip'
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: install deps
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: set version
run: python setversion.py
- name: build .exe
run: python setup.py build_exe
- name: run the .exe file
run: build\\exe.${{ matrix.arch-cx }}-${{ matrix.python }}\\svtplay-dl.exe --version
- run: |
mkdir svtplay-dl
xcopy /s build\\exe.${{ matrix.arch-cx }}-${{ matrix.python }} svtplay-dl
- run: 7z a -tzip svtplay-dl-${{ matrix.cx_name }}.zip svtplay-dl
- name: cibuild
run: python scripts/cibuild.py
env:
CIBUILD: "yes"
BUILD_DOCKER: "no"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
OS: "windows-latest"
binaries-pypi:
name: "binaries pypi"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
- name: update pip
run: |
pip install -U setuptools
python -m pip install -U pip
- name: install deps
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: python pkg
run: python setup.py sdist bdist_wheel
- name: cibuild
run: python scripts/cibuild.py
env:
CIBUILD: "yes"
BUILD_DOCKER: "yes"
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
OS: "ubuntu-latest"