-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[infra] Introduce github workflow for onecc
This commit introduces onecc build & test on github workflow. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
- Loading branch information
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Run ONECC Ubuntu Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- release/* | ||
paths: | ||
- '.github/workflows/run-onecc-build.yml' | ||
- 'nnas' | ||
- 'nncc' | ||
- 'compiler/**' | ||
- 'infra/**' | ||
- '!infra/debian/**' | ||
- '!infra/docker/**' | ||
- '!infra/doxygen/**' | ||
- '!infra/git-hooks/**' | ||
- '!infra/nnfw/**' | ||
- '!infra/onert-micro/**' | ||
- 'nnpackage/**' | ||
- 'res/**' | ||
- '!**/*.md' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
onecc-test: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
type: [ Debug, Release ] | ||
container: | ||
image: nnfw/one-devtools:bionic | ||
options: --user root | ||
env: | ||
NNCC_WORKSPACE : build | ||
NNCC_INSTALL_PREFIX : install | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Caching externals | ||
uses: actions/cache@v4 | ||
with: | ||
path: externals | ||
key: external-onecc | ||
restore-keys: | | ||
external- | ||
- name: Build | ||
run: | | ||
./nncc configure -DENABLE_STRICT_BUILD=ON -DCMAKE_BUILD_TYPE=${{ matrix.type }} \ | ||
-DEXTERNALS_BUILD_THREADS=$(nproc) -DCMAKE_INSTALL_PREFIX=${NNCC_INSTALL_PREFIX} | ||
./nncc build -j$(nproc) | ||
cmake --build ${NNCC_WORKSPACE} -- install | ||
- name: Test(Debug) | ||
if: matrix.type == 'Debug' | ||
env: | ||
LUCI_LOG : 100 | ||
run: ./nncc test | ||
|
||
- name: Test(Release) | ||
if: matrix.type == 'Release' | ||
run: | | ||
./nncc test | ||
${NNCC_WORKSPACE}/${NNCC_INSTALL_PREFIX}/bin/one-prepare-venv | ||
${NNCC_WORKSPACE}/${NNCC_INSTALL_PREFIX}/test/prepare_test_materials.sh | ||
export PATH=${PWD}/${NNCC_INSTALL_PATH}/bin:$PATH | ||
pushd ${NNCC_INSTALL_PATH}/test | ||
## one-import-tf -> one-optimize -> one-quantize -> one-codegen | ||
bash onecc_006.test | ||
## one-import-tflite | ||
bash onecc_014.test | ||
## one-import-bcq | ||
bash onecc_015.test | ||
## one-import-onnx | ||
bash onecc_016.test | ||
## one-pack | ||
bash onecc_019.test | ||
## one-profile | ||
bash onecc_021.test | ||
## one-quantize | ||
bash onecc_023.test | ||
bash onecc_026.test | ||
## one-infer | ||
bash onecc_027.test | ||
## onecc workflows | ||
bash onecc_032.test | ||
bash onecc_041.test |