Skip to content

Commit

Permalink
Update ci.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus authored Sep 5, 2024
1 parent 18e690e commit e5c49bc
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]
then
brew ruby -- "$(brew --repository homebrew/cask)/cmd/lib/generate-matrix.rb" ${{ github.event.inputs.skip_install && '--skip-install' }} ${{ github.event.inputs.new_cask && '--new' }} --casks=${{ github.event.inputs.casks }}
brew ruby -- "$(brew --repository homebrew/cask)/cmd/lib/generate-matrix.rb" ${{ github.event.inputs.skip_install && '--skip-install' }} ${{ github.event.inputs.new_cask && '--new' }} --casks="$INPUT_CASKS"
elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]
then
brew ruby -- "$(brew --repository homebrew/cask)/cmd/lib/generate-matrix.rb" --syntax-only
Expand Down Expand Up @@ -97,18 +97,12 @@ jobs:
persist-credentials: false

- name: Clean up CI machine
if: runner.os == 'macOS'
run: |
if [ "${{ matrix.runner }}" == 'macos-12' ] && ! brew uninstall --cask julia && ! rm -r /Applications/Julia-*.app; then
echo '::warning::Removing Julia is no longer necessary.'
fi
if ! rm /usr/local/share/man/man1/al.1 || \
! sudo rm /etc/paths.d/mono-commands || \
! sudo rm -r /Library/Frameworks/Mono.framework || \
! sudo pkgutil --forget com.xamarin.mono-MDK.pkg; then
echo '::warning::Uninstalling Mono is no longer necessary.'
fi
if ! rm /usr/local/bin/dotnet; then
echo "::warning::Removing \`dotnet\` symlink is no longer necessary."
fi
Expand All @@ -122,7 +116,25 @@ jobs:
fi
brew unlink python && brew link --overwrite python
if: runner.os == 'macOS'
- name: Clean up Mono from CI machine
if: matrix.runner != 'macos-14' && matrix.arch != 'arm'
run: |
if ! rm /usr/local/share/man/man1/al.1 || \
! sudo rm /etc/paths.d/mono-commands || \
! sudo rm -r /Library/Frameworks/Mono.framework || \
! sudo pkgutil --forget com.xamarin.mono-MDK.pkg; then
echo '::warning::Uninstalling Mono is no longer necessary.'
fi
- name: Clean up CI Xcode Versions
if: matrix.runner == 'macos-14'
run: |
df -hI /dev/disk3s1s1
sudo rm -rf /Applications/Xcode_15.1.app
sudo rm -rf /Applications/Xcode_15.2.app
sudo rm -rf /Applications/Xcode_15.3.app
df -hI /dev/disk3s1s1
- name: Cache Homebrew Gems
id: cache
Expand Down Expand Up @@ -176,9 +188,11 @@ jobs:
cask = Cask::CaskLoader.load('${{ matrix.cask.path }}')
was_installed = cask.installed?
manual_installer = cask.artifacts.any? { |artifact|
artifact.is_a?(Cask::Artifact::Installer::ManualInstaller)
}
manual_installer = cask.artifacts.any? do |artifact|
if defined?(artifact.manual_install)
artifact.manual_install
end
end
macos_requirement_satisfied = if macos_requirement = cask.depends_on.macos
macos_requirement.satisfied?
Expand Down

0 comments on commit e5c49bc

Please sign in to comment.