Skip to content

Commit 2907400

Browse files
Update naming: cross build -> devcontainer, library -> fpm-deb, application -> dh-virtualenv (#8)
1 parent 9c4a743 commit 2907400

10 files changed

Lines changed: 301 additions & 172 deletions

File tree

.github/workflows/test_cross.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Test Python packaging with devcontainer
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
test-devcontainer-arm32v7:
9+
name: Test creating arm32v7 packages
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up test environment
16+
run: |
17+
cp -a test/. .
18+
rm -rf dist
19+
20+
- name: Create packages
21+
uses: ./devcontainer
22+
with:
23+
container-platform: 'linux/arm/v7'
24+
container-config: 'arm32v7'
25+
packaging-command: python3 setup.py sdist bdist_wheel
26+
27+
- name: Assert packages have created
28+
run: |
29+
set -e
30+
ls -l dist
31+
ls dist/test-module-1.0.0.tar.gz
32+
ls dist/test_module-1.0.0-py3-none-any.whl
33+
34+
test-devcontainer-arm64v8:
35+
name: Test creating arm64v8 packages
36+
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Set up test environment
42+
run: |
43+
cp -a test/. .
44+
rm -rf dist
45+
46+
- name: Create packages
47+
uses: ./devcontainer
48+
with:
49+
container-platform: 'linux/arm64'
50+
container-config: 'arm64v8'
51+
packaging-command: python3 setup.py sdist bdist_wheel
52+
53+
- name: Assert packages have created
54+
run: |
55+
set -e
56+
ls -l dist
57+
ls dist/test-module-1.0.0.tar.gz
58+
ls dist/test_module-1.0.0-py3-none-any.whl
59+
60+
test-devcontainer-amd64:
61+
name: Test creating amd64 packages
62+
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Set up test environment
68+
run: |
69+
cp -a test/. .
70+
rm -rf dist
71+
72+
- name: Create packages
73+
uses: ./devcontainer
74+
with:
75+
packaging-command: python3 setup.py sdist bdist_wheel
76+
77+
- name: Assert packages have created
78+
run: |
79+
set -e
80+
ls -l dist
81+
ls dist/test-module-1.0.0.tar.gz
82+
ls dist/test_module-1.0.0-py3-none-any.whl

.github/workflows/test_main.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,73 +5,82 @@ on:
55
branches: [ "main" ]
66

77
jobs:
8-
test-main-library:
9-
name: Test creating library packages
8+
test-main-fpm-deb:
9+
name: Test creating packages (fpm-deb)
1010

1111
runs-on: ubuntu-latest
1212

1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set up test environment
16-
run: cp -a test/. .
16+
run: |
17+
cp -a test/. .
18+
rm -rf dist
1719
18-
- name: Create library packages
20+
- name: Create packages
1921
uses: ./
2022
with:
2123
package-version: '1.1.0'
22-
debian-dist-type: 'library'
24+
debian-dist-type: 'fpm-deb'
2325

2426
- name: Assert packages have created
2527
run: |
2628
set -e
29+
ls -l dist
2730
ls dist/test-module-1.1.0.tar.gz
28-
ls dist/test_module-1.1.0-py3-none-linux_x86_64.whl
31+
ls dist/test_module-1.1.0-py3-none-any.whl
2932
ls dist/python3-test-module_1.1.0_all.deb
3033
31-
test-main-application:
32-
name: Test creating application packages
34+
test-main-dh-virtualenv:
35+
name: Test creating packages (dh-virtualenv)
3336

3437
runs-on: ubuntu-latest
3538

3639
steps:
3740
- uses: actions/checkout@v4
3841
- name: Set up test environment
39-
run: cp -a test/. .
42+
run: |
43+
cp -a test/. .
44+
rm -rf dist
4045
41-
- name: Create library packages
46+
- name: Create packages
4247
uses: ./
4348
with:
4449
package-version: '1.1.0'
45-
debian-dist-type: 'application'
50+
debian-dist-type: 'dh-virtualenv'
4651

4752
- name: Assert packages have created
4853
run: |
4954
set -e
55+
ls -l dist
5056
ls dist/test-module-1.1.0.tar.gz
51-
ls dist/test_module-1.1.0-py3-none-linux_x86_64.whl
52-
ls dist/test-module_1.1.0_amd64.deb
57+
ls dist/test_module-1.1.0-py3-none-any.whl
58+
ls dist/test-module_1.1.0-1_all.deb
5359
54-
test-main-cross:
55-
name: Test creating cross packages
60+
test-main-devcontainer:
61+
name: Test creating packages (devcontainer)
5662

5763
runs-on: ubuntu-latest
5864

5965
steps:
6066
- uses: actions/checkout@v4
6167
- name: Set up test environment
62-
run: cp -a test/. .
68+
run: |
69+
cp -a test/. .
70+
rm -rf dist
6371
64-
- name: Create library packages
72+
- name: Create packages
6573
uses: ./
6674
with:
6775
package-version: '1.1.0'
68-
debian-dist-type: 'application'
69-
is-cross-platform: 'true'
70-
devcontainer-config: 'arm64v8'
71-
devcontainer-command: python setup.py sdist bdist_wheel
76+
use-devcontainer: 'true'
77+
container-platform: 'linux/arm64'
78+
container-config: 'arm64v8'
79+
packaging-command: python3 setup.py sdist bdist_wheel
7280

7381
- name: Assert packages have created
7482
run: |
7583
set -e
84+
ls -l dist
7685
ls dist/test-module-1.1.0.tar.gz
77-
ls dist/test_module-1.1.0-py3-none-linux_aarch64.whl
86+
ls dist/test_module-1.1.0-py3-none-any.whl

.github/workflows/test_native.yml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,96 +5,104 @@ on:
55
branches: [ "main" ]
66

77
jobs:
8-
test-native-library-default-command:
9-
name: Test creating native library packages
8+
test-native-fpm-deb-default-command:
9+
name: Test creating native fpm-deb packages
1010

1111
runs-on: ubuntu-latest
1212

1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set up test environment
16-
run: cp -a test/. .
16+
run: |
17+
cp -a test/. .
18+
rm -rf dist
1719
18-
- name: Create library packages
20+
- name: Create packages
1921
uses: ./native
2022
with:
21-
debian-dist-type: 'library'
23+
debian-dist-type: 'fpm-deb'
2224

2325
- name: Assert packages have created
2426
run: |
2527
set -e
2628
ls -l dist
2729
ls dist/test-module-1.0.0.tar.gz
28-
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
30+
ls dist/test_module-1.0.0-py3-none-any.whl
2931
ls dist/python3-test-module_1.0.0_all.deb
3032
31-
test-native-library-custom-command:
32-
name: Test creating native library packages
33+
test-native-fpm-deb-custom-command:
34+
name: Test creating native fpm-deb packages
3335

3436
runs-on: ubuntu-latest
3537

3638
steps:
3739
- uses: actions/checkout@v4
3840
- name: Set up test environment
39-
run: cp -a test/. .
41+
run: |
42+
cp -a test/. .
43+
rm -rf dist
4044
41-
- name: Create library packages
45+
- name: Create packages
4246
uses: ./native
4347
with:
44-
debian-dist-type: 'library'
48+
debian-dist-type: 'fpm-deb'
4549
debian-dist-command: 'fpm -s python -t deb --package dist --force --log warn setup.py'
4650

4751
- name: Assert packages have created
4852
run: |
4953
set -e
5054
ls -l dist
5155
ls dist/test-module-1.0.0.tar.gz
52-
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
56+
ls dist/test_module-1.0.0-py3-none-any.whl
5357
ls dist/python-test-module_1.0.0_all.deb
5458
55-
test-native-application-default-command:
56-
name: Test creating native application packages
59+
test-native-dh-virtualenv-default-command:
60+
name: Test creating native dh-virtualenv packages
5761

5862
runs-on: ubuntu-latest
5963

6064
steps:
6165
- uses: actions/checkout@v4
6266
- name: Set up test environment
63-
run: cp -a test/. .
67+
run: |
68+
cp -a test/. .
69+
rm -rf dist
6470
65-
- name: Create application packages
71+
- name: Create packages
6672
uses: ./native
6773
with:
68-
debian-dist-type: 'application'
74+
debian-dist-type: 'dh-virtualenv'
6975

7076
- name: Assert packages have created
7177
run: |
7278
set -e
7379
ls -l dist
7480
ls dist/test-module-1.0.0.tar.gz
75-
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
76-
ls dist/test-module_1.0.0_amd64.deb
81+
ls dist/test_module-1.0.0-py3-none-any.whl
82+
ls dist/test-module_1.0.0-1_all.deb
7783
78-
test-native-application-custom-command:
79-
name: Test creating native application packages
84+
test-native-dh-virtualenv-custom-command:
85+
name: Test creating native dh-virtualenv packages
8086

8187
runs-on: ubuntu-latest
8288

8389
steps:
8490
- uses: actions/checkout@v4
8591
- name: Set up test environment
86-
run: cp -a test/. .
92+
run: |
93+
cp -a test/. .
94+
rm -rf dist
8795
88-
- name: Create application packages
96+
- name: Create packages
8997
uses: ./native
9098
with:
91-
debian-dist-type: 'application'
99+
debian-dist-type: 'dh-virtualenv'
92100
debian-dist-command: 'dpkg-buildpackage -us -ui -uc -tc'
93101

94102
- name: Assert packages have created
95103
run: |
96104
set -e
97105
ls -l dist
98106
ls dist/test-module-1.0.0.tar.gz
99-
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
107+
ls dist/test_module-1.0.0-py3-none-any.whl
100108
ls dist/test-module_1.0.0_amd64.deb

0 commit comments

Comments
 (0)