From bc256c06566faefc3ceda461360d4311f2bd88d9 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 10:52:54 +0200 Subject: [PATCH 1/8] update mac build workflow --- .github/workflows/deploy.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 176a107fd..55e571a53 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: MAN release/deploy +name: Build and release macOS packages on: release: @@ -10,9 +10,6 @@ jobs: deploy-mac: runs-on: macos-14 timeout-minutes: 120 - - env: - RELEASE_ASSETS: true strategy: matrix: arch: [intel, arm] @@ -20,17 +17,17 @@ jobs: - name: Get repository name. run: echo "FASTSURFER_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up python environment id: setup-uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v8 with: python-version: '3.10' + activate-environment: true - name: install dependencies run: | - uv venv .venv uv pip install py2app tomli # update system to the newest version, not pin pointing package version on purpose @@ -40,13 +37,12 @@ jobs: - name: package app for ${{ matrix.arch }} run: tools/macos_build/build_release_package.sh ${{ matrix.arch }} - name: Move assets. - if: env.RELEASE_ASSETS == 'true' + if: github.event_name == 'release' && github.event.action == 'published' run: | mkdir assets mv tools/macos_build/installer/* assets/ - name: Upload release assets. uses: softprops/action-gh-release@v2 - if: env.RELEASE_ASSETS == 'true' + if: github.event_name == 'release' && github.event.action == 'published' with: files: ${{ env.FASTSURFER_DIR }}/assets/* - From f36ad0fbad38fdd2cee5d061de99f607094404f6 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 11:03:35 +0200 Subject: [PATCH 2/8] strict versioning required in astral-sh/setup-uv --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 55e571a53..3d5504ef2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - name: Set up python environment id: setup-uv - uses: astral-sh/setup-uv@v8 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: '3.10' activate-environment: true From 63709c428bb6bc617ea5202a727e7a1729d861c7 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 11:18:03 +0200 Subject: [PATCH 3/8] switch back to standard venv to avoid py2app problem with uv-managed Python builds where zlib can be builtin and lacks __file__ --- .github/workflows/deploy.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3d5504ef2..efc04af8f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,14 +21,17 @@ jobs: with: fetch-depth: 0 - name: Set up python environment - id: setup-uv - uses: astral-sh/setup-uv@v8.1.0 + uses: actions/setup-python@v6.2.0 with: python-version: '3.10' - activate-environment: true - name: install dependencies run: | - uv pip install py2app tomli + python -m venv .venv + echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV" + echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH" + . .venv/bin/activate + python -m pip install --upgrade pip + python -m pip install py2app tomli # update system to the newest version, not pin pointing package version on purpose brew update From fdb6119bdfc51df461bcf9e8396114395782f743 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 11:21:24 +0200 Subject: [PATCH 4/8] fix py2app install, move to workflow, avoid depreciation warning --- tools/macos_build/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/macos_build/setup.py b/tools/macos_build/setup.py index 8b2e3b46b..ea157f4e5 100644 --- a/tools/macos_build/setup.py +++ b/tools/macos_build/setup.py @@ -18,6 +18,5 @@ app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, - setup_requires=['py2app'], py_modules=[], ) From 06de854283963d96a250b5f4f9da6678c5a6142c Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 11:43:45 +0200 Subject: [PATCH 5/8] bump checkout, reduce timeout to 30 and only install aria2 if necessary --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index efc04af8f..ba715e352 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ on: jobs: deploy-mac: runs-on: macos-14 - timeout-minutes: 120 + timeout-minutes: 30 strategy: matrix: arch: [intel, arm] @@ -17,7 +17,7 @@ jobs: - name: Get repository name. run: echo "FASTSURFER_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 with: fetch-depth: 0 - name: Set up python environment @@ -36,7 +36,7 @@ jobs: # update system to the newest version, not pin pointing package version on purpose brew update brew upgrade || true - brew install aria2 + brew list aria2 >/dev/null 2>&1 || brew install aria2 - name: package app for ${{ matrix.arch }} run: tools/macos_build/build_release_package.sh ${{ matrix.arch }} - name: Move assets. From c9335aba25d95d29de037ffbc60a44214c6a32e5 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 11:48:20 +0200 Subject: [PATCH 6/8] increase timeout to 60 in case of really slow network for FreeSurfer download --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ba715e352..1e9d124a1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ on: jobs: deploy-mac: runs-on: macos-14 - timeout-minutes: 30 + timeout-minutes: 60 strategy: matrix: arch: [intel, arm] From 0d9a604b8b755e74367bded5757846111dabe2cb Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 11:57:51 +0200 Subject: [PATCH 7/8] better log message in install_fs_pruned --- tools/build/install_fs_pruned.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/install_fs_pruned.sh b/tools/build/install_fs_pruned.sh index 12a60d3ea..932a154f9 100755 --- a/tools/build/install_fs_pruned.sh +++ b/tools/build/install_fs_pruned.sh @@ -81,8 +81,8 @@ echo echo "$fslink" echo -# get FreeSurfer and unpack (some of it) -echo "Downloading FS and unpacking portions ..." +# get FreeSurfer and selectively unpack only the files needed by FastSurfer +echo "Downloading FreeSurfer and selectively unpacking required files ..." # temp freesurfer dl filename (to save the dl) if [[ -d /install ]] ; then From b3ca8a9dd95ea318b67007fb5a28d0387f1101f9 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 12:02:33 +0200 Subject: [PATCH 8/8] bumping action-gh-release and adding write permissions --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e9d124a1..0c7dcd772 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,9 @@ on: - published workflow_dispatch: +permissions: + contents: write + jobs: deploy-mac: runs-on: macos-14 @@ -45,7 +48,7 @@ jobs: mkdir assets mv tools/macos_build/installer/* assets/ - name: Upload release assets. - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3.0.0 if: github.event_name == 'release' && github.event.action == 'published' with: files: ${{ env.FASTSURFER_DIR }}/assets/*