mirror of
https://gitee.com/ineo6/homebrew-install.git
synced 2025-04-06 03:58:05 +08:00
feat: 移除windows env
This commit is contained in:
parent
5abe944f3b
commit
89fe049181
34
.github/workflows/tests.yml
vendored
34
.github/workflows/tests.yml
vendored
@ -18,26 +18,16 @@ jobs:
|
|||||||
os:
|
os:
|
||||||
- macOS-latest
|
- macOS-latest
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- windows-latest
|
|
||||||
include:
|
include:
|
||||||
- os: macOS-latest
|
- os: macOS-latest
|
||||||
shell: bash
|
shell: bash
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
shell: bash
|
shell: bash
|
||||||
- os: windows-latest
|
|
||||||
shell: "wsl-bash {0}"
|
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: ${{ matrix.shell }}
|
shell: ${{ matrix.shell }}
|
||||||
steps:
|
steps:
|
||||||
- name: Set up WSL
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
git config --global core.autocrlf false
|
|
||||||
git config --global core.eol lf
|
|
||||||
|
|
||||||
- name: Set up Git repository
|
- name: Set up Git repository
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
|
|
||||||
@ -48,14 +38,6 @@ jobs:
|
|||||||
/Library/Developer/CommandLineTools
|
/Library/Developer/CommandLineTools
|
||||||
sudo xcode-select --reset
|
sudo xcode-select --reset
|
||||||
|
|
||||||
- name: Install WSL
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
uses: Vampire/setup-wsl@9cf1811ad062b08e0106e50f2d9a916ebabae257
|
|
||||||
with:
|
|
||||||
distribution: Ubuntu-22.04
|
|
||||||
wsl-shell-user: runner
|
|
||||||
additional-packages: build-essential
|
|
||||||
|
|
||||||
- name: Check Bash 3.x syntax
|
- name: Check Bash 3.x syntax
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
@ -80,22 +62,6 @@ jobs:
|
|||||||
/bin/bash uninstall.sh -f >/dev/null
|
/bin/bash uninstall.sh -f >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set up WSL environment
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
shell: "wsl-bash -u root {0}"
|
|
||||||
run: |
|
|
||||||
echo "runner ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/runner
|
|
||||||
chmod 644 /etc/sudoers.d/runner
|
|
||||||
echo -e "#!/bin/bash\nexec /home/linuxbrew/.linuxbrew/bin/brew \"\$@\"" | tee /usr/local/bin/brew
|
|
||||||
chmod 755 /usr/local/bin/brew
|
|
||||||
|
|
||||||
- name: Set up WSL environment 2
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
run: |
|
|
||||||
echo "HOMEBREW_BREW_GIT_REMOTE=https://github.com/Homebrew/brew" >> $GITHUB_ENV
|
|
||||||
echo "HOMEBREW_CORE_GIT_REMOTE=https://github.com/Homebrew/homebrew-core" >> $GITHUB_ENV
|
|
||||||
echo "HOMEBREW_CASK_GIT_REMOTE=https://github.com/Homebrew/homebrew-cask" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- run: /bin/bash -c "$(cat install.sh)"
|
- run: /bin/bash -c "$(cat install.sh)"
|
||||||
|
|
||||||
- run: brew config
|
- run: brew config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user