diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 176a107fd..0c7dcd772 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: @@ -6,13 +6,13 @@ on: - 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] @@ -20,33 +20,35 @@ jobs: - 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/* - 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 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=[], )