-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
38 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 |
---|---|---|
|
@@ -41,7 +41,7 @@ env: | |
PRODUCT_LOW: "docspace" | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
PACKAGE_DIRECTORY: "/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}" | ||
BRANCH_BUILDTOOLS: 'develop' | ||
BRANCH_BUILDTOOLS: 'feature/test-build-packages' | ||
BRANCH_CLIENT: 'develop' | ||
BRANCH_SERVER: 'hotfix/v3.0.2' | ||
|
||
|
@@ -156,60 +156,60 @@ jobs: | |
run: | | ||
cd install/rpm/SPECS | ||
START_DOWNLOAD=$(date +%s) | ||
# START_DOWNLOAD=$(date +%s) | ||
wget -q -O ./SOURCES/buildtools.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-buildtools/archive/${BRANCH_BUILDTOOLS}.tar.gz" | ||
wget -q -O ./SOURCES/client.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-client/archive/${BRANCH_CLIENT}.tar.gz" | ||
wget -q -O ./SOURCES/server.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-server/archive/${BRANCH_SERVER}.tar.gz" | ||
wget -q -O ./SOURCES/DocStore.tar.gz "https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz" | ||
wget -q -O ./SOURCES/campaigns.tar.gz "https://github.com/ONLYOFFICE/ASC.Web.Campaigns/archive/master.tar.gz" | ||
wget -q -O ./SOURCES/plugins.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-plugins/archive/master.tar.gz" | ||
END_DOWNLOAD=$(date +%s) | ||
echo "Download time: $((END_DOWNLOAD - START_DOWNLOAD)) seconds" | ||
# END_DOWNLOAD=$(date +%s) | ||
# echo "Download time: $((END_DOWNLOAD - START_DOWNLOAD)) seconds" | ||
mv ./SOURCES/product.rpmlintrc ./SOURCES/${PRODUCT_LOW}.rpmlintrc | ||
sed -i -e '/BuildRequires/d' product.spec | ||
mkdir -p BUILD | ||
for archive in ./SOURCES/*.tar.gz; do | ||
tar -xzf "$archive" -C BUILD | ||
extracted_folder=$(tar -tzf "$archive" | head -1 | cut -f1 -d"/") | ||
new_folder=$(echo "$extracted_folder" | sed -E 's/^.*?(client|plugins|buildtools|server|templates)//') | ||
if [[ "$extracted_folder" != "$new_folder" ]]; then | ||
mv "BUILD/$extracted_folder" "BUILD/$new_folder" | ||
fi | ||
done | ||
# mkdir -p BUILD | ||
# for archive in ./SOURCES/*.tar.gz; do | ||
# tar -xzf "$archive" -C BUILD | ||
# extracted_folder=$(tar -tzf "$archive" | head -1 | cut -f1 -d"/") | ||
# new_folder=$(echo "$extracted_folder" | sed -E 's/^.*?(client|plugins|buildtools|server|templates)//') | ||
# if [[ "$extracted_folder" != "$new_folder" ]]; then | ||
# mv "BUILD/$extracted_folder" "BUILD/$new_folder" | ||
# fi | ||
# done | ||
START_FRONTEND=$(date +%s) | ||
bash ../../common/build-frontend.sh --srcpath install/rpm/SPECS/BUILD -di "false" | ||
END_FRONTEND=$(date +%s) | ||
echo "Frontend build time: $((END_FRONTEND - START_FRONTEND)) seconds" | ||
# START_FRONTEND=$(date +%s) | ||
# bash ../../common/build-frontend.sh --srcpath install/rpm/SPECS/BUILD -di "false" | ||
# END_FRONTEND=$(date +%s) | ||
# echo "Frontend build time: $((END_FRONTEND - START_FRONTEND)) seconds" | ||
START_BACKEND=$(date +%s) | ||
bash ../../common/build-backend.sh --srcpath install/rpm/SPECS/BUILD | ||
END_BACKEND=$(date +%s) | ||
echo "Backend build time: $((END_BACKEND - START_BACKEND)) seconds" | ||
# START_BACKEND=$(date +%s) | ||
# bash ../../common/build-backend.sh --srcpath install/rpm/SPECS/BUILD | ||
# END_BACKEND=$(date +%s) | ||
# echo "Backend build time: $((END_BACKEND - START_BACKEND)) seconds" | ||
START_PUBLISH=$(date +%s) | ||
bash ../../common/publish-backend.sh --srcpath install/rpm/SPECS/BUILD/server | ||
END_PUBLISH=$(date +%s) | ||
echo "Backend publish time: $((END_PUBLISH - START_PUBLISH)) seconds" | ||
# START_PUBLISH=$(date +%s) | ||
# bash ../../common/publish-backend.sh --srcpath install/rpm/SPECS/BUILD/server | ||
# END_PUBLISH=$(date +%s) | ||
# echo "Backend publish time: $((END_PUBLISH - START_PUBLISH)) seconds" | ||
sed -i \ | ||
-e '/bash install\/common\/build-frontend\.sh --srcpath %{_builddir} -di "false"/d' \ | ||
-e '/bash install\/common\/build-backend\.sh --srcpath %{_builddir}/d' \ | ||
-e '/bash install\/common\/publish-backend\.sh --srcpath %{_builddir}\/server/d' \ | ||
product.spec | ||
# sed -i \ | ||
# -e '/bash install\/common\/build-frontend\.sh --srcpath %{_builddir} -di "false"/d' \ | ||
# -e '/bash install\/common\/build-backend\.sh --srcpath %{_builddir}/d' \ | ||
# -e '/bash install\/common\/publish-backend\.sh --srcpath %{_builddir}\/server/d' \ | ||
# product.spec | ||
START_RPMBUILD=$(date +%s) | ||
# START_RPMBUILD=$(date +%s) | ||
rpmbuild -D "packager Ascensio System SIA <[email protected]>" \ | ||
-D "_topdir $(pwd)" \ | ||
-D "version ${PRODUCT_VERSION}" \ | ||
-D "release ${BUILD_NUMBER}" -ba product.spec | ||
END_RPMBUILD=$(date +%s) | ||
echo "RPM build time: $((END_RPMBUILD - START_RPMBUILD)) seconds" | ||
# END_RPMBUILD=$(date +%s) | ||
# echo "RPM build time: $((END_RPMBUILD - START_RPMBUILD)) seconds" | ||
TOTAL_TIME=$((END_RPMBUILD - START_DOWNLOAD)) | ||
echo "Total time: $TOTAL_TIME seconds" | ||
# TOTAL_TIME=$((END_RPMBUILD - START_DOWNLOAD)) | ||
# echo "Total time: $TOTAL_TIME seconds" | ||
- name: Sign DEB Packages | ||
if: matrix.packageType == 'deb' | ||
|
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