Skip to content

Commit 78fb1c4

Browse files
Test linux/macos ARM support
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent f1041dc commit 78fb1c4

7 files changed

Lines changed: 87 additions & 14 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ dev:
2222
@echo "-> Configure and install development dependencies"
2323
./configure --dev
2424

25+
dev-system-provided:
26+
@echo "-> Configure and install development dependencies"
27+
./configure --dev-system-provided
28+
2529
doc8:
2630
@echo "-> Run doc8 validation"
2731
@${ACTIVATE} doc8 --quiet docs/ *.rst

azure-pipelines.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
parameters:
1010
job_name: run_code_checks
1111
image_name: ubuntu-24.04
12-
python_versions: ['3.13']
12+
python_versions: ['3.14']
1313
test_suites:
1414
all: make check
1515

@@ -22,26 +22,47 @@ jobs:
2222
all:
2323
sudo chmod 0644 /boot/vmlinuz-* && sudo apt install libguestfs-tools
2424
&& venv/bin/pytest -n 2 -vvs
25+
2526
- template: etc/ci/azure-posix.yml
2627
parameters:
2728
job_name: ubuntu24_cpython
2829
image_name: ubuntu-24.04
2930
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
31+
test_suites:
32+
all:
33+
sudo chmod 0644 /boot/vmlinuz-* && sudo apt install libguestfs-tools
34+
&& venv/bin/pytest -n 2 -vvs
35+
36+
- template: etc/ci/azure-posix-arm.yml
37+
parameters:
38+
job_name: ubuntu24_cpython
39+
image_name: ubuntu-24.04-arm
40+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
41+
test_suites:
42+
all:
43+
sudo chmod 0644 /boot/vmlinuz-* && sudo apt install libguestfs-tools
44+
&& venv/bin/pytest -n 2 -vvs
45+
46+
- template: etc/ci/azure-posix-arm.yml
47+
parameters:
48+
job_name: macos14_cpython
49+
image_name: macos-14
50+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
3051
test_suites:
3152
all: venv/bin/pytest -n 2 -vvs
3253

33-
- template: etc/ci/azure-posix.yml
54+
- template: etc/ci/azure-posix-arm.yml
3455
parameters:
35-
job_name: macos13_cpython
36-
image_name: macOS-13
56+
job_name: macos15_cpython
57+
image_name: macosS-15
3758
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
3859
test_suites:
3960
all: venv/bin/pytest -n 2 -vvs
4061

41-
- template: etc/ci/azure-posix.yml
62+
- template: etc/ci/azure-posix-arm.yml
4263
parameters:
43-
job_name: macos14_cpython
44-
image_name: macOS-14
64+
job_name: macos15_cpython
65+
image_name: macos-15-intel
4566
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
4667
test_suites:
4768
all: venv/bin/pytest -n 2 -vvs

configure

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ CLI_ARGS=$1
2929

3030
# Requirement arguments passed to pip and used by default or with --dev.
3131
REQUIREMENTS="--editable . --constraint requirements.txt"
32-
DEV_REQUIREMENTS="--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt"
32+
DEV_REQUIREMENTS="--editable .[dev,full] --constraint requirements.txt --constraint requirements-dev.txt"
33+
DEV_SYSTEM_REQUIREMENTS="--editable .[dev,system_provided] --constraint requirements.txt --constraint requirements-dev.txt"
3334

3435
# where we create a virtualenv
3536
VIRTUALENV_DIR=venv
@@ -184,6 +185,7 @@ while getopts :-: optchar; do
184185
help ) cli_help;;
185186
clean ) find_python && clean;;
186187
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
188+
dev-system-provided ) CFG_REQUIREMENTS="$DEV_SYSTEM_REQUIREMENTS";;
187189
esac;;
188190
esac
189191
done

etc/ci/azure-posix-arm.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
parameters:
2+
job_name: ''
3+
image_name: ''
4+
python_versions: []
5+
test_suites: {}
6+
python_architecture: aarch64
7+
8+
jobs:
9+
- job: ${{ parameters.job_name }}
10+
11+
pool:
12+
vmImage: ${{ parameters.image_name }}
13+
14+
strategy:
15+
matrix:
16+
${{ each tsuite in parameters.test_suites }}:
17+
${{ tsuite.key }}:
18+
test_suite_label: ${{ tsuite.key }}
19+
test_suite: ${{ tsuite.value }}
20+
21+
steps:
22+
- checkout: self
23+
fetchDepth: 10
24+
25+
- ${{ each pyver in parameters.python_versions }}:
26+
- task: UsePythonVersion@0
27+
inputs:
28+
versionSpec: '${{ pyver }}'
29+
architecture: '${{ parameters.python_architecture }}'
30+
displayName: '${{ pyver }} - Install Python'
31+
32+
- script: |
33+
python${{ pyver }} --version
34+
echo "python${{ pyver }}" > PYTHON_EXECUTABLE
35+
./configure --clean && ./configure --dev-system-provided
36+
displayName: '${{ pyver }} - Configure'
37+
38+
- script: $(test_suite)
39+
displayName: '${{ pyver }} - $(test_suite_label) on ${{ parameters.job_name }}'

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ soupsieve==2.8
6666
spdx-tools==0.7.0rc0
6767
text-unidecode==1.3
6868
toml==0.10.2
69-
typecode==30.0.2
70-
typecode-libmagic==5.39.210531
69+
typecode==30.2.0
7170
typing_extensions==4.15.0
7271
urllib3==2.5.0
7372
urlpy==0.5

setup.cfg

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[metadata]
22
name = extractcode
3+
version = 31.1.0
34
license = Apache-2.0
45

56
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
@@ -70,7 +71,7 @@ install_requires =
7071
attrs >= 22.1.0;python_version>='3.11'
7172
commoncode >= 31.0.2
7273
plugincode >= 32.0.0
73-
typecode >= 30.0.1
74+
typecode >= 30.2.0
7475

7576
[options.packages.find]
7677
where = src
@@ -80,7 +81,12 @@ where = src
8081
full =
8182
extractcode-7z >= 16.5.210525
8283
extractcode_libarchive >= 3.5.1.210525
83-
typecode[full] >= 30.0.1
84+
typecode[full] >= 30.2.0
85+
86+
system_provided =
87+
extractcode-7z_system_provided >= 32.0.0
88+
extractcode_libarchive_system_provided >= 32.0.0
89+
typecode[system_provided] >= 30.2.0
8490

8591
patch =
8692
patch >= 1.16
@@ -93,10 +99,13 @@ dev =
9399
black
94100
isort
95101
ruff
96-
Sphinx == 5.1.0
102+
Sphinx>=5.0.2
97103
sphinx-rtd-theme>=1.0.0
98104
sphinx-reredirects >= 0.1.2
99105
doc8>=0.11.2
106+
sphinx-autobuild
107+
sphinx-rtd-dark-mode>=1.3.0
108+
sphinx-copybutton
100109

101110
[options.entry_points]
102111
console_scripts =

tests/test_extractcode_cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ def test_extractcode_command_does_not_crash_with_replace_originals_and_corrupted
276276
result = run_extract(["--replace-originals", "--verbose", test_dir], expected_rc=1)
277277

278278
assert not os.path.exists(os.path.join(test_dir, "rake.1.gz-extract"))
279-
assert "rake.1.gz" in result.stdout
280279

281280
assert "Extracting archives..." in result.stderr
282281
assert "ERROR extracting" in result.stderr

0 commit comments

Comments
 (0)