@@ -2,45 +2,57 @@ name: build
22on : [push, workflow_dispatch]
33
44jobs :
5- build-for-linux :
6- runs-on : ubuntu-latest
7- steps :
8- - name : checkout repository
9- uses : actions/checkout@v4
10- - name : setup python
11- uses : actions/setup-python@v4
12- with :
13- python-version : 3.12
14- - name : setup Node.js
15- uses : actions/setup-node@v4
16- with :
17- cache-dependency-path : integration-runner/package-lock.json
18- node-version : 22.1
19- cache : npm
20- - name : install dependencies
21- shell : bash
22- run : |
23- pip install -r requirements.txt --upgrade
24- maturin build --release
25- pip install $(find ./target/wheels/*.whl)
26- cd integration-runner
27- npm i
28- - name : build
29- shell : bash
30- run : |
31- pyinstaller main.py --onefile --name=liquidWeb-cli
32- pyinstaller framereceiver.py --onefile --name=frame-receiver
33- pyinstaller hardwareserver.py --onefile --name=hardware-server
34- cd integration-runner
35- npm run package
36- - name : package
37- shell : bash
38- run : |
39- mkdir ./dist/modules
40- mv ./dist/frame-receiver ./dist/modules/
41- mv ./dist/hardware-server ./dist/modules/
42- mv ./integration-runner/out/integration-runner-linux-x64/ ./dist/modules/
43- - uses : actions/upload-artifact@v4
44- with :
45- name : Artifacts
46- path : dist/*
5+ build-rpm :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - name : checkout repository
9+ uses : actions/checkout@v4
10+ - name : setup python
11+ uses : actions/setup-python@v4
12+ with :
13+ python-version : 3.12
14+ - name : setup Node.js
15+ uses : actions/setup-node@v4
16+ with :
17+ cache-dependency-path : integration-runner/package-lock.json
18+ node-version : 22.1
19+ cache : npm
20+ - name : install rpm tooling
21+ run : sudo apt-get update && sudo apt-get install -y rpm
22+ - name : install dependencies
23+ run : |
24+ pip install -r requirements.txt --upgrade
25+ maturin build --release
26+ pip install $(find ./target/wheels/*.whl)
27+ cd integration-runner
28+ npm i
29+ - name : build
30+ run : |
31+ pyinstaller framereceiver.py --onefile --name=frame-receiver
32+ pyinstaller hardwareserver.py --onefile --name=hardware-server
33+ cd integration-runner
34+ npm run package
35+ - name : package
36+ run : |
37+ mkdir -p dist/liquidWeb
38+ mkdir -p dist/liquidWeb/bin
39+ mkdir -p dist/liquidWeb/systemd
40+ mv dist/frame-receiver dist/liquidWeb/bin/
41+ mv dist/hardware-server dist/liquidWeb/bin/
42+ mv integration-runner/out/integration-runner-linux-x64 dist/liquidWeb/integration-runner
43+ cp systemd/*.service dist/liquidWeb/systemd/
44+ cp systemd/*.target dist/liquidWeb/systemd/
45+ - name : prepare rpm sources
46+ run : |
47+ mkdir -p rpmbuild/SOURCES
48+ cp -r dist/liquidWeb liquidWeb
49+ tar czf rpmbuild/SOURCES/liquidWeb.tar.gz liquidWeb
50+ - name : build rpm
51+ run : |
52+ rpmbuild \
53+ --define "_topdir $(pwd)/rpmbuild" \
54+ -ba liquidWeb.spec
55+ - uses : actions/upload-artifact@v4
56+ with :
57+ name : liquidWeb-rpm
58+ path : rpmbuild/RPMS/**/*.rpm
0 commit comments