Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 17 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
os: ["ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
exclude:
- os: "macos-latest"
Expand Down Expand Up @@ -163,47 +163,7 @@ jobs:
- name: Run tests with docker
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
run: nox -vs docker_test -- backblazeit/b2:test
test-linux-bundle:
timeout-minutes: 90
needs: cleanup_buckets
env:
B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }}
B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
runs-on: ubuntu-latest
container:
image: "python:3.12" # can not use ${{ env.PYTHON_DEFAULT_VERSION }} here
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
apt-get -y update
apt-get -y install patchelf
python -m pip install --upgrade nox pdm
git config --global --add safe.directory '*'
- name: Bundle the distribution
id: bundle
run: nox -vs bundle
- name: Generate hashes
id: hashes
run: nox -vs make_dist_digest
- name: Run integration tests (without secrets)
run: nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
- name: Run integration tests (with secrets)
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
run: nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
- name: Upload assets
if: failure()
uses: actions/upload-artifact@v4
with:
path: ${{ steps.bundle.outputs.asset_path }}
if-no-files-found: warn
retention-days: 7
overwrite: true
test-windows-bundle:
test-bundle:
timeout-minutes: 90
needs: cleanup_buckets
env:
Expand All @@ -213,16 +173,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, windows-2025]
os: ["ubuntu-22.04", "ubuntu-22.04-arm", "windows-2022"] # keep the versions aligned with cd.yml
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (deadsnakes)
if: startsWith(matrix.os, 'ubuntu')
uses: deadsnakes/[email protected] # staticx doesn't work with python installed by setup-python action
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (setup-python)
if: (!startsWith(matrix.os, 'ubuntu'))
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Install dependencies
- name: Install OS dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y update
sudo apt-get -y install patchelf
git config --global --add safe.directory '*'
- name: Install python dependencies
run: python -m pip install --upgrade nox pdm
- name: Bundle the distribution
id: bundle
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1099.infrastructure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prepare Linux binary for ARM.
3 changes: 2 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def _detect_python_nox_id() -> str:
DOCKER_TEMPLATE = pathlib.Path('docker/Dockerfile.template')

SYSTEM = platform.system().lower()
MACHINE = platform.machine().lower()

WINDOWS_TIMESTAMP_SERVER = 'http://timestamp.digicert.com'
WINDOWS_SIGNTOOL_PATH = 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe'
Expand Down Expand Up @@ -328,7 +329,7 @@ def bundle(session: nox.Session):

session.run('pyinstaller', *session.posargs, f'{binary_name}.spec')

if SYSTEM == 'linux' and not NO_STATICX:
if SYSTEM == 'linux' and MACHINE == "x86_64" and not NO_STATICX:
session.run(
'staticx',
'--no-compress',
Expand Down
8 changes: 4 additions & 4 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,5 @@ bundle = [
"pyinstaller<6,>=5.13; python_version < \"3.13\"",
"pyinstaller-hooks-contrib>=2023.6",
"patchelf-wrapper==1.2.0; platform_system == \"Linux\"",
"staticx~=0.13.9; platform_system == \"Linux\"",
"staticx~=0.13.9; platform_system == \"Linux\" and platform_machine == \"x86_64\"",
]
Loading