forked from foucault/nvfancontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define a GitHub Actions CI pipeline that builds for Linux on MSRV, stable, and next, and makes a half-arsed attempt at verifying MSRV on Windows. Because several dependencies rely on wildcards the de facto MSRVs are a fair bit higher than advertised: - getopts unceremoniously abandoned MSRV pretence in 0.2.20 and raised MSRV from 1.18 to 1.27, then again to 1.31 in 0.2.21. - libloading 0.6.0 for "unix" uses MaybeUninit, which requires 1.36. - libloading 0.6.0 for "windows" uses pointer::cast(), which requires 1.38, and the non_exhaustive, which requires 1.40. Of course, the original MSRVs can be restored by fixing dependencies.
- Loading branch information
1 parent
0f642a6
commit ad45f8a
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
build: | ||
# MSRV, stable, and next. | ||
- pinned-linux | ||
- stable | ||
- beta | ||
# Best-effort Windows. | ||
- pinned-windows | ||
include: | ||
- build: pinned-linux | ||
os: ubuntu-18.04 | ||
rust: 1.36.0 | ||
|
||
- build: stable | ||
os: ubuntu-18.04 | ||
rust: stable | ||
|
||
- build: beta | ||
os: ubuntu-18.04 | ||
rust: beta | ||
|
||
- build: pinned-windows | ||
os: windows-2019 | ||
rust: 1.40.0 | ||
env: | ||
# libXNVCtrl.a in Ubuntu | ||
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install packages (Ubuntu) | ||
if: matrix.os == 'ubuntu-18.04' | ||
run: | | ||
ci/ubuntu-install-packages | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
|
||
# Can't (easily) install NVAPI for Windows. :( | ||
- name: Check-only (Windows) | ||
if: matrix.os == 'windows-2019' | ||
run: cargo check --verbose | ||
|
||
- name: Build | ||
if: matrix.os != 'windows-2019' | ||
run: cargo build --verbose | ||
|
||
- name: Test | ||
if: matrix.os != 'windows-2019' | ||
run: cargo test --verbose |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
sudo apt-get update | ||
sudo apt-get install --yes --no-install-recommends \ | ||
libxnvctrl-dev |