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

View file

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

View file

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

View file

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

View file

@ -63,10 +63,10 @@ jobs:
echo 'init_contents=__pypi_version__ = "${{ env.PYPI_VERSION }}";__local_version__ = "${{ env.LOCAL_VERSION }}"' >> "$GITHUB_OUTPUT" echo 'init_contents=__pypi_version__ = "${{ env.PYPI_VERSION }}";__local_version__ = "${{ env.LOCAL_VERSION }}"' >> "$GITHUB_OUTPUT"
build: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [ "3.10" ] python-version: [ "3.12" ]
permissions: permissions:
contents: read contents: read
@ -92,7 +92,7 @@ jobs:
# Build ARM64 container, only on master branch to save time testing # Build ARM64 container, only on master branch to save time testing
package-arm64: package-arm64:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
needs: [ needs: [
build build
] ]
@ -136,7 +136,7 @@ jobs:
# Build AMD64 container # Build AMD64 container
package-amd64: package-amd64:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
needs: [ needs: [
build build
] ]
@ -180,7 +180,7 @@ jobs:
# On master branch, build the docker manifest file from the cached # On master branch, build the docker manifest file from the cached
# docker builds and push to the registry # docker builds and push to the registry
deploy: deploy:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
needs: [ needs: [
version, version,
build, 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 dnf install -y epel-release tar wget make gcc openssl-devel bzip2-devel libffi-devel zlib-devel
- name: Install Python - name: Install Python
run: | run: |
wget https://www.python.org/ftp/python/3.10.10/Python-3.10.10.tar.xz wget https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tar.xz
tar -xf Python-3.10.10.tar.xz tar -xf Python-3.12.9.tar.xz
cd Python-3.10.10 && ./configure --with-ensurepip=install --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" cd Python-3.12.9 && ./configure --with-ensurepip=install --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make -j 8 make -j 8
make altinstall make altinstall
python3.10 --version python3.12 --version
python3.10 -m ensurepip --upgrade python3.12 -m ensurepip --upgrade
- name: Build Package - name: Build Package
run: | run: |
python3.10 -m pip install -e . python3.12 -m pip install -e .
python3.10 -m pip install pyinstaller python3.12 -m pip install pyinstaller
# Build executable # Build executable
pyinstaller ytdl-sub.spec pyinstaller ytdl-sub.spec
mkdir -p /opt/builds mkdir -p /opt/builds
@ -112,7 +112,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.12"
- name: Write version to init file - name: Write version to init file
run: | run: |
echo '${{ needs.version.outputs.init_contents }}'> src/ytdl_sub/__init__.py echo '${{ needs.version.outputs.init_contents }}'> src/ytdl_sub/__init__.py
@ -193,13 +193,13 @@ jobs:
name: pypi-publish name: pypi-publish
needs: needs:
- version - version
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: '3.10' python-version: '3.12'
- name: Write version to init file - name: Write version to init file
run: | run: |
echo '${{ needs.version.outputs.init_contents }}' > src/ytdl_sub/__init__.py echo '${{ needs.version.outputs.init_contents }}' > src/ytdl_sub/__init__.py