Skip to content

Commit

Permalink
Merge pull request #28 from AdamOlech/build-static-binary
Browse files Browse the repository at this point in the history
Build a static binary using pyinstaller and staticx
  • Loading branch information
mgielda committed Jan 13, 2021
2 parents c8181fa + ccd89e3 commit 07cb39c
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ on:
branches: [ master ]

jobs:
build:

test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -27,3 +25,25 @@ jobs:
run: pip install .
- name: Run tests
run: bash .github/workflows/test.sh
build-static:
runs-on: ubuntu-18.04
needs: [test]
steps:
- uses: actions/checkout@v2
- name: Install build tools
run: |
sudo apt -qqy update && sudo apt -qqy install patchelf build-essential python3-pip git zlib1g-dev python3-setuptools python3-venv python3-wheel
git clone https://github.com/pyinstaller/pyinstaller.git
cd pyinstaller/bootloader && CC="gcc -no-pie" python3 waf configure all && cd -
cd pyinstaller && sudo python3 setup.py install && cd -
sudo pip3 install staticx
- name: Install tuttest dependencies
run: python setup.py egg_info && pip3 install -r *.egg-info/requires.txt
- name: Build static binary
run: |
pyinstaller -F bin/tuttest
staticx dist/tuttest tuttest_static
- uses: actions/upload-artifact@v2
with:
name: tuttest_static
path: tuttest_static

0 comments on commit 07cb39c

Please sign in to comment.