Skip to content

Commit

Permalink
Add build_runtime_windows CI job. (#11012)
Browse files Browse the repository at this point in the history
Progress on #11009

Tested here:
https://github.com/ScottTodd/iree/actions/runs/3380820232/jobs/5614038219

Post-submit only for now, so we can monitor it. I saw one build hang in
the "Configuring MSVC" step:
https://github.com/ScottTodd/iree/actions/runs/3380762369/jobs/5613916852
  • Loading branch information
ScottTodd authored Nov 3, 2022
1 parent 6b421ca commit a0c6bd5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,22 @@ jobs:
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'
Expand Down Expand Up @@ -758,6 +774,7 @@ jobs:

# Subsets
- build_runtime
- build_runtime_windows
- test_runtime

# Tensorflow
Expand Down
5 changes: 3 additions & 2 deletions build_tools/scripts/git/update_runtime_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set -xeuo pipefail

SCRIPT_DIR="$(dirname -- "$( readlink -f -- "$0"; )")"

readarray -t RUNTIME_SUBMODULES < "${SCRIPT_DIR}/runtime_submodules.txt"
# Read lines from runtime_submodules.txt, stripping \r characters on Windows.
readarray -t RUNTIME_SUBMODULES < <(cat build_tools/scripts/git/runtime_submodules.txt | tr -d '\r')

git submodule sync && git submodule update --init ${RUNTIME_SUBMODULES[@]}
git submodule sync && git submodule update --init --jobs 8 --depth 1 ${RUNTIME_SUBMODULES[@]}

0 comments on commit a0c6bd5

Please sign in to comment.