Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,54 @@
name: MAN release/deploy
name: Build and release macOS packages

on:
release:
types:
- published
workflow_dispatch:

permissions:
contents: write

jobs:
deploy-mac:
runs-on: macos-14
timeout-minutes: 120

env:
RELEASE_ASSETS: true
timeout-minutes: 60
strategy:
matrix:
arch: [intel, arm]
steps:
- name: Get repository name.
run: echo "FASTSURFER_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Set up python environment
id: setup-uv
uses: astral-sh/setup-uv@v5
uses: actions/setup-python@v6.2.0
with:
python-version: '3.10'
- name: install dependencies
run: |
uv venv .venv
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
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.
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'
uses: softprops/action-gh-release@v3.0.0
if: github.event_name == 'release' && github.event.action == 'published'
with:
files: ${{ env.FASTSURFER_DIR }}/assets/*

4 changes: 2 additions & 2 deletions tools/build/install_fs_pruned.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tools/macos_build/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
py_modules=[],
)
Loading