Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [esden, dragonmux]
patreon: 1bitsquared
76 changes: 76 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build Linux

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-linux:
name: '${{ matrix.os.id }}'
runs-on: ${{ matrix.os.id }}
defaults:
run:
shell: bash
strategy:
matrix:
os:
- {id: ubuntu-22.04, name: jammy}
- {id: ubuntu-24.04, name: noble}
fail-fast: false
steps:
- name: Runtime environment
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
- name: Checkout bmputil
uses: actions/checkout@v5
with:
lfs: true
submodules: true
- name: Setup Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Version tools
run: |
cargo --version
rustc --version
cargo llvm-cov --version
- name: Build
run: cargo b
- name: Test
run: cargo t
- name: Collect code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Codecov
if: success() && github.repository == 'blackmagic-debug/bmputil'
uses: codecov/codecov-action@v5
with:
files: codecov.json
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Release build
if: success() && github.event_name == 'push'
run: |
cargo b -r
- name: Upload build
if: success() && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: bmputil-${{ matrix.os.id }}
path: target/release/bmputil-cli
if-no-files-found: error
138 changes: 138 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Build MacOS

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-macos:
name: '${{ matrix.os }}'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os:
- macos-13
- macos-14
- macos-15
fail-fast: false
steps:
- name: Runtime environment
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
- name: Checkout bmputil
uses: actions/checkout@v5
with:
lfs: true
submodules: true
- name: Setup Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Version tools
run: |
cargo --version
rustc --version
cargo llvm-cov --version
- name: Build
run: cargo b
- name: Test
run: cargo t
- name: Collect code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Codecov
if: success() && github.repository == 'blackmagic-debug/bmputil'
uses: codecov/codecov-action@v5
with:
files: codecov.json
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Release build
if: success() && github.event_name == 'push'
run: |
cargo b -r
- name: Upload build
if: success() && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: bmputil-${{ matrix.os }}
path: target/release/bmputil-cli
if-no-files-found: error

build-macos-homebrew:
name: '${{ matrix.os }} (homebrew)'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-14
fail-fast: false
steps:
- name: Runtime environment
shell: bash
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
- name: Checkout bmputil
uses: actions/checkout@v5
with:
lfs: true
submodules: true
- name: Setup Rust
run: |
brew install rustup gcc
rustup toolchain install stable
rustup default stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Version tools
run: |
cargo --version
rustc --version
cargo llvm-cov --version
- name: Build
run: cargo b
- name: Test
run: cargo t
- name: Collect code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Codecov
if: success() && github.repository == 'blackmagic-debug/bmputil'
uses: codecov/codecov-action@v5
with:
files: codecov.json
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Release build
if: success() && github.event_name == 'push'
run: |
cargo b -r
- name: Upload build
if: success() && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: bmputil-${{ matrix.os }}-homebrew
path: target/release/bmputil-cli
if-no-files-found: error
165 changes: 165 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: Build Windows

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-windows:
name: '${{ matrix.os }} (msvc)'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-2022
- windows-2025
fail-fast: false
steps:
- name: Runtime environment
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "$env:HOMEDRIVE$env:HOMEPATH\\.local\\bin" >> $env:GITHUB_PATH
echo "$env:HOMEDRIVE$env:HOMEPATH\\.cargo\\bin" >> $env:GITHUB_PATH
echo "GITHUB_WORKSPACE=$(pwd)" >> $env:GITHUB_ENV
- name: Install WDK redist components
run: |
Invoke-WebRequest https://go.microsoft.com/fwlink/p/?LinkID=253170 -OutFile wdk-redist.msi
Start-Process -FilePath msiexec -Verb Runas -Wait -ArgumentList "/i","$PWD\wdk-redist.msi","/passive","/qn","LicenseAccepted=1"
rm wdk-redist.msi
- name: Checkout bmputil
uses: actions/checkout@v5
with:
lfs: true
submodules: true
- name: Setup Rust
run: |
rustup toolchain install stable-x86_64-pc-windows-msvc
rustup toolchain install stable-aarch64-pc-windows-msvc
rustup default stable-x86_64-pc-windows-msvc
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Version tools
run: |
cargo --version
rustc --version
cargo llvm-cov --version
- name: Build
run: cargo b
- name: Test
run: cargo t
- name: Collect code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Codecov
if: success() && github.repository == 'blackmagic-debug/bmputil'
uses: codecov/codecov-action@v5
with:
files: codecov.json
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Release build
if: success() && github.event_name == 'push'
run: |
cargo b -r
- name: Upload build
if: success() && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: bmputil-${{ matrix.os }}-msvc
path: target/release/bmputil-cli
if-no-files-found: error

build-mingw:
# Turn MSYS2/MinGW builds off for now as they're terminally broken till some things are fixed in libwdi-sys
if: false
name: '${{ matrix.os }} (${{ matrix.sys }})'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
os:
- windows-2022
- windows-2025
sys:
- mingw64
- ucrt64
- clang64
fail-fast: false
steps:
- name: Use MinGW from MSYS
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
path-type: inherit
pacboy: >-
toolchain:p
rustup:p
- name: Runtime environment
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
- name: Install WDK redist components
run: |
curl -Lo wdk-redist.msi https://go.microsoft.com/fwlink/p/?LinkID=253170
sudo msiexec /i $PWD\wdk-redist.msi /passive /qn LicenseAccepted=1
rm wdk-redist.msi
- name: Checkout bmputil
uses: actions/checkout@v5
with:
lfs: true
submodules: true
- name: Setup Rust
run: |
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup toolchain install --force-non-host stable-aarch64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Version tools
run: |
cargo --version
rustc --version
cargo llvm-cov --version
- name: Build
run: cargo b
- name: Test
run: cargo t
- name: Collect code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Codecov
if: success() && github.repository == 'blackmagic-debug/bmputil'
uses: codecov/codecov-action@v5
with:
files: codecov.json
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Release build
if: success() && github.event_name == 'push'
run: |
cargo b -r
- name: Upload build
if: success() && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: bmputil-${{ matrix.os }}-${{ matrix.sys }}
path: target/release/bmputil-cli
if-no-files-found: error
Loading
Loading