Skip to content

Commit 87b144f

Browse files
Update default OS options in xpack.yml
Removed 'ubuntu-22.04-arm' from default OS options.
1 parent 6606bc0 commit 87b144f

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

.github/workflows/xpack.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# .github/workflows/wheel.yml
2+
name: Build Wheels Universal
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
8+
target_os:
9+
description: 'Select OS to run on'
10+
required: false
11+
default: '["ubuntu-latest","macos-latest","windows-latest","macos-15-intel"]'
12+
type: choice
13+
options:
14+
- '["macos-latest"]'
15+
- '["macos-15-intel"]'
16+
- '["ubuntu-latest"]'
17+
- '["windows-latest"]'
18+
- '["ubuntu-latest","windows-latest"]'
19+
- '["ubuntu-latest","macos-latest"]'
20+
- '["macos-latest","windows-latest"]'
21+
- '["ubuntu-latest","macos-latest","windows-latest"]'
22+
- '["ubuntu-latest","macos-latest","windows-latest","macos-15-intel"]'
23+
publish:
24+
description: 'Publish to repository'
25+
required: false
26+
default: false
27+
type: boolean
28+
repository:
29+
description: 'Select repository to publish (Attention: Disable pypi selection until release)'
30+
required: false
31+
default: 'testpypi'
32+
type: choice
33+
options:
34+
- testpypi
35+
- pypi
36+
xpack_branch:
37+
description: 'SQLBot X-Pack Branch'
38+
required: true
39+
type: choice
40+
default: "main"
41+
options:
42+
- main
43+
44+
jobs:
45+
build:
46+
runs-on: ${{ matrix.os }}
47+
environment: sqlbot-xpack-env
48+
defaults:
49+
run:
50+
working-directory: ./sqlbot-xpack
51+
strategy:
52+
matrix:
53+
os: ${{ fromJSON(inputs.target_os) }}
54+
steps:
55+
- uses: actions/checkout@v4
56+
- name: Check out SQLBot xpack repo
57+
uses: actions/checkout@v4
58+
with:
59+
repository: dataease/sqlbot-xpack
60+
ref: ${{ inputs.xpack_branch }}
61+
path: ./sqlbot-xpack
62+
token: ${{ secrets.GH_TOKEN }}
63+
- name: Use Node.js ${{ matrix.node-version }}
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: ${{ matrix.node-version }}
67+
- name: Install and build
68+
working-directory: ./sqlbot-xpack/xpack_static
69+
run: |
70+
npm install
71+
npm run build:prod
72+
- name: Set up Python
73+
uses: actions/setup-python@v5
74+
with:
75+
python-version: '3.11'
76+
- name: Install build tools
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install cython wheel twine
80+
- name: Install the latest version of uv
81+
uses: astral-sh/setup-uv@v6
82+
with:
83+
version: "latest"
84+
- name: Install dependencies
85+
run: uv sync
86+
- name: Build encrypted
87+
run: python build_scripts/build.py
88+
- name: Pre build wheel
89+
run: python ./build_scripts/format.py encrypted
90+
- name: Build wheel
91+
run: python -m pip wheel --no-deps -w dist .
92+
- name: Finish build wheek
93+
run: python ./build_scripts/format.py
94+
- name: Show wheel
95+
run: unzip -l dist/*
96+
- name: Publish to repository
97+
if: ${{ inputs.publish }}
98+
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

0 commit comments

Comments
 (0)