build #498
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
name: build | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
schedule: | |
- cron: '0 6 * * *' | |
jobs: | |
test-python: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['2.7', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
if: matrix.python-version != '2.7' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade Python 3 pip | |
if: matrix.python-version != '2.7' | |
run: | | |
python -m pip install --upgrade pip | |
- name: Set up Python 2 | |
if: matrix.python-version == '2.7' | |
run: | | |
sudo apt install -y python2 | |
sudo ln -sf /usr/bin/python2 /usr/bin/python | |
curl -L -O "https://bootstrap.pypa.io/pip/2.7/get-pip.py" | |
python get-pip.py | |
- name: Install dependencies | |
run: | | |
pip install flake8 | |
- name: Compile sources | |
run: | | |
python -O -m compileall ./usr/lib/enigma2/python/Components/ | |
- name: Check code with flake8 | |
run: | | |
flake8 --ignore=E501,W191 --builtins="_" --show-source | |
test-skin: | |
needs: test-python | |
runs-on: ubuntu-20.04 | |
env: | |
CC: "gcc-10" | |
CXX: "g++-10" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set enigma2 repository | |
uses: actions/checkout@v3 | |
with: | |
repository: 'OpenPLi/enigma2' | |
ref: 'develop' | |
path: './enigma2' | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pip install twisted pyopenssl service_identity netifaces | |
- name: Install dev packages | |
run: | | |
sudo apt-get -q update | |
sudo apt install docbook-xsl gettext libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libfribidi-dev libavahi-client-dev libgif-dev mm-common | |
- name: Set tuxtxt repository | |
uses: actions/checkout@v3 | |
with: | |
repository: 'OpenPLi/tuxtxt' | |
path: './tuxtxt' | |
- name: Build enigma dependencies | |
run: | | |
git clone --depth 1 https://github.com/jack2015/libdvbsi.git | |
cd libdvbsi | |
autoreconf -i | |
./configure | |
make | |
sudo make install | |
cd ../tuxtxt/libtuxtxt | |
autoreconf -i | |
./configure --with-boxtype=generic DVB_API_VERSION=5 | |
make | |
sudo make install | |
cd ../tuxtxt | |
autoreconf -i | |
./configure --with-boxtype=generic DVB_API_VERSION=5 | |
make | |
sudo make install | |
cd ../.. | |
git clone --depth 1 https://github.com/dbus-cxx/libsigc--3.0.git | |
cd libsigc--3.0 | |
autoreconf -i | |
./configure | |
make | |
sudo make install | |
- name: Patch enigma cpp files | |
run: | | |
sed -i 's/eFatal/eDebug/g' enigma2/lib/gdi/gfbdc.cpp | |
sed -i 's/${sysconfdir}\/enigma2/.\/data/g' enigma2/lib/dvb/db.cpp | |
sed -i 's/bsodCatchSignals/\/\/bsodCatchSignals/g' enigma2/main/enigma.cpp | |
sed -i 's/${libdir}\/enigma2\/python\/StartEnigma.py/..\/test\/check_skin.py/g' enigma2/main/enigma.cpp | |
- name: Build enigma | |
run: | | |
cd ./enigma2 | |
autoreconf -i | |
./configure --with-libsdl=no --with-boxtype=nobox --enable-dependency-tracking ac_cv_prog_c_openmp=-fopenmp --with-textlcd | |
make | |
cd ./data | |
python convert-iso-639-3.py | |
- name: Patch enigma py files | |
run: | | |
sed -i 's/DEFAULT_SKIN = Sys/DEFAULT_SKIN = "SimpleGray-HD\/skin.xml" # Sys/g' enigma2/lib/python/skin.py | |
sed -i 's/reloadWindowStyles() #/# reloadWindowStyles() #/g' enigma2/lib/python/skin.py | |
sed -i 's/setResolution(xres, yres/setResolution(xres, yres, 8/g' enigma2/lib/python/skin.py | |
sed -i 's/${datadir}\/enigma2\/po\//.\/po\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${datadir}\/enigma2\//.\/data\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${datadir}\//.\/data\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${sysconfdir}\/enigma2\//\/tmp\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${sysconfdir}\//\/tmp\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${libdir}\/enigma2\//.\/lib\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${libdir}\//.\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/\/media\//\/tmp\/media\//g' enigma2/lib/python/Tools/Directories.py | |
sed -i 's/${datadir}\/enigma2/.\/data/g' enigma2/lib/python/Tools/ISO639.py | |
- name: Setup skin files for test | |
run: | | |
cp -R usr/lib/enigma2/* enigma2/lib | |
cp -R usr/share/enigma2/SimpleGray-HD enigma2/data | |
cp usr/share/fonts/* enigma2/data/fonts | |
- name: ========== Test skin screens load ========== | |
working-directory: './enigma2' | |
run: | | |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib PYTHONPATH=../test:./lib/python ENIGMA_DEBUG_LVL=0 main/enigma2 | |
deploy: | |
needs: test-python | |
if: always() && !contains(github.event.head_commit.message,'skip-release') && github.event_name == 'push' && needs.test-python.result == 'success' && github.repository == 'Taapat/skin-SimpleGray' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 2.7 | |
run: | | |
sudo apt install -y python2 | |
sudo ln -sf /usr/bin/python2 /usr/bin/python | |
- name: Compile sources | |
run: | | |
python -O -m compileall ./usr/lib/enigma2/python/Components/ | |
- name: Set git variables | |
run: | | |
echo "SRCPV=git$(git rev-list --count HEAD)" >> $GITHUB_ENV | |
echo "PKGV=git$(git rev-list --count HEAD)-1-${GITHUB_SHA::7}-r0.0" >> $GITHUB_ENV | |
echo "COMMIT_SUBJECT=$(git log -1 --pretty=format:%s)" >> $GITHUB_ENV | |
- name: Create plugin package files | |
run: | | |
sed -i 's/Version:/Version: ${{ env.PKGV }}/' deploy/control/control | |
mkdir ipk | |
- name: Build data package | |
run: | | |
tar --numeric-owner --group=0 --owner=0 -czf ./deploy/data.tar.gz ./usr/* | |
- name: Build control package | |
working-directory: './deploy/control' | |
run: | | |
tar --numeric-owner --group=0 --owner=0 -czf ../control.tar.gz ./* | |
- name: Build ipk package | |
working-directory: './deploy' | |
run: | | |
echo 2.0 > debian-binary | |
ar rv ../ipk/enigma2-plugin-skins-simple-gray_${{ env.PKGV }}_all.ipk debian-binary data.tar.gz control.tar.gz | |
ar rv ../ipk/enigma2-plugin-skins-simple-gray_${{ env.PKGV }}_all.ipk debian-binary data.tar.gz control.tar.gz | |
- name: Create release | |
uses: Taapat/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ env.SRCPV }} | |
name: ${{ env.COMMIT_SUBJECT }} | |
gzip: false | |
files: ipk/enigma2-plugin-skins-simple-gray_${{ env.PKGV }}_all.ipk |