From 87b144face07692adf5791ee25d2c5f6f46b6825 Mon Sep 17 00:00:00 2001 From: xuwei-fit2cloud Date: Tue, 23 Dec 2025 14:59:28 +0800 Subject: [PATCH] Update default OS options in xpack.yml Removed 'ubuntu-22.04-arm' from default OS options. --- .github/workflows/xpack.yml | 98 +++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/xpack.yml diff --git a/.github/workflows/xpack.yml b/.github/workflows/xpack.yml new file mode 100644 index 00000000..fe092d34 --- /dev/null +++ b/.github/workflows/xpack.yml @@ -0,0 +1,98 @@ +# .github/workflows/wheel.yml +name: Build Wheels Universal + +on: + workflow_dispatch: + inputs: + + target_os: + description: 'Select OS to run on' + required: false + default: '["ubuntu-latest","macos-latest","windows-latest","macos-15-intel"]' + type: choice + options: + - '["macos-latest"]' + - '["macos-15-intel"]' + - '["ubuntu-latest"]' + - '["windows-latest"]' + - '["ubuntu-latest","windows-latest"]' + - '["ubuntu-latest","macos-latest"]' + - '["macos-latest","windows-latest"]' + - '["ubuntu-latest","macos-latest","windows-latest"]' + - '["ubuntu-latest","macos-latest","windows-latest","macos-15-intel"]' + publish: + description: 'Publish to repository' + required: false + default: false + type: boolean + repository: + description: 'Select repository to publish (Attention: Disable pypi selection until release)' + required: false + default: 'testpypi' + type: choice + options: + - testpypi + - pypi + xpack_branch: + description: 'SQLBot X-Pack Branch' + required: true + type: choice + default: "main" + options: + - main + +jobs: + build: + runs-on: ${{ matrix.os }} + environment: sqlbot-xpack-env + defaults: + run: + working-directory: ./sqlbot-xpack + strategy: + matrix: + os: ${{ fromJSON(inputs.target_os) }} + steps: + - uses: actions/checkout@v4 + - name: Check out SQLBot xpack repo + uses: actions/checkout@v4 + with: + repository: dataease/sqlbot-xpack + ref: ${{ inputs.xpack_branch }} + path: ./sqlbot-xpack + token: ${{ secrets.GH_TOKEN }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Install and build + working-directory: ./sqlbot-xpack/xpack_static + run: | + npm install + npm run build:prod + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install cython wheel twine + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v6 + with: + version: "latest" + - name: Install dependencies + run: uv sync + - name: Build encrypted + run: python build_scripts/build.py + - name: Pre build wheel + run: python ./build_scripts/format.py encrypted + - name: Build wheel + run: python -m pip wheel --no-deps -w dist . + - name: Finish build wheek + run: python ./build_scripts/format.py + - name: Show wheel + run: unzip -l dist/* + - name: Publish to repository + if: ${{ inputs.publish }} + run: twine upload --repository-url ${{ inputs.repository == 'pypi' && 'https://upload.pypi.org/legacy/' || 'https://test.pypi.org/legacy/' }} -u __token__ -p ${{ inputs.repository == 'pypi' && secrets.FORMAL_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }} dist/*.whl --verbose