Skip to content

Merge pull request #18 from SlashNephy/renovate/softprops-action-gh-r… #748

Merge pull request #18 from SlashNephy/renovate/softprops-action-gh-r…

Merge pull request #18 from SlashNephy/renovate/softprops-action-gh-r… #748

Workflow file for this run

name: px4_drv
on:
push:
paths:
- .github/workflows/px4_drv.yml
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- platform: x64
deploy: false
- platform: x86
deploy: false
outputs:
artifact: ${{ steps.output.outputs.artifact }}
should_deploy: ${{ steps.output.outputs.should_deploy }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: nns779/px4_drv
ref: winusb
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: MSBuild (px4_winusb.sln)
working-directory: winusb
run: msbuild px4_winusb.sln /p:Configuration="Release-static" /p:Platform="${{ matrix.platform }}" /p:CodePage=932 /p:OutDir="${{ matrix.platform }}\" -m /p:PlatformToolset=v143
- name: Prepare Artifacts
shell: powershell
run: |
New-Item -Path Artifact/px4_drv -ItemType Directory
Copy-Item -Path winusb/src/fwtool/${{ matrix.platform }}/fwtool.exe -Destination Artifact/px4_drv/
Copy-Item -Path winusb/pkg/inf -Destination Artifact/px4_drv/inf -Recurse
Copy-Item -Path winusb/pkg/BonDriver_PX4 -Destination Artifact/px4_drv/BonDriver_PX4 -Recurse
Copy-Item -Path winusb/src/BonDriver_PX4/${{ matrix.platform }}/BonDriver_PX4.dll -Destination Artifact/px4_drv/BonDriver_PX4/
Copy-Item -Path winusb/pkg/DriverHost_PX4 -Destination Artifact/px4_drv/DriverHost_PX4 -Recurse
Copy-Item -Path winusb/src/DriverHost_PX4/${{ matrix.platform }}/DriverHost_PX4.exe -Destination Artifact/px4_drv/DriverHost_PX4/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: px4_drv_winusb_${{ matrix.platform }}
if-no-files-found: error
path: Artifact/
- name: Set Job Outputs
id: output
uses: actions/github-script@v7
with:
script: |
core.setOutput("artifact", "px4_drv_winusb_${{ matrix.platform }}")
core.setOutput("should_deploy", "${{ matrix.deploy }}")
release:
needs: build
uses: ./.github/workflows/release.yml
with:
artifact-name: '${{ needs.build.outputs.artifact }}'
permissions:
contents: write
deploy:
needs: build
if: needs.build.outputs.should_deploy == 'true'
uses: ./.github/workflows/deploy.yml
with:
artifact-name: '${{ needs.build.outputs.artifact }}'
secrets: inherit
permissions: {}