Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
3110ade
DRAFT for the generating debian package of circle-interpreter with
shs-park Apr 24, 2025
79331b9
Use the quilt method for packaging
shs-park Apr 25, 2025
7f0c655
Revise the rules to copy .so files directly from original source
shs-park Apr 25, 2025
e1a914d
Revise the rules to copy .so files directly from original source
shs-park Apr 25, 2025
3880c4c
Update the changelog
shs-park Apr 25, 2025
e231184
Revise the build-circle-intp.yml workflow to test on private repo
shs-park Apr 25, 2025
6762817
Fix the path
shs-park Apr 25, 2025
8934b8c
Use only focal in the matrix
shs-park Apr 25, 2025
e60a5e1
Add a comment
shs-park Apr 25, 2025
8874137
Revise the path of each targets
shs-park Apr 25, 2025
44a707f
Add inputs to the workflow.
shs-park Apr 28, 2025
9fcc3d3
Fix a typo..
shs-park Apr 28, 2025
1822403
Fix the path of build directory
shs-park Apr 28, 2025
71a668c
chmod -x make-cirint
shs-park Apr 28, 2025
b2dba1e
Fix path and typo
shs-park Apr 28, 2025
6ef30aa
Add some release related work
shs-park Apr 28, 2025
79b8f14
Revise build directory
shs-park Apr 28, 2025
81f960f
Reorder some debian related commands
shs-park Apr 28, 2025
4fa910f
Add some debug code
shs-park Apr 28, 2025
3bd1699
Fix the path access
shs-park Apr 28, 2025
481b15e
Fix Path
shs-park Apr 28, 2025
18453ea
Add author and email for the dch command
shs-park Apr 28, 2025
a00d1c5
Use secret key
shs-park Apr 28, 2025
1007de1
Add private keys
shs-park Apr 28, 2025
1b16a2f
Add debug log
shs-park Apr 29, 2025
09affcf
revise the usage of debuild
shs-park Apr 29, 2025
7bf6a35
Revise debuild envrironment
shs-park Apr 29, 2025
79ddb73
Revise the debuild environment
shs-park Apr 29, 2025
496a043
reorder some lines
shs-park Apr 29, 2025
89dd944
Revise debuild env..
shs-park Apr 29, 2025
cf24d28
Add no-tty option to the gpg.conf
shs-park Apr 29, 2025
fb70b67
Revise to use GPG_AGENT_INFO=1
shs-park Apr 29, 2025
6d134ed
Retry
shs-park Apr 29, 2025
da9a4da
add batch option
shs-park Apr 29, 2025
c7ae918
retry..
shs-park Apr 29, 2025
1d9a391
retry with debsign
shs-park Apr 29, 2025
0ca1ff3
Remove error generating line
shs-park Apr 29, 2025
5a6a5de
Add debug log
shs-park Apr 29, 2025
1dbc783
Clean .gnupg directory
shs-park Apr 29, 2025
abfc66e
pass the cat error
shs-park Apr 29, 2025
733fcaa
Fix error;
shs-park Apr 29, 2025
af56a2b
debsign ok. upload artifacts
shs-park Apr 29, 2025
149539f
Revise current implementation
shs-park Apr 29, 2025
d0e67fa
Enable uploading to the Launchpad
shs-park Apr 29, 2025
637e51b
Fix path of installing binaries
shs-park Apr 30, 2025
d174abf
Create the create-pr-on-success job
shs-park Apr 30, 2025
c0a0ac5
Release Version - true/false
shs-park Apr 30, 2025
ec85838
Fix new lines
shs-park Apr 30, 2025
6062338
Enable jammy distribution
shs-park Apr 30, 2025
742291d
Fix duplicated artifact issue
shs-park Apr 30, 2025
0e66aee
Add docker credential and remove if statement for generating tarball
shs-park Apr 30, 2025
e2ea3fb
revise credential names
shs-park Apr 30, 2025
ec8e0c2
DRAFT for the generating debian package of circle-interpreter with
shs-park Apr 24, 2025
65ce166
Use the quilt method for packaging
shs-park Apr 25, 2025
f3102f6
Revise the rules to copy .so files directly from original source
shs-park Apr 25, 2025
3ea2f80
Revise the rules to copy .so files directly from original source
shs-park Apr 25, 2025
75afb01
Update the changelog
shs-park Apr 25, 2025
24c6a93
Revise the build-circle-intp.yml workflow to test on private repo
shs-park Apr 25, 2025
d10ab5f
Fix the path
shs-park Apr 25, 2025
8952b52
Use only focal in the matrix
shs-park Apr 25, 2025
3377688
Add a comment
shs-park Apr 25, 2025
fabf910
Revise the path of each targets
shs-park Apr 25, 2025
a7bdaae
Add inputs to the workflow.
shs-park Apr 28, 2025
58749e9
Fix a typo..
shs-park Apr 28, 2025
43738a2
Fix the path of build directory
shs-park Apr 28, 2025
e899296
chmod -x make-cirint
shs-park Apr 28, 2025
ddb1194
Fix path and typo
shs-park Apr 28, 2025
2612f8d
Add some release related work
shs-park Apr 28, 2025
d214b41
Revise build directory
shs-park Apr 28, 2025
de328af
Reorder some debian related commands
shs-park Apr 28, 2025
6d19fc1
Add some debug code
shs-park Apr 28, 2025
ae5d238
Fix the path access
shs-park Apr 28, 2025
9a152f6
Fix Path
shs-park Apr 28, 2025
f861527
Add author and email for the dch command
shs-park Apr 28, 2025
159d587
Use secret key
shs-park Apr 28, 2025
d4b780a
Add private keys
shs-park Apr 28, 2025
a107740
Add debug log
shs-park Apr 29, 2025
efc54f4
revise the usage of debuild
shs-park Apr 29, 2025
25af7cd
Revise debuild envrironment
shs-park Apr 29, 2025
4f80471
Revise the debuild environment
shs-park Apr 29, 2025
4174729
reorder some lines
shs-park Apr 29, 2025
cbd6c1f
Revise debuild env..
shs-park Apr 29, 2025
ecf9197
Add no-tty option to the gpg.conf
shs-park Apr 29, 2025
7a6264c
Revise to use GPG_AGENT_INFO=1
shs-park Apr 29, 2025
36fe348
Retry
shs-park Apr 29, 2025
1fd12f2
add batch option
shs-park Apr 29, 2025
1c13009
retry..
shs-park Apr 29, 2025
6a47cdf
retry with debsign
shs-park Apr 29, 2025
1fac071
Remove error generating line
shs-park Apr 29, 2025
1486936
Add debug log
shs-park Apr 29, 2025
201def7
Clean .gnupg directory
shs-park Apr 29, 2025
1d5cca5
pass the cat error
shs-park Apr 29, 2025
7f45bf0
Fix error;
shs-park Apr 29, 2025
a9f5fa2
debsign ok. upload artifacts
shs-park Apr 29, 2025
65bb22f
Revise current implementation
shs-park Apr 29, 2025
4f134c1
Enable uploading to the Launchpad
shs-park Apr 29, 2025
ceaa485
Fix path of installing binaries
shs-park Apr 30, 2025
0bcf060
Create the create-pr-on-success job
shs-park Apr 30, 2025
0fbba29
Release Version - true/false
shs-park Apr 30, 2025
d1c1215
Fix new lines
shs-park Apr 30, 2025
8f3cd90
Enable jammy distribution
shs-park Apr 30, 2025
a1ebe6d
Fix duplicated artifact issue
shs-park Apr 30, 2025
67b4c02
Add docker credential and remove if statement for generating tarball
shs-park Apr 30, 2025
bae412f
revise credential names
shs-park Apr 30, 2025
5cb4935
Merge branch 'infra/debian-circle-interpreter-bin' of github.com:shs-…
shs-park May 7, 2025
855ae70
This removes the use of root privileges in the workflow.
shs-park May 7, 2025
95dc5dd
Revise the version name for the branch name.
shs-park May 7, 2025
5b03d1d
Fix a typo
shs-park May 7, 2025
6fef54b
Separate distros by distro names
shs-park May 9, 2025
aedea84
Fix a typo
shs-park May 9, 2025
aecdcf4
Remove unised makefile for circle-interpreter debian package
shs-park May 12, 2025
cf02ce9
This will allow the source-is-missing error
shs-park May 12, 2025
5a6eb41
Surpress warnings by adding source-is-missing info
shs-park May 12, 2025
b75867d
Clean up some source-is-missing items
shs-park May 12, 2025
1850d97
Remove unused makefile: make-cirint
shs-park May 13, 2025
095207b
Split the `changelog` files by distribution.
shs-park May 13, 2025
236b793
Revise the create PR on success
shs-park May 13, 2025
d742e9b
Fix name and path for the artifacts
shs-park May 13, 2025
fe49cf2
Fix path for the changelogs
shs-park May 13, 2025
4261f16
Fix the changelog path
shs-park May 13, 2025
4fa20e1
Rename the workflow name
shs-park May 14, 2025
d7d0756
Revise the step for Creating PR
shs-park May 14, 2025
219dafc
indent of EOF usage
shs-park May 14, 2025
5e361ff
Test indent for usage of cat/EOF
shs-park May 14, 2025
b1c80d5
Test indent for usage of cat/EOF
shs-park May 14, 2025
9bf26ce
Test indent for usage of cat/EO
shs-park May 14, 2025
014b44b
Test indent for usage of cat/EOF
shs-park May 14, 2025
37b39ed
T_T
shs-park May 14, 2025
ce03656
Add quote to the arguments
shs-park May 14, 2025
74ee805
Applying changes from origin
shs-park May 14, 2025
d726ffa
Github Token usage
shs-park May 15, 2025
d74965c
Setting GITHUB_TOKEN
shs-park May 15, 2025
b731515
Unify the `changelog` files across all distributions.
shs-park May 15, 2025
7f6e1a7
Simplify changelogs
shs-park May 15, 2025
ca38002
Clean up description
shs-park May 15, 2025
5e85673
Remove unused comment
shs-park May 16, 2025
ac4f875
Give root privilege to the docker container
shs-park May 19, 2025
faa7a3a
Revise the installation path for circle-interpreter
shs-park May 19, 2025
7e9241e
New Line
shs-park May 19, 2025
dd5e0de
New line
shs-park May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions .github/workflows/build-circle-intp.yml

This file was deleted.

278 changes: 278 additions & 0 deletions .github/workflows/pub-circle-int-launchpad.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
name: Publish circle-interpreter to Launchpad

on:
# TODO turn on schedule
#schedule:
# # 05:00 AM (KST, UTC+9:00) Mon-Fri
# - cron: '00 20 * * 0-4'
workflow_dispatch:
inputs:
cirint_version:
description: 'The version of circle-interpreter'
required: true
default: '1.30.0'
cirint_description:
description: 'Description of changelog for circle-interpreter'
required: true
deb_fullname:
description: 'Full name of Debian package author'
required: false
default: 'On-device AI developers'
deb_email:
description: 'Email address of Debian package author'
required: false
default: 'nnfw@samsung.com'
is_release:
description: 'Is this a release version?
Set to false to append date-based subversion.
(true/false)'
required: false
default: 'false'

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:
configure:
if: github.repository_owner == 'Samsung' || github.repository_owner == 'shs-park'
name: Set current date and time
# TODO change to the 'ubuntu-latest'
#runs-on: ubuntu-latest
runs-on: [ self-hosted, shs-park ]
outputs:
version: ${{ steps.set-datetime.outputs.version }}
br_version: ${{ steps.set-datetime.outputs.br_version }}
steps:
- name: Set date and time
id: set-datetime
run: |
base_version="${{ inputs.cirint_version }}"
is_release="${{ inputs.is_release }}"
if [[ "$is_release" == "true" ]]; then
version="${base_version}"
br_version="${base_version}"
else
release_date=$(date +%Y%m%d%H%M)
version="${base_version}~${release_date}"
br_version="${base_version}-${release_date}"
fi
echo "version=${version}" >> $GITHUB_OUTPUT
echo "br_version=${br_version}" >> $GITHUB_OUTPUT

debian-release:
needs: configure
strategy:
matrix:
# TODO activate noble
ubuntu_code: [ focal, jammy ]
name: circle-interpreter ubuntu ${{ matrix.ubuntu_code }}
# 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
credentials:
username: ${{ secrets.NNFW_DOCKER_USERNAME }}
password: ${{ secrets.NNFW_DOCKER_TOKEN }}
env:
NNCC_BUILD: build
NNCC_WORKSPACE: build/release
NNCC_INSTALL_PREFIX: ${{ github.workspace }}/build/release.install
CIRINTP_PREFIX: cirintp
steps:
- name: Prepare, set distro versions
id: prepare
run: |
VERSION="${{ needs.configure.outputs.version }}~${{ matrix.ubuntu_code }}"
changes_file="circle-interpreter_${VERSION}_source.changes"
tarball_file="circle-interpreter_${VERSION}.orig.tar.xz"
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "changes_file=${changes_file}" >> $GITHUB_OUTPUT
echo "tarball_file=${tarball_file}" >> $GITHUB_OUTPUT

- name: Checkout
uses: actions/checkout@v4

- 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_BUILD}
mkdir -p ${CIRINTP_PREFIX}
cp -v ${NNCC_INSTALL_PREFIX}/bin/circle-interpreter ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libloco.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_env.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_import.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_interpreter.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_lang.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_logex.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_log.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_plan.so ./${CIRINTP_PREFIX}/.
cp -v ${NNCC_INSTALL_PREFIX}/lib/libluci_profile.so ./${CIRINTP_PREFIX}/.

- name: Update changelog
run: |
cd ${{ env.NNCC_BUILD }}/${{ env.CIRINTP_PREFIX }}
cp -rf ../../infra/debian/circle-interpreter ./debian
export DEBFULLNAME="${{ inputs.deb_fullname }}"
export DEBEMAIL="${{ inputs.deb_email }}"
dch -v "${{ steps.prepare.outputs.VERSION }}" \
--distribution "${{ matrix.ubuntu_code }}" \
"${{ inputs.cirint_description }}" -b

- name: Create original tarball
run: |
cd ${{ env.NNCC_BUILD }}
tar -caf ${{ steps.prepare.outputs.tarball_file }} ${{ env.CIRINTP_PREFIX }}

- name: Signing with debuild and debsign
run: |
cd ${{ env.NNCC_BUILD }}/${{ env.CIRINTP_PREFIX }}
rm -rf ~/.gnupg
echo -n "${{ secrets.GPG_NNFW_SIGNING_KEY }}" | base64 --decode | gpg --import
# get fingerprint
FPR=$(gpg --list-keys --with-colons | awk -F: '$1 == "fpr" { print $10; exit }')
echo "$FPR:6:" | gpg --import-ownertrust
debuild -S -us -uc
debsign -k${FPR} ../circle-interpreter_*.changes

- name: Upload to Launchpad
run: |
cd ${{ env.NNCC_BUILD }}
mkdir -p ~/.ssh
echo "${{ secrets.LAUNCHPAD_NNFW_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
dput ppa:circletools/nightly ${{ steps.prepare.outputs.changes_file }}

- name: Upload artifact, circle-interpreter
uses: actions/upload-artifact@v4
with:
name: circle-interpreter_${{ steps.prepare.outputs.VERSION }}
retention-days: 3
path: |
${{ env.NNCC_BUILD }}/${{ steps.prepare.outputs.tarball_file }}

create-changelog-artifact:
needs: [ configure, debian-release ]
# TODO need to activate the branch condition
# if: ${{ success() && github.ref == 'refs/heads/master' }}
if: ${{ success() }}
# TODO change to the 'ubuntu-latest'
#runs-on: ubuntu-latest
runs-on: [ self-hosted, shs-park ]
env:
DEFAULT_DISTRO: jammy
steps:
- name: Download tarball, ${{ env.DEFAULT_DISTRO }}
uses: actions/download-artifact@v4
with:
name: circle-interpreter_${{ needs.configure.outputs.version }}~${{ env.DEFAULT_DISTRO }}

- name: Copy changelogs
run: |
mkdir changelogs
mkdir ${{ env.DEFAULT_DISTRO }}
tar -axf circle-interpreter_${{ needs.configure.outputs.version }}~${{ env.DEFAULT_DISTRO }}.orig.tar.xz \
-C ${{ env.DEFAULT_DISTRO }}
cp ${{ env.DEFAULT_DISTRO }}/cirintp/debian/changelog changelogs/changelog

- name: Upload artifact, changelogs
uses: actions/upload-artifact@v4
with:
name: changelogs
retention-days: 3
path: |
changelogs

create-pr-on-success:
needs: [ configure, create-changelog-artifact ]
# TODO need to activate the branch condition
# if: ${{ success() && github.ref == 'refs/heads/master' }}
if: ${{ success() }}
# TODO change to the 'ubuntu-latest'
#runs-on: ubuntu-latest
runs-on: [ self-hosted, shs-park ]
env:
BR_VERSION: ${{ needs.configure.outputs.br_version }}
permissions:
contents: write
pull-requests: write
steps:
- name: Prepare, set distro versions
id: prepare
run: |
VERSION="${{ needs.configure.outputs.version }}"
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT

- name: Checkout
uses: actions/checkout@v4

- name: Set up Git
run: |
git config --global user.name "Seungho Henry Park"
git config --global user.email "shs.park@samsung.com"

- name: Download tarball
uses: actions/download-artifact@v4
with:
name: changelogs

- name: Update the changelog file
run: |
cp changelog infra/debian/circle-interpreter/

- name: Create PR branch and commit changelog
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH=auto/update-cirint-changelog-${BR_VERSION}
git checkout -b ${BRANCH}
git add infra/debian/circle-interpreter/changelog
git commit -m "[infra/debian] Update changelog for circle-interpreter" \
-m "This updates the changelog for circle-interpreter_${{ steps.prepare.outputs.VERSION }}." \
-m "It is auto-generated PR from github workflow." \
-m "" \
-m "ONE-DCO-1.0-Signed-off-by: Seungho Henry Park <shs.park@samsung.com>"
git push origin ${BRANCH}

- name: Create PR
env:
GH_TOKEN: ${{ secrets.SHSPARK_GITHUB_TOKEN }}
run: |
BRANCH=auto/update-cirint-changelog-${BR_VERSION}
gh pr create \
--title "[infra/debian] Update changelog for circle-interpreter" \
--body "$(cat <<EOF
This updates the changelog for circle-interpreter_${{ steps.prepare.outputs.VERSION }}.
This PR includes updated changelog after successful debian build.
It is auto-generated PR from github workflow.

ONE-DCO-1.0-Signed-off-by: Seungho Henry Park <shs.park@samsung.com>
EOF
)" \
--head "${BRANCH}" \
--base "master"
Loading