Build Windows #134
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 Windows | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build packages | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
# Not using the ANTs c++ backend on Windows, have to investigate how to execute the bash scripts. | |
# But have to download it due to the expected copying of the install folder... | |
- name: Download ANTs | |
uses: robinraju/release-downloader@main | |
with: | |
repository: "raidionics/Raidionics-dependencies" | |
latest: true | |
fileName: "ANTsX-v2.4.3_windows.zip" | |
out-file-path: "downloads" | |
- name: Extract ANTs | |
run: | | |
cd ${{github.workspace}}/downloads/ | |
mkdir ${{github.workspace}}/ANTs | |
mkdir ${{github.workspace}}/ANTs/install | |
# tar -xf ANTsX-v2.4.3_windows.zip -C ${{github.workspace}}/ANTs/install/ | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
ls | |
pip install git+https://github.com/dbouget/raidionics_rads_lib.git@master | |
pip install -r assets/requirements.txt | |
pip install matplotlib==3.3.4 | |
pip install --force-reinstall --no-cache-dir pyside6 | |
- name: Integration tests | |
env: | |
DISPLAY: ':99.0' | |
run: | | |
pip install pytest-qt pytest-cov | |
pytest --cov=gui --cov=utils ${{github.workspace}}/integration_tests | |
- name: Build software | |
run: | | |
pip install pyinstaller==5.13.2 | |
mkdir tmp_dependencies | |
pyinstaller --log-level INFO --noconfirm --clean assets/main.spec | |
- name: Test executable | |
run: QT_QPA_PLATFORM="offscreen" ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+ | |
shell: bash | |
- name: Test GUI startup | |
run: cd ${{github.workspace}}/tests && python software_launch_test.py | |
- name: Make installer | |
run: | | |
makensis.exe assets/Raidionics.nsi | |
cp -r assets/Raidionics-1.3.0-win.exe dist/Raidionics-1.3.0-win.exe | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package | |
path: ${{github.workspace}}/dist/Raidionics-* | |
if-no-files-found: error |