Add net8 and fix publish issue #11
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 | |
on: | |
push: | |
branches: | |
- v2 | |
pull_request: | |
jobs: | |
libusb_windows: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
triplet: | |
- "x86-windows" | |
- "x64-windows" | |
- "arm64-windows" | |
package: | |
- name: "libusb" | |
env: | |
VCPKG_ROOT: C:\vcpkg | |
steps: | |
- name: Build ${{ matrix.package.name }}:${{ matrix.triplet }} | |
run: vcpkg install ${{ matrix.package.name }}:${{ matrix.triplet }} | |
- name: Upload vcpkg artifacts | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: ${{ matrix.package.name }}-${{ github.run_id }} | |
path: ${{ env.VCPKG_ROOT }}/installed/ | |
- name: Upload vcpkg build tree | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: ${{ matrix.package.name }}-${{ github.run_id }}-buildtree | |
path: ${{ env.VCPKG_ROOT }}/buildtrees/${{ matrix.package.name }}/ | |
libusb_osx: | |
runs-on: macos-12 | |
strategy: | |
matrix: | |
triplet: | |
- "x64-osx-dynamic" | |
- "arm64-osx-dynamic" | |
package: | |
- name: "libusb" | |
env: | |
VCPKG_ROOT: /usr/local/share/vcpkg | |
steps: | |
- name: Install build dependencies | |
run: brew install autoconf automake libtool | |
- name: Build ${{ matrix.package.name }}:${{ matrix.triplet }} | |
run: vcpkg install ${{ matrix.package.name }}:${{ matrix.triplet }} --overlay-triplets=${{ env.VCPKG_ROOT }}/triplets/community/ | |
- name: Upload vcpkg artifacts | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: ${{ matrix.package.name }}-${{ github.run_id }} | |
path: ${{ env.VCPKG_ROOT }}/installed/ | |
libusbdotnet_windows: | |
runs-on: windows-2022 | |
needs: [ libusb_windows, libusb_osx ] | |
env: | |
VCPKG_ROOT: C:\vcpkg | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: 'v2' | |
- uses: actions/download-artifact@v2 | |
with: | |
name: libusb-${{ github.run_id }} | |
path: ${{ env.VCPKG_ROOT }}/installed/ | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Build | |
run: dotnet build .\stage\LibUsbDotNet\LibUsbDotNet.csproj -c Release | |
- name: Pack | |
run: dotnet pack .\stage\LibUsbDotNet\LibUsbDotNet.csproj -c Release -o ${{ github.workspace }}/nuget/ | |
- name: Upload LibUsbDotNet NuGet package | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: LibUsbDotNet-${{ github.run_id }} | |
path: '${{ github.workspace }}/nuget/' | |
libusbdotnet_macos: | |
runs-on: macos-12 | |
needs: [ libusb_windows, libusb_osx ] | |
env: | |
VCPKG_ROOT: /usr/local/share/vcpkg | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: 'v2' | |
- uses: actions/download-artifact@v2 | |
with: | |
name: libusb-${{ github.run_id }} | |
path: ${{ env.VCPKG_ROOT }}/installed/ | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Build | |
run: dotnet build ./stage/LibUsbDotNet/LibUsbDotNet.csproj -c Release | |
libusbdotnet_ubuntu: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: 'v2' | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Install libusb | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libusb-1.0-0 | |
- name: Build | |
run: dotnet build ./stage/LibUsbDotNet/LibUsbDotNet.csproj -c Release |