Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate GitHub Actions #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build the project from source read along.

You will need:

* the Rust compiler toolchain, stable >=1.34 or nightly (build)
* the Rust compiler toolchain, stable >=1.36 or nightly (build)
* XNVCtrl; static (build only) or dynamic (build and runtime)
* Xlib (build and runtime)
* Xext (build and runtime)
Expand All @@ -43,7 +43,7 @@ completely untested on FreeBSD (bug reports are welcome).

You will need:

* the Rust compiler toolchain, stable >=1.15 or nightly. Be adviced that you
* the Rust compiler toolchain, stable >=1.40 or nightly. Be advised that you
need the **MSVC ABI** version of the toolchain not GNU. In order to target the
MSVC ABI for Rust you will also need the [Visual C++ build
tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017)
Expand Down
5 changes: 5 additions & 0 deletions ci/ubuntu-install-packages
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