forked from ton-blockchain/ton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github workflow for appimages creation
- Loading branch information
Showing
4 changed files
with
89 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Ubuntu TON build (AppImages, x86-64) | ||
|
||
on: [push,workflow_dispatch,workflow_call] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install system libraries | ||
run: | | ||
sudo apt update | ||
sudo apt install -y build-essential git cmake ninja-build libc++-dev libc++abi-dev | ||
sudo apt remove libgsl-dev | ||
- if: matrix.os != 'ubuntu-24.04' | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x llvm.sh | ||
sudo ./llvm.sh 16 all | ||
- name: Build TON | ||
run: | | ||
git submodule sync --recursive | ||
git submodule update | ||
cp assembly/native/build-ubuntu-shared.sh . | ||
chmod +x build-ubuntu-shared.sh | ||
./build-ubuntu-shared.sh -t -a | ||
- name: Make AppImages | ||
run: | | ||
cp assembly/appimage/create-appimages.sh . | ||
cp assembly/appimage/AppRun . | ||
cp assembly/appimage/ton.png . | ||
chmod +x create-appimages.sh | ||
./create-appimages.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ton-appimages-${{ matrix.os }} | ||
path: appimages/artifacts |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
export PATH=$PATH:$(dirname "$0")/usr/bin | ||
cd "$(dirname $APPIMAGE)" & exec app "$@" |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
if [ ! -d "artifacts" ]; then | ||
echo "No artifacts found." | ||
exit 2 | ||
fi | ||
|
||
rm -rf appimages | ||
|
||
mkdir -p appimages/artifacts | ||
|
||
wget -nc https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage | ||
chmod +x ./appimagetool-x86_64.AppImage | ||
|
||
cd appimages | ||
for file in ../artifacts/*; do | ||
if [[ -f "$file" && "$file" != *.so ]]; then | ||
appName=$(basename "$file") | ||
echo $appName | ||
# prepare AppDir | ||
mkdir -p $appName.AppDir/usr/{bin,lib} | ||
cp ../AppRun $appName.AppDir/AppRun | ||
sed -i "s/app/$appName/g" $appName.AppDir/AppRun | ||
chmod +x ./$appName.AppDir/AppRun | ||
printf '[Desktop Entry]\nName='$appName'\nExec='$appName'\nIcon='$appName'\nType=Application\nCategories=Utility;\n' > $appName.AppDir/$appName.desktop | ||
cp ../ton.png $appName.AppDir/$appName.png | ||
cp $file $appName.AppDir/usr/bin/ | ||
chmod +x ./$appName.AppDir/usr/bin/$appName | ||
# create AppImage | ||
./../appimagetool-x86_64.AppImage $appName.AppDir | ||
mv $appName-x86_64.AppImage artifacts/$appName | ||
fi | ||
done | ||
|
||
cp -r ../artifacts/{smartcont,lib} artifacts/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.