blob: 44f4ada4a2b25ab731bbdc969877d5c353bccf2c [file] [log] [blame]
# Builds packages for native (non cross-compiled) targets on supported
# platforms.
#
# For these mainline distributions, we use cibuildwheel and drive the
# packaging through python, extracting native assets. While this may seem
# hopelessly round-about, it lets us leverage a lot of what cibuildwheel
# does for free and get python packages to boot.
name: Build Native Release Packages
on:
workflow_dispatch:
inputs:
package_suffix:
description: 'Suffix to append to package names'
required: true
default: '-cidev'
package_version:
description: 'Version of the package'
required: true
default: '0.1a1'
release_id:
description: 'Release id to upload artifacts to'
required: true
default: ''
jobs:
build_core:
name: "${{ matrix.os }} :: Build Core Packages"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04]
experimental: [false]
# include:
# - os: macos-latest
# experimental: true
# - os: windows-2019
# experimental: true
steps:
- uses: actions/checkout@v2
with:
path: 'main_checkout'
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Write version info
shell: bash
run: |
cat << EOF > ./main_checkout/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)"
}
EOF
cat ./main_checkout/version_info.json
- name: Install cibuildwheel
shell: bash
run: |
python -m pip install cibuildwheel==1.7.2
# jobs:
# mondo-build:
# name: Performs a mondo-build of all optional components
# runs-on: ubuntu-18.04
# env:
# SRC_DIR: ${{ github.workspace }}/iree-src
# BUILD_DIR: ${{ github.workspace }}/iree-build
# INSTALL_DIR: ${{ github.workspace }}/iree-install
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# path: "iree-src"
# - uses: actions/setup-python@v2
# with:
# python-version: '3.8'
# - name: Report environment
# shell: bash
# run: |
# echo "GITHUB_RUN_ID=${GITHUB_RUN_ID}"
# echo "GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER}"
# echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}"
# echo "PWD=${PWD}"
# echo "PATH=${PATH}"
# - name: Install python deps
# shell: bash
# run: |
# # We aren't actually building anything that requires this, but the
# # TensorFlow build hard fails without it, even though we are only
# # building C++ (facepalm).
# python -m pip install numpy
# - name: Configure
# shell: bash
# run: |
# cmake -B "${BUILD_DIR}" "${SRC_DIR}" \
# -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
# -DIREE_BUILD_TENSORFLOW_COMPILER=ON \
# -DIREE_BUILD_XLA_COMPILER=ON \
# -DIREE_BUILD_TFLITE_COMPILER=ON \
# -DPython3_EXECUTABLE=$(which python)
# - name: Build
# shell: bash
# run: |
# cd "${BUILD_DIR}"
# make -j 4
# make install
# ls -lRh "${INSTALL_DIR}"
# - name: Upload Install Directory
# uses: actions/upload-artifact@v2
# with:
# name: iree-install-ubuntu-18.04
# path: ${{env.INSTALL_DIR}}/
# retention-days: 5