Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ee7be1a
Disable some LLVM options; use separate src and build folders for llv…
steven-johnson Oct 17, 2022
17375eb
Update pip.yml
steven-johnson Oct 17, 2022
bd473f2
Update pip.yml
steven-johnson Oct 17, 2022
e1133f3
Update pip.yml
steven-johnson Oct 17, 2022
d1212f9
Merge branch 'main' into srj/pip-checkout
steven-johnson Oct 18, 2022
1bd8713
Update pip.yml
steven-johnson Oct 18, 2022
3da081b
Update pip.yml
steven-johnson Oct 18, 2022
a2e0f7a
Update pip.yml
steven-johnson Oct 18, 2022
abc8041
Update pip.yml
steven-johnson Oct 18, 2022
1eaa60d
Update pip.yml
steven-johnson Oct 18, 2022
bacad58
Update pip.yml
steven-johnson Oct 18, 2022
9088b96
Update pip.yml
steven-johnson Oct 18, 2022
e534c8f
Update pip.yml
steven-johnson Oct 18, 2022
304effc
Update pip.yml
steven-johnson Oct 18, 2022
3fd146d
Update pip.yml
steven-johnson Oct 18, 2022
6cf2306
Update pip.yml
steven-johnson Oct 18, 2022
0702aa1
Update pip.yml
steven-johnson Oct 18, 2022
97aa364
Update pip.yml
steven-johnson Oct 18, 2022
8737fc5
Update pip.yml
steven-johnson Oct 18, 2022
acbc699
Update pip.yml
steven-johnson Oct 19, 2022
ed5723b
Update pip.yml
steven-johnson Oct 19, 2022
3dc996e
Update pip.yml
steven-johnson Oct 19, 2022
66e2fba
Update pip.yml
steven-johnson Oct 19, 2022
c9e2932
fixes
steven-johnson Oct 19, 2022
ecfff13
fixes
steven-johnson Oct 20, 2022
449487a
fixes
steven-johnson Oct 20, 2022
f97cbbc
Update pip.yml
steven-johnson Oct 20, 2022
cf19fdc
fixes
steven-johnson Oct 20, 2022
20c105d
Update pip.yml
steven-johnson Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 27 additions & 16 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
arch: [ x86_64, aarch64 ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2.0.0
Expand Down Expand Up @@ -67,9 +67,6 @@ jobs:

runs-on: ${{ matrix.runner }}

env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/local

strategy:
fail-fast: false
matrix:
Expand All @@ -83,28 +80,29 @@ jobs:
arch: x86_64;arm64

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0

- name: Cache LLVM build folder
id: cache-llvm
uses: actions/cache@v3
uses: actions/cache@v3.0.11
with:
path: local
path: local-llvm
key: llvmorg-${{ env.LLVM_VER }}-${{ runner.os }}

- uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/get-cmake@latest

- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0
if: steps.cache-llvm.outputs.cache-hit != 'true'
with:
path: llvm-src
repository: llvm/llvm-project
ref: llvmorg-${{ env.LLVM_VER }}

- name: Configure LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: >
cmake -G Ninja -S llvm -B build
cmake -G Ninja -S llvm-src/llvm -B llvm-build
-DCMAKE_BUILD_TYPE=Release
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
"-DLLVM_TARGETS_TO_BUILD=X86;ARM;NVPTX;AArch64;Mips;Hexagon;WebAssembly"
Expand All @@ -116,46 +114,59 @@ jobs:
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_ENABLE_ZSTD=OFF
-DLLVM_ENABLE_ZLIB=OFF
-DLLVM_ENABLE_OCAMLDOC=OFF
-DLLVM_ENABLE_BINDINGS=OFF
-DLLVM_ENABLE_IDE=OFF

- name: Build LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: cmake --build build
run: cmake --build llvm-build

- name: Install LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: cmake --install build --prefix local
run: cmake --install llvm-build --prefix local-llvm

# Remove the LLVM source tree after building it, otherwise we can
# run out of local space while building halide
- name: Clean LLVM Source
if: steps.cache-llvm.outputs.cache-hit != 'true'
shell: bash
run: rm -rf llvm-src

- name: Configure Halide
if: runner.os == 'Windows'
run: >
cmake -G "Visual Studio 17 2022" -T ClangCL -A "${{ matrix.arch }}" -S . -B build
cmake -G "Visual Studio 17 2022" -T ClangCL -A "${{ matrix.arch }}" -S . -B halide-build
-DWITH_DOCS=NO
-DWITH_PYTHON_BINDINGS=NO
-DWITH_TESTS=NO
-DWITH_TUTORIALS=NO
-DWITH_UTILS=NO
-DLLVM_DIR=${{ github.workspace }}/local-llvm/lib/cmake/llvm

- name: Configure Halide
if: runner.os != 'Windows'
run: >
cmake -G Ninja -S . -B build
cmake -G Ninja -S . -B halide-build
-DCMAKE_BUILD_TYPE=Release
"-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}"
-DWITH_DOCS=NO
-DWITH_PYTHON_BINDINGS=NO
-DWITH_TESTS=NO
-DWITH_TUTORIALS=NO
-DWITH_UTILS=NO
-DLLVM_DIR=${{ github.workspace }}/local-llvm/lib/cmake/llvm

- name: Build Halide
run: cmake --build build --config Release
run: cmake --build halide-build --config Release

- name: Install Halide
run: cmake --install build --config Release --prefix local
run: cmake --install halide-build --config Release --prefix local-halide

- name: Build wheels
uses: pypa/cibuildwheel@v2.10.2
env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/local-halide
CIBW_BUILD: "cp38-${{ matrix.pytag }} cp39-${{ matrix.pytag }} cp310-${{ matrix.pytag }}"
CIBW_ARCHS_MACOS: "universal2"

Expand All @@ -168,7 +179,7 @@ jobs:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.1.0
- run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"-DHalide_Python_INSTALL_IMPORTED_DEPS=ON",
"-DWITH_TESTS=NO",
"-DWITH_TUTORIALS=NO",
"-DCMAKE_PREFIX_PATH=$ENV{CMAKE_PREFIX_PATH}",
"--no-warn-unused-cli",
],
)