Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4b6fec4

Browse files
committedNov 14, 2024··
Add workflow for testing PyApp Linux builds
1 parent e5ca942 commit 4b6fec4

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
 

‎.github/workflows/test-pyapp.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: Test PyApp binaries creation
3+
4+
on: pull_request
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
10+
steps:
11+
- name: Checkout the code
12+
uses: actions/checkout@v4
13+
14+
- name: Install Poetry
15+
run: pipx install poetry
16+
17+
- name: Build package
18+
run: poetry build
19+
20+
- name: Store release files
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: release
24+
path: dist/
25+
26+
- name: Get version
27+
id: version
28+
run: echo "value=$(poetry version --short)" >> "$GITHUB_OUTPUT"
29+
30+
outputs:
31+
version: ${{ steps.version.outputs.value }}
32+
33+
pyapp-linux:
34+
runs-on: ubuntu-24.04
35+
needs:
36+
- build
37+
38+
steps:
39+
- name: Fetch release files
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: release
43+
path: dist/
44+
45+
- name: Prepare wheel
46+
run: |
47+
cp dist/alga-${{ needs.build.outputs.version }}-py3-none-any.whl alga.whl
48+
49+
- name: Get PyApp
50+
run: |
51+
mkdir pyapp
52+
curl \
53+
--location \
54+
https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz | \
55+
tar xz \
56+
--directory=pyapp \
57+
--strip-components=1
58+
59+
- name: Create binary
60+
env:
61+
PYAPP_PROJECT_NAME: alga
62+
PYAPP_PROJECT_PATH: ../alga.whl
63+
working-directory: pyapp/
64+
run: cargo build --release
65+
66+
- name: Rename
67+
run: cp pyapp/target/release/pyapp alga-linux-amd64
68+
69+
- name: Make built file available
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: binary
73+
path: alga-linux-amd64

0 commit comments

Comments
 (0)