Skip to content

Commit

Permalink
Try workflow_run trigger.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed Jul 24, 2024
1 parent 23bb428 commit c2199e9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pkgci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
with:
package_version: 0.dev1

core_tests:
name: Core Tests
needs: [setup, build_packages]
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'core_tests')
uses: ./.github/workflows/pkgci_core_tests.yml
# core_tests:
# name: Core Tests
# needs: [setup, build_packages]
# if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'core_tests')
# uses: ./.github/workflows/pkgci_core_tests.yml

# unit_test:
# name: Unit Test
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/pkgci_core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@

name: PkgCI core tests
on:
workflow_call:
inputs:
artifact_run_id:
type: string
default: ""
workflow_dispatch:
inputs:
artifact_run_id:
type: string
default: ""
# workflow_call:
# inputs:
# artifact_run_id:
# type: string
# default: ""
workflow_run:
workflows: [PkgCI]
types: [completed]

# workflow_dispatch:
# inputs:
# artifact_run_id:
# type: string
# default: ""

concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
Expand All @@ -28,6 +32,7 @@ concurrency:
jobs:
core_tests:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
env:
PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages
BUILD_DIR: build-tests
Expand All @@ -51,11 +56,12 @@ jobs:
with:
name: linux_x86_64_release_packages
path: ${{ env.PACKAGE_DOWNLOAD_DIR }}
run-id: ${{ github.event.workflow_run.id }}
- name: Setup base venv
run: |
./build_tools/pkgci/setup_venv.py ${VENV_DIR} \
--artifact-path=${PACKAGE_DOWNLOAD_DIR} \
--fetch-gh-workflow=${{ inputs.artifact_run_id }}
--fetch-gh-workflow=${{ github.event.workflow_run.id }}
- name: "Installing IREE nightly release Python packages"
run: |
source ${VENV_DIR}/bin/activate
Expand Down

0 comments on commit c2199e9

Please sign in to comment.