Build circle-interpreter #2
This file contains hidden or 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
| name: Build circle-interpreter | |
| on: | |
| # TODO turn on schedule | |
| #schedule: | |
| # # 05:00 AM (KST, UTC+9:00) Mon-Fri | |
| # - cron: '00 20 * * 0-4' | |
| workflow_dispatch: | |
| 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' || github.repository_owner == 'shs-park' | |
| strategy: | |
| matrix: | |
| # TODO activate jammy | |
| ubuntu_code: [ focal ] | |
| include: | |
| - ubuntu_code: focal | |
| ubuntu_ver: 2004 | |
| # TODO update comment ID, these are experimental IDs of issue #14669 | |
| comment_id: 2658267907 | |
| - ubuntu_code: jammy | |
| ubuntu_ver: 2204 | |
| comment_id: 2658268060 | |
| # TODO change to the 'ubuntu-latest' | |
| #runs-on: ubuntu-latest | |
| runs-on: [ self-hosted, shs-park ] | |
| container: | |
| image: nnfw/one-devtools:${{ matrix.ubuntu_code }} | |
| options: --user root | |
| env: | |
| NNCC_WORKSPACE : build/debian | |
| NNCC_INSTALL_PREFIX : ${{ github.workspace }}/debian/tmp/usr/ | |
| 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 }} | |
| 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: | | |
| exit(1) # TODO enable posting comments | |
| echo "Artifact URL is ${{ steps.step-upload.outputs.artifact-url }}" | |
| COMMENT_ADDR=https://api.github.com/repos/Samsung/ONE/issues/comments/${{ matrix.comment_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 }}"}' |