Test Windows runtime on presubmit, merge build/test runtime jobs. (#11032)
Progress on https://github.com/iree-org/iree/issues/11009, depends on
https://github.com/iree-org/iree/pull/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
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9c70106..ba6548f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -252,16 +252,12 @@
################################## 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
@@ -273,50 +269,6 @@
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"
-
- build_runtime_windows:
- needs: setup
- if: needs.setup.outputs.should-run == 'true' && needs.setup.outputs.ci-stage == 'postsubmit'
- runs-on: windows-2022
- env:
- BUILD_DIR: build-runtime
- 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
- - 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
- name: "Testing runtime"
run: |
./build_tools/github_actions/docker_run.sh \
@@ -325,6 +277,28 @@
./build_tools/cmake/ctest_all.sh \
"${BUILD_DIR}"
+ build_test_runtime_windows:
+ needs: setup
+ if: needs.setup.outputs.should-run == 'true'
+ runs-on: managed-windows-cpu
+ defaults:
+ run:
+ shell: bash
+ env:
+ 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: ./build_tools/scripts/git/update_runtime_submodules.sh
+ - name: "Configuring MSVC"
+ uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d # v1.12.0
+ - name: "Building runtime"
+ run: ./build_tools/cmake/build_runtime.sh "${BUILD_DIR}"
+ - name: "Testing runtime"
+ run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"
+
################################# Tensorflow #################################
# Jobs that build the IREE-Tensorflow integrations
##############################################################################
@@ -773,9 +747,8 @@
- test_gpu
# Subsets
- - build_runtime
- - build_runtime_windows
- - test_runtime
+ - build_test_runtime
+ - build_test_runtime_windows
# Tensorflow
- build_tf_integrations