Skip to content

Commit

Permalink
Test workflow for validating packages
Browse files Browse the repository at this point in the history
  • Loading branch information
not-jenni committed Sep 7, 2021
1 parent 2884f27 commit 7c4bdd1
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 38 deletions.
62 changes: 31 additions & 31 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,38 +53,38 @@ jobs:
experimental: false

# Windows packages.
- os: windows-2019
build_package: main-dist
experimental: false
- os: windows-2019
build_package: py-runtime-pkg
experimental: false
- os: windows-2019
build_package: py-xla-compiler-tools-pkg
experimental: true
- os: windows-2019
build_package: py-tflite-compiler-tools-pkg
experimental: true
- os: windows-2019
build_package: py-tf-compiler-tools-pkg
experimental: true
# - os: windows-2019
# build_package: main-dist
# experimental: false
# - os: windows-2019
# build_package: py-runtime-pkg
# experimental: false
# - os: windows-2019
# build_package: py-xla-compiler-tools-pkg
# experimental: true
# - os: windows-2019
# build_package: py-tflite-compiler-tools-pkg
# experimental: true
# - os: windows-2019
# build_package: py-tf-compiler-tools-pkg
# experimental: true

# Macos packages.
- os: macos-latest
build_package: main-dist
experimental: true
- os: macos-latest
build_package: py-runtime-pkg
experimental: true
- os: macos-latest
build_package: py-xla-compiler-tools-pkg
experimental: true
- os: macos-latest
build_package: py-tflite-compiler-tools-pkg
experimental: true
- os: macos-latest
build_package: py-tf-compiler-tools-pkg
experimental: true
# - os: macos-latest
# build_package: main-dist
# experimental: true
# - os: macos-latest
# build_package: py-runtime-pkg
# experimental: true
# - os: macos-latest
# build_package: py-xla-compiler-tools-pkg
# experimental: true
# - os: macos-latest
# build_package: py-tflite-compiler-tools-pkg
# experimental: true
# - os: macos-latest
# build_package: py-tf-compiler-tools-pkg
# experimental: true
env:
CIBW_BUILD_VERBOSITY: 1
# Note that on Linux, we run under docker with an altered path.
Expand Down Expand Up @@ -263,4 +263,4 @@ jobs:
workflow: Validate and Publish Release
token: ${{ secrets.WRITE_ACCESS_TOKEN }}
ref: "${{ env.tag_name }}"
inputs: '{"release_id": "${{ github.event.inputs.release_id }}"}'
inputs: '{"release_id": "${{ github.event.inputs.release_id }}", "package_version": "${{ github.event.inputs.package_version }}", "build_run_id": "${{ github.run_id }}"}'
4 changes: 2 additions & 2 deletions .github/workflows/schedule_snapshot_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: "Tag snapshot release"
runs-on: ubuntu-18.04
# Don't run this in everyone's forks.
if: github.repository == 'google/iree'
# if: github.repository == 'google/iree'
steps:
- name: Checking out repository
uses: actions/checkout@v2
Expand All @@ -34,7 +34,7 @@ jobs:
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.WRITE_ACCESS_TOKEN }}
branch: main
branch: validate-release
tags: true

- name: Create Release
Expand Down
56 changes: 51 additions & 5 deletions .github/workflows/validate_and_publish_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Publishes a draft snapshot, after performing validation to make sure all
# packages are stable (coming soon).
# Publishes a draft snapshot, after performing validation to make sure all linux
# packages are stable.
name: Validate and Publish Release

on:
Expand All @@ -8,13 +8,59 @@ on:
release_id:
description: 'Release id to publish'
required: true
default: ''

# TODO(jennik): Add more validation. https://github.com/google/iree/issues/6316
package_version:
description: 'Version of the package'
required: true
build_run_id:
description: 'Run ID for the build_package.yml workflow that triggered this workflow'
required: true

jobs:
validate_packages:
name: "Validate packages"
# TODO(jennik): Look into testing windows and macos builds.
runs-on: ubuntu-18.04
steps:
- name: Download packages
id: download_packages
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.WRITE_ACCESS_TOKEN}}
workflow: build_package.yml
run_id: ${{ github.event.inputs.build_run_id }}
- name: Display downloaded files
run: |
pwd
ls -R
- name: Set up python
id: set_up_python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install python packages
id: install_python_packages
run: |
python -m pip install -f file://$PWD/artifact/ iree-compiler-snapshot iree-jax-snapshot iree-runtime-snapshot iree-tools-tflite-snapshot iree-tools-tf-snapshot iree-tools-xla-snapshot
- name: Run tools with basic commands
id: run_tools_with_basic_commands
run: |
tar -xf artifact/iree-dist-snapshot-${{ github.event.inputs.package_version }}-linux-x86_64.tar.xz
cd bin
./iree-benchmark-module --help
./iree-benchmark-trace --help
# ./iree-check-module --help
# ./iree-dump-module --help
./iree-flatcc-cli --help
./iree-opt --help
./iree-run-mlir --help
./iree-run-module --help
./iree-run-trace --help
./iree-tblgen --help
./iree-translate --help
publish_release:
name: "Publish release"
needs: validate_packages
runs-on: ubuntu-18.04
steps:
- name: Publish Release
Expand Down

0 comments on commit 7c4bdd1

Please sign in to comment.