Skip to content

Commit c7b069a

Browse files
authored
Simplify Python version selection for latest stable (#933)
1 parent 1e4a97f commit c7b069a

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.github/workflows/aot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
os:
1717
- ubuntu-latest
1818
architecture: [x64]
19-
python-version: ['3.10']
19+
python-version: ['3.x']
2020
julia-version:
2121
- '1'
2222
- '~1.7.0-rc1'

.github/workflows/system.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- macos-latest
1919
- windows-latest
2020
architecture: [x64]
21-
python-version: ['3.10']
21+
python-version: ['3.x']
2222
julia-version:
2323
- '1.0'
2424
- '1'
@@ -27,7 +27,7 @@ jobs:
2727
# 32 bit Windows:
2828
- os: windows-latest
2929
architecture: x86
30-
python-version: '3.9' # 3.10 not available yet?
30+
python-version: '3.x'
3131
julia-version: '1.5'
3232
# Sweep python-version and julia-version only on Ubuntu:
3333
- os: ubuntu-latest
@@ -36,11 +36,11 @@ jobs:
3636
julia-version: '1'
3737
- os: ubuntu-latest
3838
architecture: x64
39-
python-version: '3.10'
39+
python-version: '3.x'
4040
julia-version: '1.5'
4141
- os: ubuntu-latest
4242
architecture: x64
43-
python-version: '3.10'
43+
python-version: '3.x'
4444
julia-version: '1.4'
4545
# Test Python 2.7 only with a few combinations (TODO: drop 2.7).
4646
# Note that it does not work in macOS:

test/check_deps_version.jl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
using Test
2-
const desired_version = VersionNumber(ARGS[1])
2+
const desired_version_str = ARGS[1] # e.g., "2.7", "3.10.0", "3.x"
33
include("../deps/deps.jl")
4-
@testset "pyversion_build ≈ $desired_version" begin
4+
@testset "pyversion_build ≈ $desired_version_str" begin
5+
v = desired_version_str
6+
while endswith(v, ".x")
7+
v = v[1:end-2]
8+
end
9+
desired_version = VersionNumber(v)
510
@test desired_version.major == pyversion_build.major
6-
@test desired_version.minor == pyversion_build.minor
11+
if desired_version.minor != 0
12+
@test desired_version.minor == pyversion_build.minor
13+
end
714
if desired_version.patch != 0
815
@test desired_version.patch == pyversion_build.patch
916
end

0 commit comments

Comments
 (0)