Skip to content

Commit

Permalink
Move module build to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikfon committed Nov 23, 2024
1 parent 2eec796 commit 8eba2b3
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,43 @@ jobs:
echo "Building Docker environment..."
docker build -t build-env:2.1 -f td-keyboard/build-env/Dockerfile .
# Build tg2sip
echo "Building tg2sip..."
(
cd tg2sip
# Create builder container
builder=$(docker run -t -v "$(pwd)":/src -w /src -d build-env:2.1)
# Build process
docker exec "$builder" cmake -DCMAKE_BUILD_TYPE=Release .
docker exec "$builder" cmake --build .
# Cleanup container
docker stop $builder
docker rm $builder
# Move artifacts
if [ -f gen_db ]; then
mv gen_db ../bin/gen_db
else
echo 'Error build gen_db'
exit 1
fi
if [ -f tg ]; then
mv tg bin/tg2sip
else
echo 'Error build tg2sip'
exit 1
fi
)
rm -rf tg2sip
# # Build tg2sip
# echo "Building tg2sip..."
# (
# cd $GITHUB_WORKSPACE/module/tg2sip
#
# # Create builder container
# builder=$(docker run -t -v "$(pwd)":/src -w /src -d build-env:2.1)
#
# # Build process
# docker exec "$builder" cmake -DCMAKE_BUILD_TYPE=Release .
# docker exec "$builder" cmake --build .
#
# # Cleanup container
# docker stop $builder
# docker rm $builder
#
# # Move artifacts
# if [ -f gen_db ]; then
# mv gen_db $GITHUB_WORKSPACE/module/bin/gen_db
# else
# echo 'Error build gen_db'
# exit 1
# fi
# ls -la
# if [ -f tg ]; then
# mv tg $GITHUB_WORKSPACE/module/bin/tg2sip
# else
# echo 'Error build tg2sip'
# exit 1
# fi
# )
# rm -rf $GITHUB_WORKSPACE/module/tg2sip

# Build td-keyboard
echo "Building td-keyboard..."
(
cd td-keyboard/build-env
cd $GITHUB_WORKSPACE/module/td-keyboard/build-env

# Create builder container
builder=$(docker run -t -v "$(pwd)/..":/src -w /src -d build-env:2.1)
Expand All @@ -70,11 +70,11 @@ jobs:

# Move artifacts
if [ -f td-keyboard ]; then
mv td-keyboard ../../bin/td-keyboard
mv td-keyboard $GITHUB_WORKSPACE/module/bin/td-keyboard
else
echo 'Error build td-keyboard'
exit 1
fi
)
rm -rf td-keyboard
rm -rf $GITHUB_WORKSPACE/module/td-keyboard
secrets: inherit

0 comments on commit 8eba2b3

Please sign in to comment.