Rev 68 | Blame | Compare with Previous | Last modification | View Log | Download
name: Domoticz PR Checkon:pull_request:branches:- development- masterpaths-ignore:- 'msbuild/**'- '.github/**'- 'tools/**'- '**.md'- '**.txt'# Allows you to run this workflow manually from the Actions tabworkflow_dispatch:env:PR_NR: ${{ github.event.pull_request.number }}jobs:# This workflow contains a single job called "build"build:# The type of runner that the job will run onruns-on: ubuntu-latest# Steps represent a sequence of tasks that will be executed as part of the jobsteps:# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it- uses: actions/checkout@v2with:fetch-depth: 0# Prepare environment- name: prepare environmentrun: |sudo timedatectl set-timezone Europe/Amsterdambuildnr=$(git rev-list HEAD --count)echo "BUILDNR=$(($buildnr + 2107))" >> $GITHUB_ENVif [ "${GITHUB_EVENT_NAME}" == 'pull_request' ]; thenecho "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENVecho "PRNUMBER=$(echo ${PR_NR})" >> $GITHUB_ENVecho "Domoticz build for PR ${PR_NR}! Building version $(($buildnr + 2107)) from branch ${GITHUB_HEAD_REF}"elseecho "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENVecho "PRNUMBER=$(echo ${GITHUB_SHA})" >> $GITHUB_ENVfi# install dependencies- name: dependenciesrun: |sudo apt-get update && sudo apt-get --autoremove upgradesudo apt-get install make gcc g++ libssl-dev git libcurl4-gnutls-dev libusb-dev python3-dev zlib1g-dev libcereal-dev liblua5.3-dev uthash-devsudo apt-get install python3-pytest python3-pytest-bddsudo apt-get install lua5.3 luarockssudo luarocks install bustedsudo luarocks install luacov# Disabled March 2022 - sudo luarocks install lodash# get CMake- name: cmake-compilerun: |curl -sSL https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-Linux-x86_64.tar.gz -o cmake.tar.gz;sudo tar xf cmake.tar.gz --strip 1 -C /usr/local;export PATH=/usr/local/bin:$PATH;# Boost- name: build boost librariesrun: |wget https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz >> /dev/null 2>&1tar xfz boost_1_79_0.tar.gzcd boost_1_79_0/./bootstrap.sh./b2 stage threading=multi link=static --with-thread --with-system --with-chrono >> /dev/null 2>&1sudo ./b2 install threading=multi link=static --with-thread --with-system --with-chrono >> /dev/null 2>&1# OpenZWave- name: openzwaverun: |cd $GITHUB_WORKSPACEcd ..git clone https://github.com/domoticz/open-zwave.git open-zwave-read-onlycd open-zwave-read-onlymakesudo make install >> /dev/null 2>&1# Domoticz- name: build domoticzrun: |cd $GITHUB_WORKSPACEcmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=open-zwave-read-only CMakeLists.txtmake# Run automated tests (disabled March 2022)#- name: unit-tests domoticz-dzVents# run: |# cd $GITHUB_WORKSPACE/dzVents/runtime/tests# busted --coverage -o TAP *# luacov# tail -19 luacov.report.out# continue-on-error: true- name: functional-tests domoticzrun: |cd $GITHUB_WORKSPACEln -s ../test/gherkin/resources/testwebcontent www/testsudo ./domoticz -sslwww 0 -wwwroot www -pidfile /var/run/domoticz.pid -daemonpytest-3 -rA --tb=no test/gherkin/sudo kill -s TERM `sudo cat /var/run/domoticz.pid`continue-on-error: true# Packaging- name: package domoticz# if: ${{ false }}run: |cd $GITHUB_WORKSPACEmkdir packagetar czf package/domoticz_linux_x86_64.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease www/ scripts/ Config/ dzVents/shasum -a 256 package/domoticz_linux_x86_64.tgz > package/domoticz_linux_x86_64.tgz.sha256sumcp appversion.h.txt package/version_linux_x86_64.hcp History.txt package/history_linux_x86_64.txt# Artifact upload- name: Upload artifacts# if: ${{ false }}uses: actions/upload-artifact@v2with:name: domoticz_linux_x86_64-${{ github.event.pull_request.number }}-${{ github.run_number }}path: package/domoticz_linux_x86_64.tgzretention-days: 7