Skip to content

Commit 4088110

Browse files
Fix native build command (#3)
1 parent cd4e92e commit 4088110

2 files changed

Lines changed: 54 additions & 4 deletions

File tree

.github/workflows/test_native.yml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [ "main" ]
66

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

1111
runs-on: ubuntu-latest
@@ -23,11 +23,59 @@ jobs:
2323
- name: Assert packages have created
2424
run: |
2525
set -e
26+
ls -l dist
2627
ls dist/test-module-1.0.0.tar.gz
2728
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
2829
ls dist/python3-test-module_1.0.0_all.deb
2930
30-
test-native-application:
31+
test-native-library-custom-command:
32+
name: Test creating native library packages
33+
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up test environment
39+
run: cp -a test/. .
40+
41+
- name: Create library packages
42+
uses: ./native
43+
with:
44+
debian-dist-type: 'library'
45+
debian-dist-command: 'fpm -s python -t deb --package dist --force --log warn setup.py'
46+
47+
- name: Assert packages have created
48+
run: |
49+
set -e
50+
ls -l dist
51+
ls dist/test-module-1.0.0.tar.gz
52+
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
53+
ls dist/python-test-module_1.0.0_all.deb
54+
55+
test-native-application-default-command:
56+
name: Test creating native application packages
57+
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Set up test environment
63+
run: cp -a test/. .
64+
65+
- name: Create application packages
66+
uses: ./native
67+
with:
68+
debian-dist-type: 'application'
69+
70+
- name: Assert packages have created
71+
run: |
72+
set -e
73+
ls -l dist
74+
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
77+
78+
test-native-application-custom-command:
3179
name: Test creating native application packages
3280

3381
runs-on: ubuntu-latest
@@ -41,10 +89,12 @@ jobs:
4189
uses: ./native
4290
with:
4391
debian-dist-type: 'application'
92+
debian-dist-command: 'dpkg-buildpackage -us -ui -uc -tc'
4493

4594
- name: Assert packages have created
4695
run: |
4796
set -e
97+
ls -l dist
4898
ls dist/test-module-1.0.0.tar.gz
4999
ls dist/test_module-1.0.0-py3-none-linux_x86_64.whl
50100
ls dist/test-module_1.0.0_amd64.deb

native/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ runs:
4646
sudo apt-get install -y ruby ruby-dev rubygems build-essential
4747
sudo gem install -N fpm
4848
49-
COMMAND=${{ inputs.debian-dist-command }}
49+
COMMAND="${{ inputs.debian-dist-command }}"
5050
5151
# Default FPM command
5252
COMMAND=${COMMAND:-"fpm -s python -t deb --package dist --force --log warn --python-bin python3 --python-package-name-prefix python3 setup.py"}
@@ -59,7 +59,7 @@ runs:
5959
sudo apt-get update
6060
sudo apt-get install -y build-essential debhelper devscripts equivs dh-virtualenv python3-virtualenv
6161
62-
COMMAND=${{ inputs.debian-dist-command }}
62+
COMMAND="${{ inputs.debian-dist-command }}"
6363
6464
# Default dh-virtualenv command
6565
COMMAND=${COMMAND:-"dpkg-buildpackage -us -ui -uc -tc"}

0 commit comments

Comments
 (0)