Add system dependency checker for Docker, Apptainer, and Singularity #4
Workflow file for this run
This file contains hidden or 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: release-binaries | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| data_sep: ":" | |
| pyinstaller_flags: "--windowed" | |
| artifact_path: dist/BIDSAppRunner.dmg | |
| artifact_name: BIDSAppRunner-macos | |
| - os: windows-latest | |
| data_sep: ";" | |
| pyinstaller_flags: "--onefile --windowed" | |
| artifact_path: dist/BIDSAppRunner.zip | |
| artifact_name: BIDSAppRunner-windows | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Build binary | |
| shell: bash | |
| run: | | |
| python -c "import os; os.makedirs('static', exist_ok=True); os.makedirs('templates', exist_ok=True)" | |
| python -m PyInstaller app_gui.py \ | |
| --name BIDSAppRunner \ | |
| --clean \ | |
| --noconfirm \ | |
| ${{ matrix.pyinstaller_flags }} \ | |
| --add-data "templates${{ matrix.data_sep }}templates" \ | |
| --add-data "static${{ matrix.data_sep }}static" \ | |
| --add-data "run_bids_apps.py${{ matrix.data_sep }}." \ | |
| --add-data "run_bids_apps_hpc.py${{ matrix.data_sep }}." \ | |
| --add-data "bids_validation_integration.py${{ matrix.data_sep }}." \ | |
| --add-data "check_app_output.py${{ matrix.data_sep }}." \ | |
| --add-data "check_system_deps.py${{ matrix.data_sep }}." \ | |
| --add-data "version.py${{ matrix.data_sep }}." \ | |
| --collect-all flask \ | |
| --collect-all waitress \ | |
| --hidden-import engineio.async_drivers.threading | |
| - name: Package artifact (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| hdiutil create -volname "BIDSAppRunner" -srcfolder "dist/BIDSAppRunner.app" -ov -format UDZO "dist/BIDSAppRunner.dmg" | |
| - name: Package artifact (Windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| Compress-Archive -Path dist/BIDSAppRunner.exe -DestinationPath dist/BIDSAppRunner.zip -Force | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }}-${{ github.ref_name }} | |
| path: ${{ matrix.artifact_path }} |