-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (81 loc) · 2.93 KB
/
Copy pathexecval_build.yml
File metadata and controls
93 lines (81 loc) · 2.93 KB
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
86
87
88
89
90
91
92
93
name: Build ExecVal (3 platforms)
# Part 1: manual trigger only. Produces downloadable artifacts for testing.
# Releases are added later (Part 2, cross-repo sync).
on:
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # let other platforms finish even if one fails
matrix:
include:
- os: windows-latest
artifact: AutoBIDSify-Windows
archive: zip
pyver: "3.14"
- os: macos-latest # Apple Silicon (arm64)
artifact: AutoBIDSify-macOS-arm64
archive: zip
pyver: "3.14"
- os: ubuntu-22.04
artifact: AutoBIDSify-Linux
archive: tar
# 3.12 links against an older GLIBC than 3.14, so the Linux build
# runs on Ubuntu 22.04 (GLIBC 2.35) and older systems.
pyver: "3.12"
defaults:
run:
working-directory: app/execval
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.pyver }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyver }}
# Tkinter needs the system Tk libraries to be present so PyInstaller can
# bundle them. The GitHub Ubuntu runner does not always include them.
- name: Install Tk libraries (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y python3-tk tk
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install the autobidsify library from the repo root (same repo now).
# ExecVal imports it directly; no vendored copy, no PyPI download.
pip install -e "$GITHUB_WORKSPACE"
pip install -r requirements.txt
pip install pytest pyinstaller
- name: Run unit tests
run: python -m pytest
- name: Build with PyInstaller
run: pyinstaller build.spec
# --- package the onedir output per platform ---
- name: Archive (zip, Windows/macOS)
if: matrix.archive == 'zip'
shell: bash
run: |
cd dist
if [ "$RUNNER_OS" = "Windows" ]; then
powershell -Command "Compress-Archive -Path AutoBIDSify -DestinationPath ${{ matrix.artifact }}.zip"
else
zip -r ${{ matrix.artifact }}.zip AutoBIDSify
fi
- name: Archive (tar.gz, Linux)
if: matrix.archive == 'tar'
run: |
cd dist
tar -czf ${{ matrix.artifact }}.tar.gz AutoBIDSify
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: |
app/execval/dist/${{ matrix.artifact }}.zip
app/execval/dist/${{ matrix.artifact }}.tar.gz
if-no-files-found: ignore
retention-days: 14