feat: add ubuntu-24.04 (#269)
Some checks are pending
CodeQL analysis / CodeQL analysis (push) Waiting to run

* feat: add ubuntu-24.04

* chore: drop support for Python 2.x builds
This commit is contained in:
Matthieu Darbois 2024-05-08 15:33:12 +02:00 committed by GitHub
parent 7c3d29faf2
commit eb9433f569
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 19 deletions

View File

@ -15,7 +15,7 @@ on:
PLATFORMS:
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
required: true
default: 'ubuntu-20.04,ubuntu-22.04,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86'
default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86'
pull_request:
paths-ignore:
- 'versions-manifest.json'
@ -39,7 +39,7 @@ jobs:
- name: Generate execution matrix
id: generate-matrix
run: |
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
$matrix = @()
foreach ($configuration in $configurations) {

View File

@ -37,16 +37,9 @@ class UbuntuPythonBuilder : NixPythonBuilder {
$configureString += " --enable-shared"
$configureString += " --enable-optimizations"
### Compile with ucs4 for Python 2.x. On 3.x, ucs4 is enabled by default
if ($this.Version -lt "3.0.0") {
$configureString += " --enable-unicode=ucs4"
}
### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
### Compile with support of loadable sqlite extensions.
### Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
if ($this.Version -ge "3.2.0") {
$configureString += " --enable-loadable-sqlite-extensions"
}
$configureString += " --enable-loadable-sqlite-extensions"
Write-Host "The passed configure options are: "
Write-Host $configureString
@ -60,17 +53,13 @@ class UbuntuPythonBuilder : NixPythonBuilder {
Prepare system environment by installing dependencies and required packages.
#>
if (($this.Version -gt "3.0.0") -and ($this.Version -lt "3.5.3")) {
Write-Host "Python3 versions lower than 3.5.3 are not supported"
if ($this.Version -lt "3.5.3") {
Write-Host "Python versions lower than 3.5.3 are not supported"
exit 1
}
### Compile with tkinter support
if ($this.Version -gt "3.0.0") {
$tkinterInstallString = "sudo apt-get install -y --allow-downgrades python3-tk tk-dev"
} else {
$tkinterInstallString = "sudo apt install -y python-tk tk-dev"
}
$tkinterInstallString = "sudo apt-get install -y --allow-downgrades python3-tk tk-dev"
Execute-Command -Command "sudo apt-get update"
Execute-Command -Command $tkinterInstallString
@ -85,7 +74,8 @@ class UbuntuPythonBuilder : NixPythonBuilder {
"libsqlite3-dev",
"libncursesw5-dev",
"libreadline-dev",
"libgdbm-dev"
"libgdbm-dev",
"liblzma-dev"
) | ForEach-Object {
Execute-Command -Command "sudo apt install -y $_"
}