Skip to content

Commit

Permalink
Abbreviate main_checkout to c.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed Aug 4, 2023
1 parent 0ec34ab commit 6df749b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
path: "main_checkout"
path: "c" # Windows can hit path length limits, so use a short path.
submodules: true
ref: ${{ github.event.inputs.commit }}

Expand All @@ -101,7 +101,7 @@ jobs:
- name: Install dependencies (Windows)
if: "matrix.build-family == 'windows'"
shell: powershell
run: ./main_checkout/build_tools/python_deploy/install_windows_deps.ps1
run: ./c/build_tools/python_deploy/install_windows_deps.ps1
- name: "Configure MSVC (Windows)"
if: "matrix.build-family == 'windows'"
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d # v1.12.0
Expand All @@ -113,14 +113,14 @@ jobs:
- name: Write version info (release)
shell: bash
run: |
cat << EOF > ./main_checkout/version_info.json
cat << EOF > ./c/version_info.json
{
"package-suffix": "${{ github.event.inputs.package_suffix }}",
"package-version": "${{ github.event.inputs.package_version }}",
"iree-revision": "$(cd ./main_checkout && git rev-parse HEAD)"
"iree-revision": "$(cd ./c && git rev-parse HEAD)"
}
EOF
cat ./main_checkout/version_info.json
cat ./c/version_info.json
##########################################################################
# Build the main distribution tarball.
Expand All @@ -141,7 +141,7 @@ jobs:
docker run --rm -w=/work \
-v $PWD:/work \
"${MANYLINUX_X86_64_IMAGE}" \
bash -c 'export PATH=/opt/python/cp39-cp39/bin:$PATH; python ./main_checkout/build_tools/github_actions/build_dist.py main-dist'
bash -c 'export PATH=/opt/python/cp39-cp39/bin:$PATH; python ./c/build_tools/github_actions/build_dist.py main-dist'
##########################################################################
# py-runtime-pkg
Expand All @@ -157,7 +157,7 @@ jobs:
packages: "iree-runtime iree-runtime-instrumented"
output_dir: "${{ github.workspace }}/bindist"
run: |
./main_checkout/build_tools/python_deploy/build_linux_packages.sh
./c/build_tools/python_deploy/build_linux_packages.sh
- name: Build runtime wheels (MacOS)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'macos'"
Expand All @@ -168,7 +168,7 @@ jobs:
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11"
run: |
./main_checkout/build_tools/python_deploy/build_macos_packages.sh
./c/build_tools/python_deploy/build_macos_packages.sh
- name: Build runtime wheels (Windows)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'windows'"
Expand All @@ -179,7 +179,7 @@ jobs:
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11"
run: |
./main_checkout/build_tools/python_deploy/build_windows_packages.sh
./c/build_tools/python_deploy/build_windows_packages.sh
##########################################################################
# py-compiler-pkg
Expand All @@ -194,7 +194,7 @@ jobs:
packages: "iree-compiler"
output_dir: "${{ github.workspace }}/bindist"
run: |
./main_checkout/build_tools/python_deploy/build_linux_packages.sh
./c/build_tools/python_deploy/build_linux_packages.sh
- name: Build compiler wheels (MacOS)
if: "matrix.build-package == 'py-compiler-pkg' && matrix.build-family == 'macos'"
Expand All @@ -205,7 +205,7 @@ jobs:
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11"
run: |
./main_checkout/build_tools/python_deploy/build_macos_packages.sh
./c/build_tools/python_deploy/build_macos_packages.sh
- name: Build compiler wheels (Windows)
if: "matrix.build-package == 'py-compiler-pkg' && matrix.build-family == 'windows'"
Expand All @@ -216,7 +216,7 @@ jobs:
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11"
run: |
./main_checkout/build_tools/python_deploy/build_windows_packages.sh
./c/build_tools/python_deploy/build_windows_packages.sh
##########################################################################
# TF Compiler Tools
Expand All @@ -231,7 +231,7 @@ jobs:
docker run --rm -w=/work \
-v $PWD:/work \
"${MANYLINUX_X86_64_IMAGE}" \
bash -c 'export PATH=/opt/python/cp39-cp39/bin:$PATH; python ./main_checkout/build_tools/github_actions/build_dist.py py-tf-compiler-tools-pkg'
bash -c 'export PATH=/opt/python/cp39-cp39/bin:$PATH; python ./c/build_tools/github_actions/build_dist.py py-tf-compiler-tools-pkg'
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
Expand Down
14 changes: 7 additions & 7 deletions build_tools/github_actions/build_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
This is expected to be run from the project directory, containing the
following sub-directories:
- main_checkout/ : Main IREE repository checkout.
- c/ : Main IREE repository checkout.
- bindist/ : Directory where binary distribution artifacts are written.
- main_checkout/version_info.json : Version config information.
- c/version_info.json : Version config information.
Within the build environment (which may be the naked runner or a docker image):
- iree-build/ : The build tree.
Expand All @@ -33,13 +33,13 @@
It is not recommended to run cibuildwheel locally. However, this script can
be executed as if running within such an environment. To do so, create
a directory and:
ln -s /path/to/iree main_checkout
ln -s /path/to/iree c
python -m venv .venv
source .venv/bin/activate
python ./main_checkout/build_tools/github_actions/build_dist.py main-dist
python ./main_checkout/build_tools/github_actions/build_dist.py py-tflite-compiler-tools-pkg
python ./main_checkout/build_tools/github_actions/build_dist.py py-tf-compiler-tools-pkg
python ./c/build_tools/github_actions/build_dist.py main-dist
python ./c/build_tools/github_actions/build_dist.py py-tflite-compiler-tools-pkg
python ./c/build_tools/github_actions/build_dist.py py-tf-compiler-tools-pkg
That is not a perfect approximation but is close.
Expand All @@ -58,7 +58,7 @@
WORK_DIR = os.path.realpath(os.path.curdir)
BUILD_DIR = os.path.join(WORK_DIR, "iree-build")
INSTALL_DIR = os.path.join(WORK_DIR, "iree-install")
IREESRC_DIR = os.path.join(WORK_DIR, "main_checkout")
IREESRC_DIR = os.path.join(WORK_DIR, "c")
TF_INTEGRATIONS_DIR = os.path.join(IREESRC_DIR, "integrations/tensorflow")
BINDIST_DIR = os.environ.get("BINDIST_DIR")
if BINDIST_DIR is None:
Expand Down
10 changes: 5 additions & 5 deletions docs/developers/debugging/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* `.github/workflows/build_package.yml`: Release packaging jobs
* `build_tools/github_actions/build_dist.py`: Main script to build various
release packages (for all platforms). We usually use this when reproing to
approximate exactly what the CI does. Assumes a subdirectory of `main_checkout`
approximate exactly what the CI does. Assumes a subdirectory of `c`
and writes builds to `iree-build` and `iree-install` as a peer of it. To use
locally, just symlink your source dir as `main_checkout` in an empty
locally, just symlink your source dir as `c` in an empty
directory (versus checking out).

## Manylinux releases
Expand All @@ -21,11 +21,11 @@ you arrange otherwise. `yum` can be used to get some packages.
Get a docker shell (see exact docker image in build_package.yml workflow):

```shell
docker run --rm -it -v $(pwd):/work/main_checkout stellaraccident/manylinux2014_x86_64-bazel-4.2.2:latest /bin/bash
docker run --rm -it -v $(pwd):/work/c stellaraccident/manylinux2014_x86_64-bazel-4.2.2:latest /bin/bash
```

Remember that docker runs as root unless if you take steps otherwise. Don't
touch write files in the `/work/main_checkout` directory to avoid scattering
touch write files in the `/work/c` directory to avoid scattering
root owned files on your workstation.

The default system Python is 2.x, so you must select one of the more modern
Expand All @@ -41,7 +41,7 @@ Build core installation:
```shell
# (from within docker)
cd /work
python ./main_checkout/build_tools/github_actions/build_dist.py main-dist
python ./c/build_tools/github_actions/build_dist.py main-dist

# Also supports:
# main-dist
Expand Down

0 comments on commit 6df749b

Please sign in to comment.