mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: support mac deployment and optimization make check (#1570)
* feat: add openim server code Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim env Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add openim scripts check and mac support ss comment Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: add mac os Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
@@ -130,14 +130,14 @@ jobs:
|
||||
sudo make install
|
||||
|
||||
execute-scripts:
|
||||
name: Execute OpenIM script on ${{ matrix.os }}
|
||||
name: Execute OpenIM Script On ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment:
|
||||
name: openim
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.20"]
|
||||
os: ["ubuntu-latest"]
|
||||
os: ["ubuntu-latest", "macos-latest"]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -154,18 +154,52 @@ jobs:
|
||||
version: '3.x' # If available, use the latest major version that's compatible
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Docker Operations
|
||||
# - name: Install latest Bash (macOS only)
|
||||
# if: runner.os == 'macOS'
|
||||
# run: |
|
||||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
# brew update
|
||||
|
||||
# brew install bash
|
||||
# brew install gnu-sed
|
||||
|
||||
# echo "/usr/local/bin" >> $GITHUB_PATH
|
||||
# echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
|
||||
# continue-on-error: true
|
||||
|
||||
- name: Set up Docker for Ubuntu
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo make init
|
||||
sudo docker compose up -d
|
||||
sudo sleep 20
|
||||
|
||||
- name: Module Operations
|
||||
# - name: Set up Docker for macOS
|
||||
# if: runner.os == 'macOS'
|
||||
# run: |
|
||||
# brew install --cask docker
|
||||
# open /Applications/Docker.app
|
||||
|
||||
# sleep 10
|
||||
# docker-compose --version || brew install docker-compose
|
||||
|
||||
# docker-compose up -d
|
||||
# sleep 20
|
||||
|
||||
- name: Module Operations for Ubuntu
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
|
||||
- name: Build, Start, Check Services and Print Logs
|
||||
# - name: Module Operations for macOS
|
||||
# if: runner.os == 'macOS'
|
||||
# run: |
|
||||
# make tidy
|
||||
# make tools.verify.go-gitlint
|
||||
|
||||
- name: Build, Start, Check Services and Print Logs for Ubuntu
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo make init && \
|
||||
sudo make build && \
|
||||
@@ -173,6 +207,15 @@ jobs:
|
||||
sudo make check || \
|
||||
(echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
|
||||
|
||||
# - name: Build, Start, Check Services and Print Logs for macOS
|
||||
# if: runner.os == 'macOS'
|
||||
# run: |
|
||||
# make init && \
|
||||
# make build && \
|
||||
# make start && \
|
||||
# make check || \
|
||||
# (echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
|
||||
|
||||
openim-test-build-image:
|
||||
name: Build OpenIM Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user