Skip to content

updated github actions configuration #24

updated github actions configuration

updated github actions configuration #24

Workflow file for this run

on:
push:
branches-ignore:
# dependabot branches will fail on push since they run with fork-level permissions despite being in the main repo.
# said branches are tested anyhow when dependabot makes its PR and the pull_request triggers the run.
- 'dependabot/**'
pull_request:
name: CI
jobs:
winexe:
name: winexe
runs-on: ubuntu-22.04
outputs:
github_commit_desc: ${{ steps.get_commit_desc.outputs.github_commit_desc }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
with:
fetch-depth: 0
- name: Get head branch latest commit
run: echo "GITHUB_PR_HEAD_SHA=$(git log --pretty=format:'%h' $GITHUB_SHA^2 -1)" >> $GITHUB_ENV
- name: Get base branch latest commit
run: echo "GITHUB_PR_BASE_SHA=$(git log --pretty=format:'%h' $GITHUB_SHA^1 -1)" >> $GITHUB_ENV
- name: Get latest commit
run: echo "GITHUB_HEAD_SHA=$(git log --pretty=format:'%h' -1)" >> $GITHUB_ENV
- name: install packages
run: |
sudo dpkg --add-architecture i386
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt-get update
sudo apt-get install -y --install-recommends winehq-stable winetricks wget xvfb
- name: configure wine
run: winetricks -q win10
- name: Download Python
run: wget https://www.python.org/ftp/python/3.12.3/python-3.12.3-amd64.exe
- name: installing Python on wine
run: |
Xvfb :0 -screen 0 1024x768x16 &
DISPLAY=:0.0 wine python-3.12.3-amd64.exe /quiet /log log.txt
killall Xvfb
- name: installing dependencies
run: wine ~/.wine/drive_c/users/runner/AppData/Local/Programs/Python/Python312/python.exe -m pip install pyside6 numpy scipy pyinstaller
- name: creating the executable
run: |
Xvfb :0 -screen 0 1024x768x16 &
# DISPLAY=:0.0 wine cmd < gen_win_exe.bat
wine ~/.wine/drive_c/users/runner/AppData/Local/Programs/Python/Python312/python.exe ~/.wine/drive_c/users/runner/AppData/Local/Programs/Python/Python312/Scripts/pyinstaller wwplot.in --onefile --hidden-import=numpy.random.common --hidden-import=numpy.random.bounded_integers --hidden-import=numpy.random.common --hidden-import=numpy.random.entropy --hidden-import=PySide6.QtXml --hidden-import=matplotlib --add-data="WWplot/ui;WWplot/ui"
killall Xvfb
- name: Upload Package Archive
uses: actions/upload-artifact@v4.3.1
with:
name: wwplot-git-${{ env.GITHUB_HEAD_SHA }}-x86_64.exe
path: dist/wwplot.exe
if-no-files-found: error