Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-luke committed Sep 14, 2023
1 parent 54d7a0b commit 351268d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
Network-Connected-Test-13:
Network-Connected-Test-macOS13:
runs-on: macOS-13
steps:
- name: Checkout
Expand All @@ -21,7 +21,7 @@ jobs:
run: bash sd-installer.sh -t -1 | grep -q 'Launching Web UI with arguments' && echo '成功 Success' && exit 0
shell: /bin/bash --noprofile --norc -e {0}

Network-Connected-Test-12:
Network-Connected-Test-macOS12:
runs-on: macos-12
steps:
- name: Checkout
Expand All @@ -36,6 +36,11 @@ jobs:
Network-Not-Connected-Test:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: sd-installer.sh
sparse-checkout-cone-mode: false
- name: Install
run: curl -fsSL https://ghproxy.com/https://raw.githubusercontent.com/wy-luke/StableDiffusion-Installer-For-Mac/$BRANCH_NAME/sd-installer.sh | /bin/bash -s -- -c -t -2 # | grep -q 'Launching Web UI with arguments' && echo '成功 Success' && exit 0
run: bash sd-installer.sh -t -2 | grep -q 'Launching Web UI with arguments' && echo '成功 Success' && exit 0
shell: /bin/bash --noprofile --norc -e {0}
18 changes: 9 additions & 9 deletions sd-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,6 @@ if ! command -v brew &>/dev/null; then
yes | /bin/bash -c $brew_installer_path
eval "$($brew_path shellenv)"
verify_installation brew

if [ "$network_connected" == false ]; then
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
fi
brew update
else
echo_red "Homebrew 安装文件下载失败, 请检查网络连接"
echo_red "Failed to download Homebrew installation script, please check your network connection"
Expand All @@ -193,6 +184,15 @@ else
echo_green "Homebrew has already been installed"
fi

if [ "$network_connected" == false ]; then
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
fi
brew update

echo_green "Install the packages required"
brew install cmake protobuf rust git wget
# brew install --cask cmake
Expand Down

0 comments on commit 351268d

Please sign in to comment.