mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
add github workflow for appimages creation
This commit is contained in:
parent
c411f193b4
commit
c8a48e4383
4 changed files with 89 additions and 0 deletions
51
.github/workflows/build-ton-linux-x86-64-appimage.yml
vendored
Normal file
51
.github/workflows/build-ton-linux-x86-64-appimage.yml
vendored
Normal file
|
@ -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
|
3
assembly/appimage/AppRun
Normal file
3
assembly/appimage/AppRun
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
export PATH=$PATH:$(dirname "$0")/usr/bin
|
||||||
|
cd "$(dirname $APPIMAGE)" & exec app "$@"
|
35
assembly/appimage/create-appimages.sh
Normal file
35
assembly/appimage/create-appimages.sh
Normal file
|
@ -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/
|
BIN
assembly/appimage/ton.png
Normal file
BIN
assembly/appimage/ton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue