Skip to content

Commit

Permalink
Merge build_test_runtime jobs into a single matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed May 28, 2024
1 parent 29e70ab commit fa394a4
Showing 1 changed file with 81 additions and 64 deletions.
145 changes: 81 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,84 +474,101 @@ jobs:
##############################################################################
build_test_runtime:
needs: setup
name: "build_test_runtime :: ${{ matrix.os }}"
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_test_runtime')
runs-on: ubuntu-20.04
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
runs-on: ubuntu-20.04
container: gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446
- os: windows-2022
runs-on: windows-2022
# No container, because Windows (https://github.com/actions/runner/issues/904).
- os: arm64
runs-on:
- self-hosted # must come first
- runner-group=${{ needs.setup.outputs.runner-group }}
- environment=${{ needs.setup.outputs.runner-env }}
- arm64
- os-family=Linux
container: gcr.io/iree-oss/base-arm64@sha256:9daa1cdbbf12da8527319ece76a64d06219e04ecb99a4cff6e6364235ddf6c59
env:
BUILD_DIR: build-runtime
BUILD_PRESET: test
steps:
- name: "Checking out repository"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: "Checking out runtime submodules"
run: ./build_tools/scripts/git/update_runtime_submodules.sh
- name: "Building runtime"
run: |
./build_tools/github_actions/docker_run.sh \
--env "BUILD_PRESET=test" \
gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446 \
./build_tools/cmake/build_runtime.sh \
"${BUILD_DIR}"
- name: "Testing runtime"
run: |
./build_tools/github_actions/docker_run.sh \
gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446 \
./build_tools/cmake/ctest_all.sh \
"${BUILD_DIR}"

build_test_runtime_arm64:
needs: setup
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_test_runtime_arm64')
runs-on:
- self-hosted # must come first
- runner-group=${{ needs.setup.outputs.runner-group }}
- environment=${{ needs.setup.outputs.runner-env }}
- arm64
- os-family=Linux
env:
BUILD_DIR: build-runtime-arm64
steps:
- name: "Checking out repository"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: "Checking out runtime submodules"
run: ./build_tools/scripts/git/update_runtime_submodules.sh
- name: "Building runtime"
run: |
./build_tools/github_actions/docker_run.sh \
--env "BUILD_PRESET=test" \
gcr.io/iree-oss/base-arm64@sha256:9daa1cdbbf12da8527319ece76a64d06219e04ecb99a4cff6e6364235ddf6c59 \
./build_tools/cmake/build_runtime.sh \
"${BUILD_DIR}"
- name: "Testing runtime"
run: |
./build_tools/github_actions/docker_run.sh \
gcr.io/iree-oss/base-arm64@sha256:9daa1cdbbf12da8527319ece76a64d06219e04ecb99a4cff6e6364235ddf6c59 \
./build_tools/cmake/ctest_all.sh \
"${BUILD_DIR}"
build_test_runtime_windows:
needs: setup
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_test_runtime_windows')
runs-on: windows-2022
defaults:
run:
shell: bash
env:
BUILD_DIR: build-runtime-windows
steps:
- name: "Checking out repository"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: "Checking out runtime submodules"
run: ./build_tools/scripts/git/update_runtime_submodules.sh
- name: "Configuring MSVC"
if: contains(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d # v1.12.0
- name: "Installing Python requirements"
run: pip install -r ./runtime/bindings/python/iree/runtime/build_requirements.txt

- name: "Building runtime"
env:
BUILD_PRESET: "test"
run: ./build_tools/cmake/build_runtime.sh "${BUILD_DIR}"
- name: "Testing runtime"
run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"

# build_test_runtime_arm64:
# needs: setup
# if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_test_runtime_arm64')
# runs-on:
# - self-hosted # must come first
# - runner-group=${{ needs.setup.outputs.runner-group }}
# - environment=${{ needs.setup.outputs.runner-env }}
# - arm64
# - os-family=Linux
# env:
# BUILD_DIR: build-runtime-arm64
# steps:
# - name: "Checking out repository"
# uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
# - name: "Checking out runtime submodules"
# run: ./build_tools/scripts/git/update_runtime_submodules.sh
# - name: "Building runtime"
# run: |
# ./build_tools/github_actions/docker_run.sh \
# --env "BUILD_PRESET=test" \
# gcr.io/iree-oss/base-arm64@sha256:9daa1cdbbf12da8527319ece76a64d06219e04ecb99a4cff6e6364235ddf6c59 \
# ./build_tools/cmake/build_runtime.sh \
# "${BUILD_DIR}"
# - name: "Testing runtime"
# run: |
# ./build_tools/github_actions/docker_run.sh \
# gcr.io/iree-oss/base-arm64@sha256:9daa1cdbbf12da8527319ece76a64d06219e04ecb99a4cff6e6364235ddf6c59 \
# ./build_tools/cmake/ctest_all.sh \
# "${BUILD_DIR}"

# build_test_runtime_windows:
# needs: setup
# if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_test_runtime_windows')
# runs-on: windows-2022
# defaults:
# run:
# shell: bash
# env:
# BUILD_DIR: build-runtime-windows
# steps:
# - name: "Checking out repository"
# uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
# - 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: "Installing Python requirements"
# run: pip install -r ./runtime/bindings/python/iree/runtime/build_requirements.txt
# - name: "Building runtime"
# env:
# BUILD_PRESET: "test"
# run: ./build_tools/cmake/build_runtime.sh "${BUILD_DIR}"
# - name: "Testing runtime"
# run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"

############################### Configurations ###############################
# Jobs that build IREE in some non-default configuration
##############################################################################
Expand Down Expand Up @@ -953,8 +970,8 @@ jobs:

# Subsets
- build_test_runtime
- build_test_runtime_arm64
- build_test_runtime_windows
# - build_test_runtime_arm64
# - build_test_runtime_windows

# Configurations
- python_release_packages
Expand Down

0 comments on commit fa394a4

Please sign in to comment.