Handle multiple instance of the same VID/PID devices #203
Workflow file for this run
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 and Test | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_call: | |
permissions: | |
contents: read | |
jobs: | |
build-and-test-msbuild: | |
name: Build and Test (Visual Studio) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Install dependencies | |
run: nuget restore . | |
- name: Build | |
run: msbuild /m /p:Configuration=Release . | |
- name: Setup VSTest | |
uses: darenm/Setup-VSTest@v1 | |
- name: Run tests | |
run: vstest.console.exe /Platform:x64 x64/Release/test.dll | |
- name: Upload built plugin | |
uses: actions/upload-artifact@v3 | |
with: | |
name: built-plugin-windows | |
path: Release/plugins/XPanel/64/* | |
- name: Upload test logs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test_log | |
path: x64/Release/test_log.txt | |
build-and-test-cmake: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, windows-latest] | |
name: Build and Test (CMake, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update -qq && sudo apt-get install -y build-essential cmake liblua5.4-dev libudev-dev libhidapi-dev | |
echo 'XPANEL_INSTALL_DEPS_FLAG=-DINSTALL_DEPS=ON' >> $GITHUB_ENV | |
- name: Build | |
run: | | |
cmake -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -S . -B build ${XPANEL_INSTALL_DEPS_FLAG} | |
cmake --build build | |
- name: Run tests | |
run: ctest build | |
- name: Install | |
run: cmake --build build --target install | |
- name: Upload built plugin (Linux glibc 2.35) | |
if: matrix.os == 'ubuntu-22.04' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: built-plugin-linux | |
path: ${{ github.workspace }}/install/XPanel/64/* | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get update -qq && sudo apt-get install -y pandoc weasyprint fonts-noto fonts-liberation2 | |
- uses: actions/checkout@v3 | |
- name: Generate PDF | |
working-directory: ./doc | |
run: pandoc -f gfm -t pdf --pdf-engine weasyprint -c style.css -o documentation.pdf documentation.md | |
- name: Upload docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: doc/documentation.pdf |