1.7.1dev: merge [17839] from 1.6-stable (fix for #13785) #106
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: build | |
on: | |
push: | |
branches: ['**'] | |
tags: ['trac-*'] | |
pull_request: | |
branches: ['**'] | |
concurrency: | |
group: ${{ github.workflow }}--${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
posix-test-minimum: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
needs: [posix-prepare] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-12] | |
python-version: ['3.12'] | |
tests: [functional] | |
env: | |
MATRIX_TESTS: ${{ matrix.tests }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements-minimum.txt') }} | |
- name: Run tests | |
run: . .github/posix-test-minimum.sh | |
- name: Upload log files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: log-${{ matrix.os }}--py${{ matrix.python-version }}-minimum-${{ job.status }} | |
path: | | |
testenv/*.log | |
testenv/trac/log | |
geckodriver.log | |
if-no-files-found: ignore | |
posix-test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 50 | |
needs: [posix-prepare] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {os: ubuntu-22.04, python-version: '3.12', tracdb: sqlite, tests: functional} | |
- {os: ubuntu-22.04, python-version: '3.12', tracdb: postgresql, tests: functional} | |
- {os: ubuntu-22.04, python-version: '3.12', tracdb: mysql, tests: functional} | |
- {os: ubuntu-22.04, python-version: '3.12', tracdb: ''} | |
- {os: ubuntu-22.04, python-version: '3.11', tracdb: ''} | |
- {os: ubuntu-22.04, python-version: '3.10', tracdb: ''} | |
- {os: ubuntu-22.04, python-version: '3.9', tracdb: ''} | |
- {os: ubuntu-22.04, python-version: '3.8', tracdb: ''} | |
- {os: ubuntu-22.04, python-version: '3.7', tracdb: ''} | |
- {os: ubuntu-20.04, python-version: '3.6', tracdb: ''} | |
- {os: ubuntu-20.04, python-version: '3.5', tracdb: ''} | |
- {os: macos-12, python-version: '3.12', tracdb: sqlite, tests: functional} | |
- {os: macos-12, python-version: '3.12', tracdb: postgresql} | |
- {os: macos-12, python-version: '3.12', tracdb: mysql} | |
- {os: macos-12, python-version: '3.12', tracdb: ''} | |
- {os: macos-12, python-version: '3.11', tracdb: ''} | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
MATRIX_TRACDB: ${{ matrix.tracdb }} | |
MATRIX_TESTS: ${{ matrix.tests }} | |
PIP_NO_PYTHON_VERSION_WARNING: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Workaround for certificate verify failed from pip with Python 3.5 | |
if: ${{ matrix.python-version == '3.5' }} | |
run: | | |
echo 'PIP_TRUSTED_HOST=pypi.python.org pypi.org files.pythonhosted.org' >>"$GITHUB_ENV" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements.txt') }} | |
- name: Set up svn python cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/venv/lib/libsvn_* | |
~/venv/lib/python*.*/site-packages/svn | |
~/venv/lib/python*.*/site-packages/libsvn | |
key: ${{ matrix.os }}--svn-py${{ matrix.python-version }} | |
- name: Run tests | |
run: . .github/posix-test.sh | |
- name: Upload log files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: log-${{ matrix.os }}--py${{ matrix.python-version }}-${{ matrix.tracdb }}-${{ job.status }} | |
path: | | |
testenv/*.log | |
testenv/trac/log | |
geckodriver.log | |
if-no-files-found: ignore | |
posix-prepare: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 50 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {os: ubuntu-22.04, python-version: '3.12'} | |
- {os: ubuntu-22.04, python-version: '3.11'} | |
- {os: ubuntu-22.04, python-version: '3.10'} | |
- {os: ubuntu-22.04, python-version: '3.9'} | |
- {os: ubuntu-22.04, python-version: '3.8'} | |
- {os: ubuntu-22.04, python-version: '3.7'} | |
- {os: ubuntu-20.04, python-version: '3.6'} | |
- {os: ubuntu-20.04, python-version: '3.5'} | |
- {os: macos-12, python-version: '3.12'} | |
- {os: macos-12, python-version: '3.11'} | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
PIP_NO_PYTHON_VERSION_WARNING: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout py3c | |
uses: actions/checkout@v4 | |
with: | |
repository: encukou/py3c | |
ref: v1.4 | |
path: py3c | |
- name: Workaround for certificate verify failed from pip with Python 3.5 | |
if: ${{ matrix.python-version == '3.5' }} | |
run: | | |
echo 'PIP_TRUSTED_HOST=pypi.python.org pypi.org files.pythonhosted.org' >>"$GITHUB_ENV" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements.txt') }} | |
- name: Set up svn python cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/venv/lib/libsvn_* | |
~/venv/lib/python*.*/site-packages/svn | |
~/venv/lib/python*.*/site-packages/libsvn | |
key: ${{ matrix.os }}--svn-py${{ matrix.python-version }} | |
- name: Prepare dependencies | |
run: . .github/posix-prepare.sh | |
windows-test-minimum: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
needs: [windows-prepare] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022] | |
architecture: [x64] | |
python-version: ['3.12'] | |
tests: [functional] | |
env: | |
MATRIX_TESTS: ${{ matrix.tests }} | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements-minimum.txt') }} | |
- name: Run tests | |
run: . .github\windows-test-minimum.ps1 | |
- name: Upload log files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: log-${{ matrix.os }}--py${{ matrix.python-version }}-minimum-${{ job.status }} | |
path: | | |
testenv/*.log | |
testenv/trac/log | |
geckodriver.log | |
if-no-files-found: ignore | |
windows-test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 80 | |
needs: [windows-prepare] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022] | |
architecture: [x64] | |
python-version: ['3.12'] | |
subversion-version: ['1.14.3'] | |
tracdb: ['', sqlite, postgresql, mysql] | |
include: | |
- {tracdb: '', tests: functional} | |
env: | |
MATRIX_TRACDB: ${{ matrix.tracdb }} | |
MATRIX_TESTS: ${{ matrix.tests }} | |
MATRIX_ARCH: ${{ matrix.architecture }} | |
MATRIX_PYVER: ${{ matrix.python-version }} | |
MATRIX_SVNVER: ${{ matrix.subversion-version }} | |
PIP_NO_PYTHON_VERSION_WARNING: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements.txt') }} | |
- name: Set up svn cache | |
uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\subversion-${{ matrix.subversion-version }}\${{ matrix.architecture }} | |
key: ${{ matrix.os }}--${{ matrix.architecture }}-svn${{ matrix.subversion-version }}-py${{ matrix.python-version }} | |
- name: Run tests | |
run: . .github\windows-test.ps1 | |
- name: Upload log files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: log-${{ matrix.os }}--py${{ matrix.python-version }}-${{ matrix.tracdb }}-${{ job.status }} | |
path: | | |
testenv/*.log | |
testenv/trac/log | |
geckodriver.log | |
if-no-files-found: ignore | |
windows-prepare: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 50 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022] | |
architecture: [x64] | |
python-version: ['3.12'] | |
subversion-version: ['1.14.3'] | |
env: | |
MATRIX_ARCH: ${{ matrix.architecture }} | |
MATRIX_PYVER: ${{ matrix.python-version }} | |
MATRIX_SVNVER: ${{ matrix.subversion-version }} | |
PIP_NO_PYTHON_VERSION_WARNING: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout py3c | |
uses: actions/checkout@v4 | |
with: | |
repository: encukou/py3c | |
ref: v1.4 | |
path: py3c | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements.txt') }} | |
- name: Set up svn cache | |
uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\subversion-${{ matrix.subversion-version }}\${{ matrix.architecture }} | |
key: ${{ matrix.os }}--${{ matrix.architecture }}-svn${{ matrix.subversion-version }}-py${{ matrix.python-version }} | |
- name: Set up vcpkg cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~\AppData\Local\vcpkg\archives | |
~\AppData\Local\vcpkg\downloads\7z* | |
key: ${{ matrix.os }}--${{ matrix.architecture }}-vcpkg--${{ hashFiles('.github/vcpkg.txt') }} | |
- name: Set up msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Prepare dependencies | |
run: . .github\windows-prepare.ps1 | |
- name: Upload log files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: svnlog-${{ matrix.os }}-${{ matrix.architecture }}--${{ matrix.subversion-version }}-py${{ matrix.python-version }} | |
path: subversion-*\*.log | |
if-no-files-found: ignore | |
- name: Upload Subversion binaries | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: svnbin-${{ matrix.os }}-${{ matrix.architecture }}--${{ matrix.subversion-version }}-py${{ matrix.python-version }} | |
path: ~\AppData\Local\subversion-${{ matrix.subversion-version }} | |
if-no-files-found: ignore | |
release: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
python-version: ['3.12'] | |
needs: [posix-test-minimum, posix-test, windows-test-minimum, windows-test] | |
env: | |
PIP_NO_PYTHON_VERSION_WARNING: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}--pip-py${{ matrix.python-version }}--${{ hashFiles('.github/requirements.txt') }} | |
- name: Build release packages | |
run: . .github/release.sh | |
- name: Upload release packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release | |
path: dist/Trac-* | |
if-no-files-found: ignore | |
- name: Upload release packages to edgewall.org | |
if: ${{ github.event_name == 'push' && github.repository == 'edgewall/trac' }} | |
env: | |
EDGEWALL_KEY_BASE64: ${{ secrets.EDGEWALL_KEY_BASE64 }} | |
EDGEWALL_HOST_KEY: ${{ secrets.EDGEWALL_HOST_KEY }} | |
run: . .github/release-upload.sh |