Skip to content

Commit

Permalink
tar.gz the file before uploading to preserve executable flags (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsadhwani authored May 23, 2024
1 parent 4131fb1 commit e0ebc36
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,34 @@ jobs:
pip install .
# aliens: requires no source
ALIENS_NAME="aliens-${{ matrix.target }}.bin"
ALIENS_NAME="aliens-${{ matrix.target }}.tar.gz"
ALIENS_PATH=${PWD}/${ALIENS_NAME}
packaged $ALIENS_NAME 'pip install pygame' 'python -m pygame.examples.aliens'
packaged ./aliens.bin 'pip install pygame' 'python -m pygame.examples.aliens'
tar czf $ALIENS_NAME ./aliens.bin
# textual: requires no source
TEXTUAL_NAME="textual-${{ matrix.target }}.bin"
TEXTUAL_NAME="textual-${{ matrix.target }}.tar.gz"
TEXTUAL_PATH=${PWD}/${TEXTUAL_NAME}
packaged $TEXTUAL_NAME 'pip install textual' 'python -m textual'
packaged ./textual.bin 'pip install textual' 'python -m textual'
tar czf $TEXTUAL_NAME ./textual.bin
# IPython: requires no source
IPYTHON_NAME="ipython-${{ matrix.target }}.bin"
IPYTHON_NAME="ipython-${{ matrix.target }}.tar.gz"
IPYTHON_PATH=${PWD}/${IPYTHON_NAME}
packaged $IPYTHON_NAME 'pip install ipython' 'ipython'
packaged ./ipython.bin 'pip install ipython' 'ipython'
tar czf $IPYTHON_NAME ./ipython.bin
# ./examples/mandelbrot
MANDELBROT_NAME="mandelbrot-${{ matrix.target }}.bin"
MANDELBROT_NAME="mandelbrot-${{ matrix.target }}.tar.gz"
MANDELBROT_PATH=${PWD}/${MANDELBROT_NAME}
packaged $MANDELBROT_NAME 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot
packaged ./mandelbrot.bin 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot
tar czf $MANDELBROT_NAME ./mandelbrot.bin
# ./examples/minesweeper
MINESWEEPER_NAME="minesweeper-${{ matrix.target }}.bin"
MINESWEEPER_NAME="minesweeper-${{ matrix.target }}.tar.gz"
MINESWEEPER_PATH=${PWD}/${MINESWEEPER_NAME}
packaged ./example/minesweeper
mv ./minesweeper.bin $MINESWEEPER_NAME
tar czf $MINESWEEPER_NAME ./minesweeper.bin
# Setup output paths for upload
echo Setting paths in output
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,34 @@ jobs:
shell: bash
run: |
# aliens: requires no source
ALIENS_NAME="aliens-${{ matrix.target }}.bin"
ALIENS_NAME="aliens-${{ matrix.target }}.tar.gz"
ALIENS_PATH=${PWD}/${ALIENS_NAME}
packaged $ALIENS_NAME 'pip install pygame' 'python -m pygame.examples.aliens'
packaged ./aliens.bin 'pip install pygame' 'python -m pygame.examples.aliens'
tar czf $ALIENS_NAME ./aliens.bin
# textual: requires no source
TEXTUAL_NAME="textual-${{ matrix.target }}.bin"
TEXTUAL_NAME="textual-${{ matrix.target }}.tar.gz"
TEXTUAL_PATH=${PWD}/${TEXTUAL_NAME}
packaged $TEXTUAL_NAME 'pip install textual' 'python -m textual'
packaged ./textual.bin 'pip install textual' 'python -m textual'
tar czf $TEXTUAL_NAME ./textual.bin
# IPython: requires no source
IPYTHON_NAME="ipython-${{ matrix.target }}.bin"
IPYTHON_NAME="ipython-${{ matrix.target }}.tar.gz"
IPYTHON_PATH=${PWD}/${IPYTHON_NAME}
packaged $IPYTHON_NAME 'pip install ipython' 'ipython'
packaged ./ipython.bin 'pip install ipython' 'ipython'
tar czf $IPYTHON_NAME ./ipython.bin
# ./examples/mandelbrot
MANDELBROT_NAME="mandelbrot-${{ matrix.target }}.bin"
MANDELBROT_NAME="mandelbrot-${{ matrix.target }}.tar.gz"
MANDELBROT_PATH=${PWD}/${MANDELBROT_NAME}
packaged $MANDELBROT_NAME 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot
packaged ./mandelbrot.bin 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot
tar czf $MANDELBROT_NAME ./mandelbrot.bin
# ./examples/minesweeper
MINESWEEPER_NAME="minesweeper-${{ matrix.target }}.bin"
MINESWEEPER_NAME="minesweeper-${{ matrix.target }}.tar.gz"
MINESWEEPER_PATH=${PWD}/${MINESWEEPER_NAME}
packaged ./example/minesweeper
mv ./minesweeper.bin $MINESWEEPER_NAME
tar czf $MINESWEEPER_NAME ./minesweeper.bin
# Setup output paths for upload
echo "ALIENS_NAME=${ALIENS_NAME}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit e0ebc36

Please sign in to comment.