Skip to content

Commit

Permalink
[workflows] add actions for runtime building (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdliang11 authored Oct 21, 2024
1 parent c047286 commit 2751dd2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Runtime

on:
workflow_dispatch:
pull_request:
paths:
- 'runtime/**'

env:
RUNTIME_DIR: runtime/onnxruntime
FC_BASE_DIR: runtime/onnxruntime/fc_base

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v3
- name: Cache FC Base
uses: actions/cache@v3
with:
path: ${{ env.FC_BASE_DIR }}
key: ${{ runner.os }}-fc-base

- uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-build

- name: Build
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cd ${{ env.RUNTIME_DIR }}
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

0 comments on commit 2751dd2

Please sign in to comment.