build #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
inputs: | |
type: | |
description: 'Whether to build a single file (onefile) or directory (dir) dist' | |
required: true | |
default: 'dir' | |
jobs: | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
channels: conda-forge,defaults | |
auto-update-conda: true | |
python-version: 3.9 | |
activate-environment: test | |
- name: Install CadQuery and pyinstaller | |
shell: powershell | |
run: | | |
conda install python=3.9 | |
conda install -c cadquery -c conda-forge cq-editor=master cadquery=master ipython=8.4.0 jedi=0.17.2 pyqtgraph=0.12.4 | |
pip install --upgrade pyinstaller==5.13.0 | |
pip install pipwin | |
pipwin install numpy | |
pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse | |
pip install git+https://github.com/meadiode/cq_gears.git@main | |
pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache" | |
- name: Run build | |
shell: powershell | |
run: | | |
conda info | |
pyinstaller pyinstaller.spec ${{ github.event.inputs.type }} | |
$opensslPath = Get-Command openssl | Select-Object -ExpandProperty Source | |
$opensslDir = Split-Path -Parent $opensslPath | |
Copy-Item "$opensslDir\libssl-1_1-x64.dll" "D:\a\CQ-editor\CQ-editor\dist\CQ-editor\" -ErrorAction SilentlyContinue | |
Copy-Item "$opensslDir\libcrypto-1_1-x64.dll" "D:\a\CQ-editor\CQ-editor\dist\CQ-editor\" -ErrorAction SilentlyContinue | |
Copy-Item D:\a\CQ-editor\CQ-editor\pyinstaller\CQ-editor.cmd D:\a\CQ-editor\CQ-editor\dist\ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: CQ-editor-Windows | |
path: dist |