Load NVML dynamically #92
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: | |
- pull_request | |
- push | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
build_type: [Release] | |
include: | |
- os: windows-latest | |
c_compiler: cl | |
- os: ubuntu-latest | |
c_compiler: musl-gcc | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- if: runner.os == 'Linux' | |
name: Install musl | |
run: apt-get install --yes musl musl-tools | |
- name: Configure project | |
run: > | |
cmake | |
-B ${{ github.workspace }}/build | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
-S ${{ github.workspace }} | |
- name: Build project | |
run: > | |
cmake | |
--build ${{ github.workspace }}/build | |
--config ${{ matrix.build_type }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-${{ matrix.os }} | |
path: | | |
build/Release/nvidia-pstated.exe | |
build/nvidia-pstated | |
publish: | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
*/Release/nvidia-pstated.exe | |
*/nvidia-pstated |