Skip to content

Commit

Permalink
feat: add package for devices workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
polvalente committed Jul 16, 2024
1 parent 6de5856 commit 377ed77
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/embedded_devices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: embedded_devices

on:
push:
branches:
- pv-feat/package-for-devices
tags:
- "v*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: macos-14
env:
MIX_ENV: prod
NX_IREE_PREFER_PRECOMPILED: false
NX_IREE_SOURCE_DIR: ./build-cache/iree
IREE_GIT_REV: candidate-20240604.914
strategy:
fail-fast: true
matrix:
build_target:
- ios
# - ios_simulator
# - visionos
# - visionos_simulator
# - tvos
# - tvos_simulator
steps:
- name: checkout
uses: actions/checkout@v4

- name: Install asdf and tools
uses: asdf-vm/actions/install@v3

- name: Setup dependencies and env
run: |
brew install ninja
mix local.hex --force
mix local.rebar --force
echo "NX_IREE_SOURCE_DIR=$(elixir -e 'IO.puts(Path.absname(~s(${{env.NX_IREE_SOURCE_DIR}})))')" > $GITHUB_ENV
- name: Cache mix dependencies
id: cache-mix-deps
uses: actions/cache@v4
with:
key: deps-${{ hashFiles('mix.lock') }}
path: |
./deps
- name: Get mix deps
if: steps.cache-mix-deps.outputs.cache-hit != 'true'
run: mix deps.get
- name: Cache IREE dir
id: cache-iree-dir
uses: actions/cache@v4
with:
key: iree-dir-${{ env.IREE_GIT_REV }}
path: |
${{ env.NX_IREE_SOURCE_DIR }}
- name: Clone IREE
if: steps.cache-iree-dir.outputs.cache-hit != 'true'
run: make clone_iree
- name: Compile
run: ./scripts/build_and_package.sh ${{ matrix.build_target }}
- name: Release Artifacts
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./iree-runtime/artifacts/*.tar.gz

0 comments on commit 377ed77

Please sign in to comment.