Skip to content

Commit 6c9f909

Browse files
authored
remove arch-specific tests (#3)
1 parent eca5d7c commit 6c9f909

File tree

1 file changed

+18
-57
lines changed

1 file changed

+18
-57
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
outputs:
1515
MSRV: ${{ steps.resolve-msrv.outputs.MSRV }}
16+
full-build: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Full Build') }}
1617
steps:
1718
- uses: actions/checkout@v4
1819

@@ -68,9 +69,9 @@ jobs:
6869
path: dist
6970

7071
build:
72+
needs: [resolve]
7173
name: build on ${{ matrix.os }} / ${{ matrix.target }}
72-
# only run on push to main and on release
73-
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Full Build')
74+
if: ${{ needs.resolve.outputs.full-build == 'true' }}
7475
strategy:
7576
fail-fast: false
7677
matrix:
@@ -142,61 +143,24 @@ jobs:
142143
ls dist/*py3-none-*linux*x86_64.whl | head -n 1
143144
python -m zipfile --list `ls dist/*py3-none-*linux*x86_64.whl | head -n 1`
144145
145-
test-builds-arch:
146-
name: test build on ${{ matrix.target }}-${{ matrix.distro }}
147-
needs: [build]
148-
runs-on: ubuntu-latest
149-
150-
strategy:
151-
fail-fast: false
152-
matrix:
153-
target: [aarch64, armv7, s390x, ppc64le]
154-
distro: ["ubuntu22.04"]
155-
include:
156-
- target: aarch64
157-
distro: alpine_latest
158-
159-
steps:
160-
- uses: actions/checkout@v4
161-
162-
- name: get dist artifacts
163-
uses: actions/download-artifact@v4
164-
with:
165-
pattern: pypi_files_linux_*
166-
merge-multiple: true
167-
path: dist
168-
169-
- uses: uraimo/run-on-arch-action@v2
170-
name: install & test
171-
with:
172-
arch: ${{ matrix.target }}
173-
distro: ${{ matrix.distro }}
174-
githubToken: ${{ github.token }}
175-
install: |
176-
set -x
177-
if command -v apt-get &> /dev/null; then
178-
echo "installing python & pip with apt-get..."
179-
apt-get update
180-
apt-get install -y --no-install-recommends python3 python3-pip python3-venv git
181-
else
182-
echo "installing python & pip with apk..."
183-
apk update
184-
apk add python3 py3-pip git
185-
fi
186-
run: |
187-
python3 -m pip install mcpdb --no-index --no-deps --find-links dist --force-reinstall
188-
python3 -m mcpdb --help
189-
190-
test-builds-os:
146+
test-builds:
191147
name: test build on ${{ matrix.os }}
192148
needs: [build]
193149

194150
strategy:
195151
fail-fast: false
196152
matrix:
197-
os: [ubuntu, macos, windows]
153+
os: [windows, macos, linux]
154+
target: [x86_64, aarch64]
155+
# onyx runtime seems to have issues with these targets, need to find alternative
156+
# solution, fine to skip for now.
157+
exclude:
158+
- os: windows
159+
target: aarch64
160+
- os: linux
161+
target: aarch64
198162

199-
runs-on: ${{ matrix.os }}-latest
163+
runs-on: ${{ (matrix.os == 'linux' && 'ubuntu') || matrix.os }}-latest
200164
steps:
201165
- uses: actions/checkout@v4
202166

@@ -215,25 +179,22 @@ jobs:
215179
- name: run tests
216180
run: |
217181
python3 -m pip install mcpdb --no-index --no-deps --find-links dist --force-reinstall
218-
python3 -m mcpdb --help
182+
mcpdb --help
219183
220184
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
221185
check:
222186
if: always()
223-
needs: [lint]
187+
needs: [resolve, lint, test-builds, build-sdist]
224188
runs-on: ubuntu-latest
225189
steps:
226190
- name: Decide whether the needed jobs succeeded or failed
227191
uses: re-actors/alls-green@release/v1
228192
with:
229193
jobs: ${{ toJSON(needs) }}
194+
allowed-skips: ${{ needs.resolve.outputs.full-build == 'true' && '' || 'test-builds' }}
230195

231196
release:
232-
needs:
233-
- check
234-
- test-builds-arch
235-
- test-builds-os
236-
- build-sdist
197+
needs: [check]
237198
if: success() && startsWith(github.ref, 'refs/tags/')
238199
runs-on: ubuntu-latest
239200
environment: release

0 commit comments

Comments
 (0)