Skip to content

Commit 7d7c8b1

Browse files
committed
Add ARM64 support and enable workflows on feature branch
- Add ARM64 testing for Linux (ubuntu-latest-arm) and macOS (macos-latest-xlarge) - Use reduced Python version matrix for ARM64 (3.11, 3.12) to optimize CI time - Update cache keys to include architecture for proper isolation - Enable workflows on improve-github-actions branch for testing - ARM64 runners provide better coverage for Apple Silicon and ARM64 servers
1 parent a6feb5f commit 7d7c8b1

File tree

3 files changed

+80
-12
lines changed

3 files changed

+80
-12
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Packages
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, improve-github-actions ]
66
tags: [ 'v*' ]
77
pull_request:
88
branches: [ master ]
@@ -13,8 +13,24 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [ubuntu-latest, macos-latest, windows-latest]
17-
python-version: ["3.11"] # Use single Python version for builds
16+
include:
17+
# x86_64 runners
18+
- os: ubuntu-latest
19+
arch: x64
20+
python-version: "3.11"
21+
- os: macos-latest
22+
arch: x64
23+
python-version: "3.11"
24+
- os: windows-latest
25+
arch: x64
26+
python-version: "3.11"
27+
# ARM64 runners
28+
- os: ubuntu-latest-arm
29+
arch: arm64
30+
python-version: "3.11"
31+
- os: macos-latest-xlarge
32+
arch: arm64
33+
python-version: "3.11"
1834

1935
steps:
2036
- uses: actions/checkout@v5
@@ -31,9 +47,10 @@ jobs:
3147
~/.cache/pip
3248
~/AppData/Local/pip/Cache
3349
~/Library/Caches/pip
34-
key: ${{ runner.os }}-pip-build-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
50+
key: ${{ runner.os }}-${{ matrix.arch }}-pip-build-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
3551
restore-keys: |
36-
${{ runner.os }}-pip-build-
52+
${{ runner.os }}-${{ matrix.arch }}-pip-build-
53+
${{ runner.os }}-${{ matrix.arch }}-pip-
3754
${{ runner.os }}-pip-
3855
3956
- name: Install build dependencies
@@ -90,7 +107,7 @@ jobs:
90107
- name: Upload build artifacts
91108
uses: actions/upload-artifact@v4
92109
with:
93-
name: dnsdiag-${{ runner.os }}-${{ runner.arch }}
110+
name: dnsdiag-${{ runner.os }}-${{ matrix.arch }}
94111
path: pkg/dnsdiag-*.*
95112
retention-days: 7
96113

.github/workflows/security.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Security Scan
22

33
on:
44
push:
5-
branches: [ master, develop ]
5+
branches: [ master, develop, improve-github-actions ]
66
pull_request:
77
branches: [ master ]
88
schedule:
@@ -24,8 +24,9 @@ jobs:
2424
uses: actions/cache@v4
2525
with:
2626
path: ~/.cache/pip
27-
key: ubuntu-latest-pip-security-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
27+
key: ubuntu-latest-x64-pip-security-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
2828
restore-keys: |
29+
ubuntu-latest-x64-pip-security-
2930
ubuntu-latest-pip-security-
3031
ubuntu-latest-pip-
3132

.github/workflows/test.yml

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ master, develop ]
5+
branches: [ master, develop, improve-github-actions ]
66
pull_request:
77
branches: [ master ]
88

@@ -12,8 +12,57 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ubuntu-latest, macos-latest, windows-latest]
16-
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
include:
16+
# x86_64 runners
17+
- os: ubuntu-latest
18+
arch: x64
19+
python-version: "3.10"
20+
- os: ubuntu-latest
21+
arch: x64
22+
python-version: "3.11"
23+
- os: ubuntu-latest
24+
arch: x64
25+
python-version: "3.12"
26+
- os: ubuntu-latest
27+
arch: x64
28+
python-version: "3.13"
29+
- os: macos-latest
30+
arch: x64
31+
python-version: "3.10"
32+
- os: macos-latest
33+
arch: x64
34+
python-version: "3.11"
35+
- os: macos-latest
36+
arch: x64
37+
python-version: "3.12"
38+
- os: macos-latest
39+
arch: x64
40+
python-version: "3.13"
41+
- os: windows-latest
42+
arch: x64
43+
python-version: "3.10"
44+
- os: windows-latest
45+
arch: x64
46+
python-version: "3.11"
47+
- os: windows-latest
48+
arch: x64
49+
python-version: "3.12"
50+
- os: windows-latest
51+
arch: x64
52+
python-version: "3.13"
53+
# ARM64 runners
54+
- os: ubuntu-latest-arm
55+
arch: arm64
56+
python-version: "3.11"
57+
- os: ubuntu-latest-arm
58+
arch: arm64
59+
python-version: "3.12"
60+
- os: macos-latest-xlarge
61+
arch: arm64
62+
python-version: "3.11"
63+
- os: macos-latest-xlarge
64+
arch: arm64
65+
python-version: "3.12"
1766

1867
steps:
1968
- uses: actions/checkout@v5
@@ -30,8 +79,9 @@ jobs:
3079
~/.cache/pip
3180
~/AppData/Local/pip/Cache
3281
~/Library/Caches/pip
33-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
82+
key: ${{ runner.os }}-${{ matrix.arch }}-pip-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
3483
restore-keys: |
84+
${{ runner.os }}-${{ matrix.arch }}-pip-
3585
${{ runner.os }}-pip-
3686
3787
- name: Install dependencies

0 commit comments

Comments
 (0)