Skip to content

Commit ffe635b

Browse files
committed
Create one generic test-bundle for Linux and Windows
1 parent 310f173 commit ffe635b

File tree

3 files changed

+22
-50
lines changed

3 files changed

+22
-50
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -163,47 +163,7 @@ jobs:
163163
- name: Run tests with docker
164164
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
165165
run: nox -vs docker_test -- backblazeit/b2:test
166-
test-linux-bundle:
167-
timeout-minutes: 90
168-
needs: cleanup_buckets
169-
env:
170-
B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }}
171-
B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
172-
runs-on: ubuntu-latest
173-
container:
174-
image: "python:3.12" # can not use ${{ env.PYTHON_DEFAULT_VERSION }} here
175-
env:
176-
DEBIAN_FRONTEND: noninteractive
177-
steps:
178-
- uses: actions/checkout@v4
179-
with:
180-
fetch-depth: 0
181-
- name: Install dependencies
182-
run: |
183-
apt-get -y update
184-
apt-get -y install patchelf
185-
python -m pip install --upgrade nox pdm
186-
git config --global --add safe.directory '*'
187-
- name: Bundle the distribution
188-
id: bundle
189-
run: nox -vs bundle
190-
- name: Generate hashes
191-
id: hashes
192-
run: nox -vs make_dist_digest
193-
- name: Run integration tests (without secrets)
194-
run: nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
195-
- name: Run integration tests (with secrets)
196-
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
197-
run: nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
198-
- name: Upload assets
199-
if: failure()
200-
uses: actions/upload-artifact@v4
201-
with:
202-
path: ${{ steps.bundle.outputs.asset_path }}
203-
if-no-files-found: warn
204-
retention-days: 7
205-
overwrite: true
206-
test-windows-bundle:
166+
test-bundle:
207167
timeout-minutes: 90
208168
needs: cleanup_buckets
209169
env:
@@ -213,16 +173,28 @@ jobs:
213173
strategy:
214174
fail-fast: false
215175
matrix:
216-
os: [windows-latest, windows-2025]
176+
os: ["ubuntu-22.04", "ubuntu-22.04-arm", "windows-2022"] # keep the versions aligned with cd.yml
217177
steps:
218178
- uses: actions/checkout@v4
219179
with:
220180
fetch-depth: 0
221-
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
181+
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (deadsnakes)
182+
if: startsWith(matrix.os, 'ubuntu')
183+
uses: deadsnakes/[email protected] # staticx doesn't work with python installed by setup-python action
184+
with:
185+
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
186+
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (setup-python)
187+
if: (!startsWith(matrix.os, 'ubuntu'))
222188
uses: actions/setup-python@v5
223189
with:
224190
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
225-
- name: Install dependencies
191+
- name: Install OS dependencies
192+
if: startsWith(matrix.os, 'ubuntu')
193+
run: |
194+
sudo apt-get -y update
195+
sudo apt-get -y install patchelf scons
196+
git config --global --add safe.directory '*'
197+
- name: Install python dependencies
226198
run: python -m pip install --upgrade nox pdm
227199
- name: Bundle the distribution
228200
id: bundle

pdm.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,5 @@ bundle = [
221221
"pyinstaller<6,>=5.13; python_version < \"3.13\"",
222222
"pyinstaller-hooks-contrib>=2023.6",
223223
"patchelf-wrapper==1.2.0; platform_system == \"Linux\"",
224-
"staticx~=0.13.9; platform_system == \"Linux\"",
224+
"staticx~=0.14.1; platform_system == \"Linux\"",
225225
]

0 commit comments

Comments
 (0)