forked from gpustack/gpustack
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (89 loc) · 2.48 KB
/
install-script.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Linux and MaxOS Install Script Testing
on:
push:
branches:
- main
paths:
- "install.sh"
- ".github/workflows/install-script.yml"
pull_request:
branches:
- main
paths:
- "install.sh"
- ".github/workflows/install-script.yml"
workflow_dispatch: {}
jobs:
linux-macos-build:
timeout-minutes: 20
name: Build Wheel
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: X64
- os: macos-latest
arch: ARM64
steps:
- uses: actions/checkout@v4
name: Checkout code
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build
run: |
make build
- name: Upload wheel as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-dist
path: dist/*.whl
linux-macos-install-test:
timeout-minutes: 20
name: Test Install
needs: linux-macos-build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: X64
- os: macos-latest
arch: ARM64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: setup-python
id: cp311
uses: actions/setup-python@v5
with:
python-version: "3.11"
# latest macos runner uses python3.13 which is not supported yet.
- name: set pipx default python
run: echo "PIPX_DEFAULT_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Download wheel artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.os }}-dist
path: ./dist
- name: Run install script
continue-on-error: true
run: |
ARCH=${{ runner.arch }}
OS=${{ matrix.os }}
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
if [[ "${ARCH}" == "X64" ]]; then
export INSTALL_PACKAGE_SPEC=$(ls dist/*x86_64.whl)
elif [[ ${ARCH} == "ARM64" ]]; then
export INSTALL_PACKAGE_SPEC=$(ls dist/*aarch64.whl)
fi
else
export INSTALL_PACKAGE_SPEC=$(ls dist/*.whl)
fi
cat install.sh | sh -
- name: Verify installation
run: |
gpustack version
curl --fail --retry 5 --retry-delay 2 --retry-all-errors http://127.0.0.1/readyz