Skip to content

Commit

Permalink
Add workflow to (smoke) test packages
Browse files Browse the repository at this point in the history
  • Loading branch information
marbre committed Nov 11, 2024
1 parent a50741d commit b3e8a59
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
id: version_rc
run: |
sharktank_package_version=$(python3 build_tools/gen_version_info_rc.py sharktank)
echo "sharktank_package_version=${sharktank_package_version}" >> $GITHUB_ENV
shortfin_package_version=$(python3 build_tools/gen_version_info_rc.py shortfin)
echo "shortfin_package_version=${shortfin_package_version}" >> $GITHUB_ENV
- name: Upload version_info_rc.json
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
Expand Down Expand Up @@ -134,3 +136,18 @@ jobs:
allowUpdates: true
replacesArtifacts: true
makeLatest: false

test:
name: "Trigger test packages"
needs: build_packages
runs-on: ubuntu-24.04
steps:
- name: "Invoke workflow :: Test Packages"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4
with:
workflow: Validate and Publish Release
inputs: |
{
"sharktank_package_version": "${{ env.sharktank_package_version }}",
"shortfin_package_version": "${{ env.shortfin_package_version }}",
}
41 changes: 41 additions & 0 deletions .github/workflows/test_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2024 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Test packages

on:
workflow_dispatch:
inputs:
sharktank_package_version:
description: "Version of the sharktank package"
required: true
shortfin_package_version:
description: "Version of the shortfin package"
required: true

jobs:
test_packages:
name: "Test packages"
runs-on: ubuntu-24.04
steps:
- name: Setup python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.3
with:
python-version: 3.11
- name: Install Python packages
run: |
python -m pip install sharktank==${{ github.event.inputs.sharktank_package_version }} \
--no-deps -f https://github.com/nod-ai/SHARK-Platform/releases/expanded_assets/dev-wheels
python -m pip install shortfin==${{ github.event.inputs.shortfin_package_version }} \
--no-deps -f https://github.com/nod-ai/SHARK-Platform/releases/expanded_assets/dev-wheels
- name: Test import sharktank
id: import_sharktank
run: |
python -c "import sharktank; print('Sanity check passed')"
- name: Test import shortfin
id: import_shortfin
run: |
python -c "import shortfin; print('Sanity check passed')"

0 comments on commit b3e8a59

Please sign in to comment.