Subversion Repositories rld.domoticz

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

name: Domoticz Development (Beta)

on:
  push:
    branches: [ development ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          submodules: true

      #- name: Make an error (Enable debug)
      #  run: ./not-exist-file.sh it bloke build

      # install dependencies
      - name: dependencies
        run: |
          sudo apt-get update && sudo apt-get install
          sudo apt-get install make gcc g++ libssl-dev git libcurl4-gnutls-dev libusb-dev python3-dev zlib1g-dev libcereal-dev liblua5.3-dev uthash-dev

      # get CMake
      - name: cmake-compile
        run: |
          curl -sSL https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-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 libraries
        run: |
          wget https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz >> /dev/null 2>&1
          tar xfz boost_1_76_0.tar.gz
          cd boost_1_76_0/
          ./bootstrap.sh
          ./b2 stage threading=multi link=static --with-thread --with-system --with-chrono >> /dev/null 2>&1
          sudo ./b2 install threading=multi link=static --with-thread --with-system --with-chrono >> /dev/null 2>&1

      # OpenZWave
      - name: openzwave
        run: |
          cd $GITHUB_WORKSPACE
          cd ..
          git clone https://github.com/domoticz/open-zwave.git open-zwave-read-only
          cd open-zwave-read-only
          make
          sudo make install >> /dev/null 2>&1

      # Domoticz
      - name: build domoticz
        run: |
          cd $GITHUB_WORKSPACE
          cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=open-zwave-read-only CMakeLists.txt
          make

      # Packaging
      - name: package domoticz
        if: ${{ false }}
        run: |
          cd $GITHUB_WORKSPACE
          mkdir package
          tar 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.sha256sum
          cp appversion.h.txt package/version_linux_x86_64.h
          cp History.txt package/history_linux_x86_64.txt
      
      # Artifact upload
      - name: Upload artifacts
        if: ${{ false }}
        uses: actions/upload-artifact@v2
        with:
          name: domoticz_linux_x86_64-${{ github.sha }}
          path: package/domoticz_linux_x86_64.tgz
          retention-days: 7
 
      # Deploy
      - name: FTP Deployment
        if: ${{ false }}
        #if: github.repository_owner == 'domoticz'
        uses: SamKirkland/FTP-Deploy-Action@4.0.0
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          protocol: ftp
          local-dir: ./package/
          server-dir: beta/
          security: loose

      # Grok 2.tcp.ngrok.io DNS resolves to 52.14.18.129
      - name: Start SSH debug Session
        #if: ${{ failure() }}
        if: ${{ false }}
        uses: luchihoratiu/debug-via-ssh@main
        with:
         NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }}
         SSH_PASS: ${{ secrets.NGROK_PASSWORD }}