2022-04-04 18:13:29 +08:00
|
|
|
name: "Setup build environment"
|
|
|
|
description: "Setup the build environment. An action so that it can be shared between in-tree/out-of-tree jobs"
|
|
|
|
|
2022-04-13 21:26:38 +08:00
|
|
|
inputs:
|
2022-04-13 23:48:04 +08:00
|
|
|
cache-suffix:
|
2022-04-13 21:26:38 +08:00
|
|
|
description: |
|
|
|
|
Additional string that is used to compute the ccache hash.
|
|
|
|
Different jobs running the action need distinct values for this key,
|
|
|
|
but the content is irrelevant.
|
|
|
|
required: true
|
|
|
|
|
2022-04-04 18:13:29 +08:00
|
|
|
runs:
|
|
|
|
using: "composite"
|
2022-08-12 07:35:15 +08:00
|
|
|
|
2022-04-04 18:13:29 +08:00
|
|
|
steps:
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
2022-08-12 07:35:15 +08:00
|
|
|
|
2022-04-04 18:13:29 +08:00
|
|
|
- name: Install MLIR Python depends
|
|
|
|
run: |
|
|
|
|
python -m pip install -r $GITHUB_WORKSPACE/externals/llvm-project/mlir/python/requirements.txt
|
|
|
|
shell: bash
|
2022-08-12 07:35:15 +08:00
|
|
|
|
2022-04-04 18:13:29 +08:00
|
|
|
- name: Install PyTorch nightly depends
|
|
|
|
run: |
|
|
|
|
python -m pip install -r requirements.txt
|
|
|
|
shell: bash
|
2022-08-12 07:35:15 +08:00
|
|
|
|
2022-04-04 18:13:29 +08:00
|
|
|
- name: Install Ninja
|
|
|
|
uses: llvm/actions/install-ninja@55d844821959226fab4911f96f37071c1d4c3268
|
2022-08-12 07:35:15 +08:00
|
|
|
|
2022-04-04 18:13:29 +08:00
|
|
|
- name: Ccache for C++ compilation
|
2022-08-12 07:35:15 +08:00
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
2022-04-04 18:13:29 +08:00
|
|
|
with:
|
2022-08-12 07:35:15 +08:00
|
|
|
key: ${{ runner.os }}-torch_mlir_build_assets-${{ inputs.cache-suffix }}
|
2022-07-22 05:16:03 +08:00
|
|
|
max-size: 2G
|
2022-09-01 07:09:46 +08:00
|
|
|
verbose: 2
|