Skip to content

Commit

Permalink
DRAFT Workflow for circle-interpreter
Browse files Browse the repository at this point in the history
on-going draft to generate circle-interpreter

Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark committed Feb 17, 2025
1 parent 2ac8fce commit 3dcc77d
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions .github/workflows/build-circle-intp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Build circle-interpreter

on:
schedule:
# 05:00 AM (KST, UTC+9:00) Mon-Fri
- cron: '00 20 * * 0-4'
workflow_dispatch:
pull_request:
branches:
- master
paths:
- '.github/workflows/build-circle-intp.yml'

defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
onecc-test:
if: github.repository_owner == 'Samsung'
strategy:
matrix:
ubuntu_code: [ focal, jammy ]
include:
- ubuntu_code: focal
ubuntu_ver: 2004
commnt_id: 2658267907
- ubuntu_code: jammy
ubuntu_ver: 2204
comment_id: 2658268060
runs-on: ubuntu-latest
container:
image: nnfw/one-devtools:${{ matrix.ubuntu_code }}
options: --user root
env:
NNCC_WORKSPACE : build
NNCC_INSTALL_PREFIX : install
name: circle-interpreter ubuntu ${{ matrix.ubuntu_ver }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install required packages
run: |
apt-get update
apt-get install curl
- name: Build without test
run: |
CIR_INTP_ITEMS="angkor;cwrap;pepper-str;pepper-strcast;pepper-csv2vec;pp"
CIR_INTP_ITEMS="${CIR_INTP_ITEMS};oops;loco;logo-core;logo;locop"
CIR_INTP_ITEMS="${CIR_INTP_ITEMS};hermes;hermes-std;safemain;mio-circle08"
CIR_INTP_ITEMS="${CIR_INTP_ITEMS};luci-compute;luci;luci-interpreter"
CIR_INTP_ITEMS="${CIR_INTP_ITEMS};foder;arser;vconone;circle-interpreter"
echo ${CIR_INTP_ITEMS}
./nncc configure \
-DENABLE_STRICT_BUILD=ON \
-DENABLE_TEST=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DEXTERNALS_BUILD_THREADS=$(nproc) \
-DCMAKE_INSTALL_PREFIX=${NNCC_INSTALL_PREFIX} \
-DBUILD_WHITELIST="${CIR_INTP_ITEMS}"
./nncc build -j$(nproc)
cmake --build ${NNCC_WORKSPACE} -- install
- name: Gather files
run: |
cd ${NNCC_WORKSPACE}
mkdir -p cirintp
cp -v ./${NNCC_INSTALL_PREFIX}/bin/circle-interpreter ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libloco.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_env.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_import.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_interpreter.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_lang.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_logex.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_log.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_plan.so ./cirintp/.
cp -v ./${NNCC_INSTALL_PREFIX}/lib/libluci_profile.so ./cirintp/.
- name: Upload Artifact
id: step-upload
uses: actions/upload-artifact@v4
with:
name: circle_intp_${{ matrix.ubuntu_ver }}
# TODO enable retention-days, default is 90
# retention-days: 3
path: |
${{ env.NNCC_WORKSPACE }}/cirintp/
# refer https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#update-an-issue-comment
# TODO update comment id from experiment to official
# TODO enable update URL when key is available
- name: Update URL
if: false
run: |
echo "Artifact URL is ${{ steps.step-upload.outputs.artifact-url }}"
COMMENT_ADDR=https://api.github.com/repos/Samsung/ONE/issues/comments/${{ matrix.commnt_id }}
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.COMMENT_UPDATE_KEY }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
${COMMENT_ADDR} \
-d '{"body":"${{ steps.step-upload.outputs.artifact-url }}"}'

0 comments on commit 3dcc77d

Please sign in to comment.