Skip to content

Commit

Permalink
chore: adapt linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
SteinRobert committed Apr 16, 2024
1 parent 1626b93 commit 59e60e3
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/dist-build-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Build Linux binary

env:
PYOXIDIZER_DOWNLOAD: https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.18.0/pyoxidizer-0.18.0-linux-x86_64.zip
PYAPP_DOWNLOAD: https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz -Lo pyapp-source.tar.gz

on:
workflow_dispatch: {}
Expand All @@ -25,19 +25,26 @@ jobs:
python-version: '3.9'
- name: Setup PyOxidizer and build
working-directory: client/
env:
PYAPP_PROJECT_NAME: gefyra
PYAPP_EXEC_SPEC: gefyra.cli.main:main
PYAPP_PIP_EXTRA_ARGS: click alive-progress tabulate cli-tracker
PYAPP_DISTRIBUTION_EMBED: 1
PYAPP_SKIP_INSTALL: 1
run: |
wget ${PYOXIDIZER_DOWNLOAD}
unzip pyoxidizer-0.18.0-linux-x86_64.zip
sudo chmod +x ./pyoxidizer
./pyoxidizer build exe --release
cat pyproject.toml | grep version -m 1 | awk '{ print "PYAPP_PROJECT_VERSION="substr($3, 2, length($3) -2)}' >> $GITHUB_ENV
curl ${PYAPP_DOWNLOAD}
tar -xzf pyapp-source.tar.gz
mv pyapp-v* pyapp-latest
cd pyapp-latest
cargo build --release
cp `find build/ -name "gefyra"` ../gefyra
strip -s ../gefyra
mv target/release/pyapp ../gefyra && chmod +x ../gefyra
cp README.md ../README.md
cat pyproject.toml | grep version -m 1 | awk '{ print "APP_VERSION="substr($3, 2, length($3) -2)}' >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: gefyra-${{ env.APP_VERSION }}-linux-amd64
name: gefyra-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64
path: |
gefyra
LICENSE
Expand Down

0 comments on commit 59e60e3

Please sign in to comment.