Skip to content

Commit

Permalink
fix: add target option
Browse files Browse the repository at this point in the history
  • Loading branch information
polvalente committed Jul 16, 2024
1 parent 7ef3c61 commit fee1738
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/embedded_devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
if: steps.cache-iree-dir.outputs.cache-hit != 'true'
run: make clone_iree
- name: Compile
run: ./scripts/build_and_package.sh ${{ matrix.build_target }} --build-host
run: ./scripts/build_and_package.sh --target=${{ matrix.build_target }} --build-host
- name: Release Artifacts
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down
6 changes: 4 additions & 2 deletions scripts/build_and_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -e

IREE_BUILD_TARGET=$1

get_nproc() {
if [ "$(uname -s)" = "Darwin" ]; then
sysctl -n hw.ncpu
Expand All @@ -18,6 +16,10 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ do

SCRIPT_DIR=$(dirname "$0")

${SCRIPT_DIR}/build_and_package.sh ${IREE_BUILD_TARGET}
${SCRIPT_DIR}/build_and_package.sh --target=${IREE_BUILD_TARGET}

done
2 changes: 1 addition & 1 deletion scripts/build_mac_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ do

SCRIPT_DIR=$(dirname "$0")

${SCRIPT_DIR}/build_and_package.sh ${IREE_BUILD_TARGET}
${SCRIPT_DIR}/build_and_package.sh --target=${IREE_BUILD_TARGET}

done

0 comments on commit fee1738

Please sign in to comment.