Skip to content

Commit

Permalink
Test Windows runtime on presubmit, merge build/test runtime jobs. (#1…
Browse files Browse the repository at this point in the history
…1032)

Progress on #11009, depends on
#11048

Changes:
* `build_runtime` + `test_runtime` -> `build_test_runtime` (overhead
from repository cloning, artifact upload, and artifact download was
taking longer than just running the tests from the same job)
* `build_runtime_windows` -> `build_test_runtime_windows`
  * Runs on `managed-windows-cpu` (larger build machine)
* Runs tests, instead of just builds (now that all runtime tests pass on
Windows)
* Runs on presubmit now too, instead of just postsubmit (the build
appears to be stable)

Sample run:
https://github.com/iree-org/iree/actions/runs/3412369869/jobs/5677798847
  • Loading branch information
ScottTodd authored Nov 7, 2022
1 parent 818ed91 commit 75636a9
Showing 1 changed file with 21 additions and 48 deletions.
69 changes: 21 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,12 @@ jobs:
################################## Subsets ###################################
# Jobs that build some subset of IREE
##############################################################################
build_runtime:
build_test_runtime:
needs: setup
if: needs.setup.outputs.should-run == 'true'
runs-on: ubuntu-20.04
env:
BUILD_DIR: build-runtime
outputs:
# Pass through the build directory as output so it's available to
# dependent jobs.
build-dir: ${{ env.BUILD_DIR }}
steps:
- name: "Checking out repository"
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # v2
Expand All @@ -273,57 +269,35 @@ jobs:
gcr.io/iree-oss/base@sha256:5d43683c6b50aebe1fca6c85f2012f3b0fa153bf4dd268e8767b619b1891423a \
./build_tools/cmake/build_runtime.sh \
"${BUILD_DIR}"
# Using a tar archive is necessary to preserve file permissions. See
# https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
# The upload action already does its own gzip compression, so no need to
# do our own.
- name: "Create build dir archive"
run: tar -cf ${BUILD_DIR}.tar ${BUILD_DIR}
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: "${{ env.BUILD_DIR }}.tar"
path: "${{ env.BUILD_DIR }}.tar"
- name: "Testing runtime"
run: |
./build_tools/github_actions/docker_run.sh \
--env IREE_VULKAN_DISABLE=1 \
gcr.io/iree-oss/base@sha256:5d43683c6b50aebe1fca6c85f2012f3b0fa153bf4dd268e8767b619b1891423a \
./build_tools/cmake/ctest_all.sh \
"${BUILD_DIR}"
build_runtime_windows:
build_test_runtime_windows:
needs: setup
if: needs.setup.outputs.should-run == 'true' && needs.setup.outputs.ci-stage == 'postsubmit'
runs-on: windows-2022
if: needs.setup.outputs.should-run == 'true'
runs-on: managed-windows-cpu
defaults:
run:
shell: bash
env:
BUILD_DIR: build-runtime
BUILD_DIR: build-runtime-windows
IREE_VULKAN_DISABLE: 1
steps:
- name: "Checking out repository"
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # v2
- name: "Checking out runtime submodules"
run: bash ./build_tools/scripts/git/update_runtime_submodules.sh
run: ./build_tools/scripts/git/update_runtime_submodules.sh
- name: "Configuring MSVC"
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d # v1.12.0
- name: "Building runtime"
run: bash ./build_tools/cmake/build_runtime.sh "${BUILD_DIR}"

test_runtime:
needs: [setup, build_runtime]
if: needs.setup.outputs.should-run == 'true'
runs-on: ubuntu-20.04
env:
BUILD_DIR: ${{ needs.build_runtime.outputs.build-dir }}
steps:
- name: "Checking out repository"
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # v2
with:
submodules: true
- name: "Downloading runtime build dir archive"
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: "${{ env.BUILD_DIR }}.tar"
- name: "Extracting runtime build dir archive"
run: tar -xf ${BUILD_DIR}.tar
run: ./build_tools/cmake/build_runtime.sh "${BUILD_DIR}"
- name: "Testing runtime"
run: |
./build_tools/github_actions/docker_run.sh \
--env IREE_VULKAN_DISABLE=1 \
gcr.io/iree-oss/base@sha256:5d43683c6b50aebe1fca6c85f2012f3b0fa153bf4dd268e8767b619b1891423a \
./build_tools/cmake/ctest_all.sh \
"${BUILD_DIR}"
run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"

################################# Tensorflow #################################
# Jobs that build the IREE-Tensorflow integrations
Expand Down Expand Up @@ -773,9 +747,8 @@ jobs:
- test_gpu

# Subsets
- build_runtime
- build_runtime_windows
- test_runtime
- build_test_runtime
- build_test_runtime_windows

# Tensorflow
- build_tf_integrations
Expand Down

0 comments on commit 75636a9

Please sign in to comment.