Fix VS Code copy shortcut. #366
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: push | |
concurrency: | |
group: ${{ github.ref }} | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: lumaxis/shellcheck-problem-matchers@v1 | |
with: | |
format: gcc | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
env: | |
SHELLCHECK_OPTS: --format=gcc | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- run: gem install rubocop --no-doc | |
- run: rubocop --display-cop-names --format progress --format json --out rubocop.json | |
- uses: duderman/[email protected] | |
with: | |
path: rubocop.json | |
if: ${{ failure() }} | |
macos: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-12, macos-13] | |
fail-fast: false | |
steps: | |
- name: Uninstall gems | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
for gem in $(/usr/bin/gem list --no-versions | grep -v \ | |
-e 'bigdecimal' \ | |
-e 'CFPropertyList' \ | |
-e 'cmath' \ | |
-e 'csv' \ | |
-e 'date' \ | |
-e 'dbm' \ | |
-e 'did_you_mean' \ | |
-e 'e2mmap' \ | |
-e 'etc' \ | |
-e 'fcntl' \ | |
-e 'fiddle' \ | |
-e 'fileutils' \ | |
-e 'forwardable' \ | |
-e 'io-console' \ | |
-e 'ipaddr' \ | |
-e 'irb' \ | |
-e 'json' \ | |
-e 'libxml-ruby' \ | |
-e 'logger' \ | |
-e 'matrix' \ | |
-e 'minitest' \ | |
-e 'mutex_m' \ | |
-e 'net-telnet' \ | |
-e 'nokogiri' \ | |
-e 'openssl' \ | |
-e 'ostruct' \ | |
-e 'power_assert' \ | |
-e 'prime' \ | |
-e 'psych' \ | |
-e 'rake' \ | |
-e 'rexml' \ | |
-e 'rdoc' \ | |
-e 'rss' \ | |
-e 'scanf' \ | |
-e 'shell' \ | |
-e 'sqlite3' \ | |
-e 'stringio' \ | |
-e 'strscan' \ | |
-e 'sync' \ | |
-e 'test-unit' \ | |
-e 'thwait' \ | |
-e 'tracer' \ | |
-e 'webrick' \ | |
-e 'xmlrpc' \ | |
-e 'zlib' \ | |
); do | |
sudo /usr/bin/gem uninstall --force --all --ignore-dependencies --executables "$gem" | |
done | |
- name: Uninstall Homebrew | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
brew update | |
sudo rm -rf /usr/local/miniconda & | |
rm -rf /usr/local/lib/node_modules & | |
rm -f /usr/local/bin/terminal-notifier | |
rm -f /usr/local/bin/change_hostname.sh | |
rm -f /usr/local/bin/azcopy | |
if which brew &>/dev/null; then | |
eval "$(brew list --formula | xargs -I% echo 'brew uninstall --formula --force --ignore-dependencies "%" &')" | |
eval "$(brew list --cask | xargs -I% echo '{ brew uninstall --cask --force "%"; brew uninstall --cask --zap --force "%"; } &')" | |
brew uninstall --cask --zap --force adoptopenjdk/openjdk/adoptopenjdk8 & | |
brew uninstall --cask --zap --force dotnet & | |
brew uninstall --cask --zap --force firefox & | |
brew uninstall --cask --zap --force julia & | |
brew uninstall --cask --zap --force mono-mdk & | |
brew uninstall --cask --zap --force xamarin-android & | |
brew uninstall --cask --zap --force xamarin-ios & | |
brew uninstall --cask --zap --force xamarin-mac & | |
brew uninstall --cask --zap --force visual-studio & | |
wait | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" -- --force | |
fi | |
- name: Uninstall Xcode and Command-Line Tools | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
mkdir -p /tmp/trash | |
for trash in /Applications/Xcode*.app /Library/Developer/CommandLineTools; do | |
sudo mv "$trash" /tmp/trash/ | |
done | |
sudo pkgutil --forget com.apple.pkg.CLTools_Executables | |
sudo xcode-select --reset | |
- name: Uninstall leftover packages | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
mkdir -p /tmp/trash | |
for pkg in /var/db/receipts/*.plist; do | |
pkg_id="$(basename "${pkg}" .plist)" | |
volume="$(pkgutil --pkg-info "${pkg_id}" | sed -n -e 's/^volume: //p')" | |
location="$(pkgutil --pkg-info "${pkg_id}" | sed -n -e 's/^location: //p')" | |
pkgutil --only-files --files "${pkg_id}" | xargs -I% sudo mv -f "${volume}${location}/%" /tmp/trash/ || true | |
pkgutil --only-dirs --files "${pkg_id}" | xargs -I% sudo rmdir -p "${volume}${location}/%" || true | |
pkgutil --forget "${pkg_id}" | |
done | |
- name: Delete broken symlinks | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
for exe in /usr/local/bin/*; do | |
if [[ -L "$exe" ]] && ! [[ -e "$exe" ]]; then | |
rm "$exe" | |
fi | |
done | |
- name: Delete leftover applications | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
sudo rm -rf '/Applications/Google Chrome for Testing.app' & | |
sudo rm -rf '/Applications/Python 2.7' & | |
sudo rm -rf '/Applications/Python 3.11' & | |
sudo rm -rf '/Applications/Visual Studio 2019.app' & | |
wait | |
ls -al /Applications /Applications/Utilities | |
- name: Clean user directory | |
run: | | |
set -e | |
set -u | |
set -o pipefail | |
for trash in ~/.DS_Store \ | |
~/.Trash/* \ | |
~/.aliyun \ | |
~/.android \ | |
~/.azcopy \ | |
~/.azure \ | |
~/.bash_history \ | |
~/.bash_profile \ | |
~/.bash_sessions \ | |
~/.bashrc \ | |
~/.cabal \ | |
~/.cache \ | |
~/.cargo \ | |
~/.cocoapods \ | |
~/.composer \ | |
~/.conda \ | |
~/.config \ | |
~/.dotnet \ | |
~/.fastlane \ | |
~/.gem \ | |
~/.ghcup \ | |
~/.gitconfig \ | |
~/.gradle \ | |
~/.local \ | |
~/.m2 \ | |
~/.mono \ | |
~/.npm \ | |
~/.npmrc \ | |
~/.nvm \ | |
~/.oracle_jre_usage \ | |
~/.packer.d \ | |
~/.rustup \ | |
~/.sh_history \ | |
~/.ssh \ | |
~/.subversion \ | |
~/.sqlite_history \ | |
~/.vcpkg \ | |
~/.viminfo \ | |
~/.wget-hsts \ | |
~/.yarn \ | |
~/Library/Caches/Homebrew \ | |
~/Microsoft \ | |
~/hostedtoolcache \ | |
~/*.txt; do | |
if [[ -e "$trash" ]]; then | |
mv "$trash" /tmp/trash/ | |
fi | |
done | |
- name: Check installed apps | |
run: | | |
ls -al /Applications | |
ls -al /Applications/Utilities | |
ls -al ~/ | |
- name: Install dotfiles via `curl` | |
run: | | |
curl -sL git.io/.sh | sh | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out dotfiles | |
uses: actions/checkout@v3 | |
- name: Install dotfiles | |
run: | | |
./setup.sh |