From d6c4d554653ba9129f9f3a03288499d3da25bb16 Mon Sep 17 00:00:00 2001 From: Hyeongseok Oh Date: Mon, 5 Aug 2024 13:40:29 +0900 Subject: [PATCH] [infra] Introduce github workflow for onecc This commit introduces onecc build & test on github workflow. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh --- .github/workflows/run-onecc-build.yml | 94 +++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/workflows/run-onecc-build.yml diff --git a/.github/workflows/run-onecc-build.yml b/.github/workflows/run-onecc-build.yml new file mode 100644 index 00000000000..a31ebfafe80 --- /dev/null +++ b/.github/workflows/run-onecc-build.yml @@ -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