Skip to content

Commit

Permalink
refactor: split host/embedded builds
Browse files Browse the repository at this point in the history
  • Loading branch information
polvalente committed Jul 16, 2024
1 parent ef0b8f1 commit 3a16cd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/embedded_devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ jobs:
- name: Clone IREE
if: steps.cache-iree-dir.outputs.cache-hit != 'true'
run: make clone_iree
- name: Compile Host
run: ./scripts/build_and_package.sh --target=host
- name: Compile
run: ./scripts/build_and_package.sh --target=${{ matrix.build_target }} --build-host
run: ./scripts/build_and_package.sh --target=${{ matrix.build_target }}
- name: Release Artifacts
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down
13 changes: 0 additions & 13 deletions scripts/build_and_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@ get_nproc() {
fi
}

# Initialize variable
build_host_flag=false

# Parse options
while [[ $# -gt 0 ]]; do
case $1 in
--target=*)
IREE_BUILD_TARGET="${1#*=}"
shift # Shift past the argument
;;
--build-host)
build_host_flag=true
shift # Shift past the argument
;;
*)
echo "Unknown option: $1"
exit 1
Expand Down Expand Up @@ -75,12 +68,6 @@ build() {
fi
}

if $build_host_flag; then
echo "Building Host Runtime"
build host
echo "Done building Host Runtime"
fi

build $IREE_BUILD_TARGET
IREE_INSTALL_DIR=$(install_dir $IREE_BUILD_TARGET)

Expand Down

0 comments on commit 3a16cd9

Please sign in to comment.