Skip to content

Commit 995c352

Browse files
add brew autoremove (#159)
1 parent 3adde9d commit 995c352

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

.github/workflows/setup_machine.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
setup_and_update:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
18-
# fail-fast: false
18+
fail-fast: false
1919
matrix:
20-
os: [macos-latest]
20+
# macos-13 is for intel silicon mac.
21+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
22+
os: [macos-latest, macos-13]
2123
timeout-minutes: 60
2224
steps:
2325
- name: workaround setup for github runner macos
24-
if: runner.os == 'macOS'
2526
run: |-
2627
# https://github.com/sensuikan1973/dotfiles/pull/125#issuecomment-1502177344
2728
brew unlink python@3.11 && brew link --overwrite python@3.11
@@ -52,10 +53,12 @@ jobs:
5253
- name: 2nd, run setup script
5354
run: cd ~/dotfiles && ./setup.sh
5455

56+
- run: which zsh
57+
5558
- name: rough command test
5659
# See: https://docs.github.com/ja/actions/learn-github-actions/environment-variables
5760
# See: etc/shells and https://github.com/actions/runner-images/issues/2187
58-
shell: /usr/local/bin/zsh {0}
61+
shell: zsh {0}
5962
run: |-
6063
echo "$SHELL"
6164
set -euxo pipefail
@@ -89,21 +92,27 @@ jobs:
8992
ruby --version
9093
# pod --version
9194
openssl --version
95+
flutter doctor
96+
dart --version
97+
code --version
98+
gcloud --version
99+
gcloud config list
92100
93101
- name: upgrade_system_deps test
94-
shell: /usr/local/bin/zsh {0}
102+
shell: zsh {0}
95103
run: |-
96104
echo "$SHELL"
97105
set -euxo pipefail
98106
source "$HOME/.zshrc"
107+
zsh --version
99108
echo "$GITHUB_HEAD_REF"
109+
# https://github.com/sensuikan1973/dotfiles/pull/159#issuecomment-2136927932
110+
rm -f /opt/homebrew/bin/rbenv-install || true
111+
rm -f /opt/homebrew/bin/rbenv || true
112+
# https://github.com/sensuikan1973/dotfiles/pull/159#issuecomment-2138433241
113+
rm -f /opt/homebrew/bin/nodenv-install || true
114+
rm -f /opt/homebrew/bin/nodenv || true
100115
upgrade_system_deps -branch "$GITHUB_HEAD_REF"
101-
flutter doctor
102-
dart --version
103-
code --version
104-
gcloud --version
105-
gcloud config list
106-
# upgrade_all_softwareupdate
107116
108117
# # session for debug
109118
# - name: setup tmate session for debug ssh

setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if ! which brew; then
99
fi
1010
brew analytics off # See: https://docs.brew.sh/Analytics
1111
brew cleanup --prune=all
12+
brew autoremove
1213
brew tap --repair
1314
brew update
1415
brew upgrade

0 commit comments

Comments
 (0)