| # Copyright 2022 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| on: |
| workflow_call: |
| inputs: |
| build-dir: |
| required: true |
| type: string |
| |
| env: |
| IREE_DOCKER_WORKDIR: "/usr/src/github/iree" |
| |
| jobs: |
| build_runtime: |
| runs-on: ubuntu-20.04 |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # v2 |
| with: |
| submodules: true |
| - name: "Building runtime" |
| run: | |
| docker run --user="$(id -u):$(id -g)" \ |
| --volume="$PWD:$IREE_DOCKER_WORKDIR" \ |
| --workdir="$IREE_DOCKER_WORKDIR" \ |
| --rm \ |
| gcr.io/iree-oss/base@sha256:9d742e01507c292def852cbfebfae71412cff94df0ab2619f61f9a5a2a98f651 \ |
| ./build_tools/cmake/build_runtime.sh \ |
| "${{ inputs.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 it's likely |
| # unnecessary (and perhaps harmful) to do our own, though that hasn't been |
| # investigated. |
| - name: "Create build dir archive" |
| run: tar -cf ${{ inputs.build-dir }}.tar ${{ inputs.build-dir }} |
| - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 |
| with: |
| name: "${{ inputs.build-dir }}.tar" |
| path: "${{ inputs.build-dir }}.tar" |