Made note of the diverge of VSCP common code and the daemon #19
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| VSCPD_BUILD_NUMBER: ${{ github.run_number }} | |
| jobs: | |
| build: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Linux | |
| os: ubuntu-latest | |
| configure: >- | |
| cmake -S . -B build | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DVSCPD_BUILD_NUMBER=${VSCPD_BUILD_NUMBER} | |
| -DVSCPD_PACKAGE_GENERATORS=TGZ\;DEB | |
| - name: macOS | |
| os: macos-latest | |
| configure: >- | |
| cmake -S . -B build | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_PREFIX_PATH=${BREW_PREFIXES} | |
| -DVSCPD_BUILD_NUMBER=${VSCPD_BUILD_NUMBER} | |
| -DVSCPD_PACKAGE_GENERATORS=TGZ | |
| - name: Windows | |
| os: windows-latest | |
| configure: >- | |
| cmake -S . -B build | |
| -G "Visual Studio 17 2022" | |
| -A x64 | |
| -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake | |
| -DVCPKG_TARGET_TRIPLET=x64-windows | |
| -DVSCPD_BUILD_MANPAGES=OFF | |
| -DVSCPD_BUILD_NUMBER=${VSCPD_BUILD_NUMBER} | |
| -DVSCPD_PACKAGE_GENERATORS=ZIP\;NSIS | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| curl \ | |
| libcurl4-openssl-dev \ | |
| libexpat1-dev \ | |
| libmosquitto-dev \ | |
| libssl-dev \ | |
| libsystemd-dev \ | |
| pandoc \ | |
| pkg-config | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install cjson expat mosquitto openssl pandoc | |
| echo "BREW_PREFIXES=$(brew --prefix openssl);$(brew --prefix expat);$(brew --prefix mosquitto);$(brew --prefix curl);$(brew --prefix cjson)" >> "$GITHUB_ENV" | |
| - name: Setup vcpkg | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git "$env:RUNNER_TEMP/vcpkg" | |
| & "$env:RUNNER_TEMP/vcpkg/bootstrap-vcpkg.bat" | |
| "VCPKG_ROOT=$env:RUNNER_TEMP/vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Install NSIS | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| choco install nsis -y --no-progress | |
| "C:\Program Files (x86)\NSIS" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| & "C:\Program Files (x86)\NSIS\makensis.exe" /VERSION | |
| - name: Configure | |
| shell: bash | |
| run: ${{ matrix.configure }} | |
| - name: Build | |
| run: cmake --build build --config Release --parallel | |
| - name: Package | |
| run: cpack --config build/CPackConfig.cmake -C Release | |
| working-directory: ${{ github.workspace }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: vscpd-${{ matrix.name }} | |
| if-no-files-found: error | |
| path: | | |
| *.deb | |
| *.tar.gz | |
| *.tgz | |
| *.zip | |
| *.exe | |
| build/*.deb | |
| build/*.tar.gz | |
| build/*.tgz | |
| build/*.zip | |
| build/*.exe |