Skip to content

Commit

Permalink
Distribute flameshow with PyOxidizer (pyinstaller does not work)
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Nov 24, 2023
1 parent 6dc4d43 commit d226b1f
Show file tree
Hide file tree
Showing 9 changed files with 363 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Install dependencies
run: |
pip install pyinstaller
pip install PyOxidizer
# nfpm
curl -sS -Lo /tmp/nfpm.deb "https://github.com/goreleaser/nfpm/releases/download/v2.25.0/nfpm_amd64.deb"
sudo dpkg -i /tmp/nfpm.deb
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Install dependencies
run: |
pip install pyinstaller
pip install PyOxidizer
# nfpm
curl -sS -Lo /tmp/nfpm.deb "https://github.com/goreleaser/nfpm/releases/download/v2.25.0/nfpm_amd64.deb"
sudo dpkg -i /tmp/nfpm.deb
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# cargo
/target
/vendor
# pyinstaller
/build
/dist
*.spec
# PyOxidizer
build
# distribution
dist
# packages
*.deb
*.tar.*
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ chdig:

.ONESHELL:
flameshow:
poetry -C $(PWD)/contrib/flameshow install --no-root --all-extras
source $(shell poetry -C $(PWD)/contrib/flameshow env info --path)/bin/activate && pyinstaller --noconfirm --onefile contrib/flameshow/flameshow/main.py
# main is the flameshow
ln -r -f -s dist/main dist/chdig-flameshow
pyoxidizer build --release --path contrib/flameshow
ln -rfs contrib/flameshow/build/x86_64-unknown-linux-gnu/release/install/flameshow dist/chdig-flameshow
# strip: 98MiB -> 76MiB
# gzip compression: 76MiB -> 25MiB
strip dist/chdig-flameshow

build: chdig flameshow link

Expand Down
1 change: 0 additions & 1 deletion contrib/flameshow
Submodule flameshow deleted from ccffe0
Loading

0 comments on commit d226b1f

Please sign in to comment.