Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[shortfin] Merge Windows and Linux workflows #510

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/ci_linux_x64-libshortfin.yml'
- '.github/workflows/ci-libshortfin.yml'
- 'shortfin/**'
push:
branches:
- main
paths:
- '.github/workflows/ci_linux_x64-libshortfin.yml'
- '.github/workflows/ci-libshortfin.yml'
- 'shortfin/**'

permissions:
Expand All @@ -36,18 +36,31 @@ env:

jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-24.04
name: "Build and test :: ${{ matrix.name }} :: ${{ matrix.python-version }}"
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
include:
- name: Ubuntu 24.04
runs-on: ubuntu-24.04
cmake-options:
-DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_LINKER_TYPE=LLD
- name: Windows
runs-on: windows-2022
cmake-options:

steps:
- name: Install dependencies
- name: (Linux) Install dependencies
if: "runner.os == 'Linux'"
run: |
sudo apt update
sudo apt install clang lld cmake ninja-build

- name: (Windows) Configure MSVC
if: "runner.os == 'Windows'"
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -70,7 +83,7 @@ jobs:
git submodule update --init --depth 1 -- third_party/googletest
git submodule update --init --depth 1 -- third_party/hip-build-deps/

- name: Setup Python ${{ matrix.python-version }}
- name: "Setup Python :: ${{ matrix.platform }} :: ${{ matrix.python-version }}"
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -85,17 +98,16 @@ jobs:

- name: Build shortfin (full)
working-directory: ${{ env.LIBSHORTFIN_DIR }}
shell: bash
run: |
mkdir build
cmake -GNinja \
-S. \
-Bbuild \
-DCMAKE_C_COMPILER=clang-18 \
-DCMAKE_CXX_COMPILER=clang++-18 \
-DCMAKE_LINKER_TYPE=LLD \
-DSHORTFIN_BUNDLE_DEPS=ON \
-DSHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_REPO_DIR }}" \
-DSHORTFIN_BUILD_PYTHON_BINDINGS=ON
-DSHORTFIN_BUILD_PYTHON_BINDINGS=ON \
${{matrix.cmake-options}}
cmake --build build --target all
pip install -v -e build/

Expand All @@ -105,7 +117,8 @@ jobs:
ctest --timeout 30 --output-on-failure --test-dir build
pytest -s

- name: Build shortfin (host-only)
- name: "Build shortfin (host-only) :: ${{ matrix.name }} :: ${{ matrix.python-version }}"
if: "runner.os == 'Linux'"
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
mkdir build-host-only
Expand Down
98 changes: 0 additions & 98 deletions .github/workflows/ci_windows_x64-libshortfin.yml

This file was deleted.

Loading