1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
# This is a basic workflow to help you get started with Actions
name: CD_LINUX
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_linux:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
QT_QPA_PLATFORM: offscreen
folder_name: 'DioptasLinux'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- run: git fetch --prune --unshallow
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Apt Dependencies
run: |
sudo apt-get update
sudo apt-get install python3-opengl libgl1-mesa-dev libglib2.0-0
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- name: Install poetry dependencies
run: poetry install
- name: Install PyInstaller
run: poetry run pip install pyinstaller
- name: Add Dynamic Versioning Plugin
run: poetry self add poetry-dynamic-versioning[plugin]
- name: Update the Version
run: poetry dynamic-versioning
- name: Run Dioptas from source to test
run: poetry run python run.py test
- name: Run PyInstaller
run: poetry run bash create_executable.sh
- name: Run Dioptas from newly created executable to test
run: |
cd dist/Dioptas*
xvfb-run -e /dev/stdout ./Dioptas test
- name: Determine Folder Name
run: |
cd dist
echo "folder_name=$(ls | grep Dioptas)" >> $GITHUB_ENV
- name: Upload Compressed App as Artifact to GitHub
uses: actions/upload-artifact@v4
with:
name: ${{ env.folder_name }}
path: dist/${{ env.folder_name }}
# DROPBOX UPLOAD
# disabled for now, since we can use the GitHub artifacts
# - name: Compress Executable
# run: |
# cd dist
# export DIOPTAS_FOLDER=$(ls | grep Dioptas)
# tar -zcvf $DIOPTAS_FOLDER.tar.gz $DIOPTAS_FOLDER
# du -sh $DIOPTAS_FOLDER.tar.gz
# - name: Upload Compressed App to Dropbox
# env:
# DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}
# run: |
# pip install dropbox
# cd dist
# export compressedFile=$(ls | grep .tar.gz)
# export targetFile='/develop/linux/'$compressedFile
# python ../scripts/dropbox_upload.py $compressedFile $targetFile
|