mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-08-02 20:47:35 +08:00
feat: Add Linux ARM64 Support and Update Build Workflow
- Extend GitHub Actions workflow to build Linux x64 and ARM64 executables - Update install script to detect Linux architecture (x64 or ARM64) - Modify release process to include both Linux architecture artifacts - Rename Linux build job to clarify x64 architecture
This commit is contained in:
parent
1f1231d1a9
commit
54ecf2d752
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
@ -98,7 +98,7 @@ jobs:
|
|||||||
name: CursorFreeVIP_${{ env.VERSION }}_mac_arm64
|
name: CursorFreeVIP_${{ env.VERSION }}_mac_arm64
|
||||||
path: dist/CursorFreeVIP_${{ env.VERSION }}_mac_arm64
|
path: dist/CursorFreeVIP_${{ env.VERSION }}_mac_arm64
|
||||||
|
|
||||||
build-linux:
|
build-linux-x64:
|
||||||
needs: create-tag
|
needs: create-tag
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
@ -120,20 +120,55 @@ jobs:
|
|||||||
pip install pyinstaller
|
pip install pyinstaller
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Build Linux executable
|
- name: Build Linux x64 executable
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
run: |
|
run: |
|
||||||
pyinstaller build.spec
|
pyinstaller build.spec
|
||||||
|
mv "dist/CursorFreeVIP_${{ env.VERSION }}_linux" "dist/CursorFreeVIP_${{ env.VERSION }}_linux_x64"
|
||||||
echo "Contents of dist directory:"
|
echo "Contents of dist directory:"
|
||||||
ls -la dist/
|
ls -la dist/
|
||||||
|
|
||||||
- name: Upload Linux artifact
|
- name: Upload Linux x64 artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: CursorFreeVIP_${{ env.VERSION }}_linux
|
name: CursorFreeVIP_${{ env.VERSION }}_linux_x64
|
||||||
path: dist/CursorFreeVIP_${{ env.VERSION }}_linux
|
path: dist/CursorFreeVIP_${{ env.VERSION }}_linux_x64
|
||||||
|
|
||||||
|
build-linux-arm64:
|
||||||
|
needs: create-tag
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
with:
|
||||||
|
platforms: arm64
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
shell: bash
|
||||||
|
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build in ARM64 Docker container
|
||||||
|
run: |
|
||||||
|
docker run --rm --platform linux/arm64 -v ${{ github.workspace }}:/app -w /app arm64v8/python:3.9-slim bash -c "
|
||||||
|
apt-get update && apt-get install -y build-essential
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install pyinstaller
|
||||||
|
pip install -r requirements.txt
|
||||||
|
python -m PyInstaller build.spec
|
||||||
|
mv /app/dist/CursorFreeVIP_${{ env.VERSION }}_linux /app/dist/CursorFreeVIP_${{ env.VERSION }}_linux_arm64
|
||||||
|
"
|
||||||
|
echo "Contents of dist directory:"
|
||||||
|
ls -la dist/
|
||||||
|
|
||||||
|
- name: Upload Linux ARM64 artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: CursorFreeVIP_${{ env.VERSION }}_linux_arm64
|
||||||
|
path: dist/CursorFreeVIP_${{ env.VERSION }}_linux_arm64
|
||||||
|
|
||||||
build-macos-intel:
|
build-macos-intel:
|
||||||
needs: create-tag
|
needs: create-tag
|
||||||
@ -171,9 +206,8 @@ jobs:
|
|||||||
name: CursorFreeVIP_${{ env.VERSION }}_mac_intel
|
name: CursorFreeVIP_${{ env.VERSION }}_mac_intel
|
||||||
path: dist/CursorFreeVIP_${{ env.VERSION }}_mac_intel
|
path: dist/CursorFreeVIP_${{ env.VERSION }}_mac_intel
|
||||||
|
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
needs: [build-windows, build-macos-arm64, build-linux, build-macos-intel]
|
needs: [build-windows, build-macos-arm64, build-linux-x64, build-linux-arm64, build-macos-intel]
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -201,7 +235,8 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
artifacts/CursorFreeVIP_${{ env.VERSION }}_windows.exe/CursorFreeVIP_${{ env.VERSION }}_windows.exe
|
artifacts/CursorFreeVIP_${{ env.VERSION }}_windows.exe/CursorFreeVIP_${{ env.VERSION }}_windows.exe
|
||||||
artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_arm64/CursorFreeVIP_${{ env.VERSION }}_mac_arm64
|
artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_arm64/CursorFreeVIP_${{ env.VERSION }}_mac_arm64
|
||||||
artifacts/CursorFreeVIP_${{ env.VERSION }}_linux/CursorFreeVIP_${{ env.VERSION }}_linux
|
artifacts/CursorFreeVIP_${{ env.VERSION }}_linux_x64/CursorFreeVIP_${{ env.VERSION }}_linux_x64
|
||||||
|
artifacts/CursorFreeVIP_${{ env.VERSION }}_linux_arm64/CursorFreeVIP_${{ env.VERSION }}_linux_arm64
|
||||||
artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_intel/CursorFreeVIP_${{ env.VERSION }}_mac_intel
|
artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_intel/CursorFreeVIP_${{ env.VERSION }}_mac_intel
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
@ -63,8 +63,15 @@ detect_os() {
|
|||||||
echo -e "${CYAN}ℹ️ Detected macOS Intel architecture${NC}"
|
echo -e "${CYAN}ℹ️ Detected macOS Intel architecture${NC}"
|
||||||
fi
|
fi
|
||||||
elif [[ "$(uname)" == "Linux" ]]; then
|
elif [[ "$(uname)" == "Linux" ]]; then
|
||||||
OS="linux"
|
# Detect Linux architecture
|
||||||
echo -e "${CYAN}ℹ️ Detected Linux system${NC}"
|
ARCH=$(uname -m)
|
||||||
|
if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
|
||||||
|
OS="linux_arm64"
|
||||||
|
echo -e "${CYAN}ℹ️ Detected Linux ARM64 architecture${NC}"
|
||||||
|
else
|
||||||
|
OS="linux_x64"
|
||||||
|
echo -e "${CYAN}ℹ️ Detected Linux x64 architecture${NC}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# Assume Windows
|
# Assume Windows
|
||||||
OS="windows"
|
OS="windows"
|
||||||
@ -127,9 +134,19 @@ install_cursor_free_vip() {
|
|||||||
echo -e "${RED}❌ New download link does not exist${NC}"
|
echo -e "${RED}❌ New download link does not exist${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
} elif [[ "$OS" == "linux_x64" || "$OS" == "linux_arm64" ]]; then
|
||||||
|
OS="linux"
|
||||||
|
binary_name="CursorFreeVIP_${VERSION}_${OS}"
|
||||||
|
download_url="https://github.com/yeongpin/cursor-free-vip/releases/download/v${VERSION}/${binary_name}"
|
||||||
|
echo -e "${CYAN}ℹ️ New download link: ${download_url}${NC}"
|
||||||
|
|
||||||
|
if ! curl --output /dev/null --silent --head --fail "$download_url"; then
|
||||||
|
echo -e "${RED}❌ New download link does not exist${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
} else {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download file
|
# Download file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user