build using python 3.12

This commit is contained in:
Jesse Bannon 2025-03-15 17:52:19 -07:00
parent cf6c3e93fc
commit 7776493574
6 changed files with 40 additions and 40 deletions

View file

@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run unit tests with coverage
run: |
@ -42,7 +42,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run integration tests with coverage
run: |
@ -66,7 +66,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run prebuilt preset integration tests with coverage
run: |
@ -89,7 +89,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run e2e tests with coverage
run: |

View file

@ -9,7 +9,7 @@ on:
- master
jobs:
test-lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run linters
run: |
@ -27,7 +27,7 @@ jobs:
make check_lint
test-unit:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
@ -37,7 +37,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run unit tests with coverage
run: |
@ -53,7 +53,7 @@ jobs:
key: ${{github.sha}}-coverage-unit
test-integration:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
@ -63,7 +63,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run integration tests with coverage
run: |
@ -79,7 +79,7 @@ jobs:
key: ${{github.sha}}-coverage-integration
test-integration-prebuilt-presets:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
@ -89,7 +89,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run prebuilt preset integration tests with coverage
run: |
@ -105,7 +105,7 @@ jobs:
key: ${{github.sha}}-coverage-integration-prebuilt-presets
test-e2e:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
@ -115,7 +115,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run e2e tests with coverage
run: |
@ -125,7 +125,7 @@ jobs:
coverage run -m pytest tests/e2e && coverage xml -o /opt/coverage/e2e/coverage.xml
codecov-upload:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
test-unit,
test-integration,

View file

@ -63,10 +63,10 @@ jobs:
echo 'init_contents=__pypi_version__ = "${{ env.PYPI_VERSION }}";__local_version__ = "${{ env.LOCAL_VERSION }}"' >> "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
python-version: [ "3.12" ]
permissions:
contents: read
@ -92,7 +92,7 @@ jobs:
# Build ARM64 container, only on master branch to save time testing
package-arm64:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
build
]
@ -141,7 +141,7 @@ jobs:
# Build AMD64 container
package-amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
build
]
@ -186,7 +186,7 @@ jobs:
# On master branch, build the docker manifest file from the cached
# docker builds and push to the registry
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
version,
build,

View file

@ -63,10 +63,10 @@ jobs:
echo 'init_contents=__pypi_version__ = "${{ env.PYPI_VERSION }}";__local_version__ = "${{ env.LOCAL_VERSION }}"' >> "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
python-version: [ "3.12" ]
permissions:
contents: read
@ -92,7 +92,7 @@ jobs:
# Build ARM64 container, only on master branch to save time testing
package-arm64:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
build
]
@ -141,7 +141,7 @@ jobs:
# Build AMD64 container
package-amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
build
]
@ -186,7 +186,7 @@ jobs:
# On master branch, build the docker manifest file from the cached
# docker builds and push to the registry
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
version,
build,

View file

@ -63,10 +63,10 @@ jobs:
echo 'init_contents=__pypi_version__ = "${{ env.PYPI_VERSION }}";__local_version__ = "${{ env.LOCAL_VERSION }}"' >> "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
python-version: [ "3.12" ]
permissions:
contents: read
@ -92,7 +92,7 @@ jobs:
# Build ARM64 container, only on master branch to save time testing
package-arm64:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
build
]
@ -136,7 +136,7 @@ jobs:
# Build AMD64 container
package-amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
build
]
@ -180,7 +180,7 @@ jobs:
# On master branch, build the docker manifest file from the cached
# docker builds and push to the registry
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [
version,
build,

View file

@ -76,17 +76,17 @@ jobs:
dnf install -y epel-release tar wget make gcc openssl-devel bzip2-devel libffi-devel zlib-devel
- name: Install Python
run: |
wget https://www.python.org/ftp/python/3.10.10/Python-3.10.10.tar.xz
tar -xf Python-3.10.10.tar.xz
cd Python-3.10.10 && ./configure --with-ensurepip=install --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
wget https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tar.xz
tar -xf Python-3.12.9.tar.xz
cd Python-3.12.9 && ./configure --with-ensurepip=install --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make -j 8
make altinstall
python3.10 --version
python3.10 -m ensurepip --upgrade
python3.12 --version
python3.12 -m ensurepip --upgrade
- name: Build Package
run: |
python3.10 -m pip install -e .
python3.10 -m pip install pyinstaller
python3.12 -m pip install -e .
python3.12 -m pip install pyinstaller
# Build executable
pyinstaller ytdl-sub.spec
mkdir -p /opt/builds
@ -112,7 +112,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Write version to init file
run: |
echo '${{ needs.version.outputs.init_contents }}'> src/ytdl_sub/__init__.py
@ -193,13 +193,13 @@ jobs:
name: pypi-publish
needs:
- version
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- name: Write version to init file
run: |
echo '${{ needs.version.outputs.init_contents }}' > src/ytdl_sub/__init__.py