framework_lib: Clone smbios-lib via HTTPS #5
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: CI | |
on: | |
push: | |
jobs: | |
# Won't work because pkg-config can't find hidapi. | |
# I changed build.rs to search for 'hidapi-libusb', which is how it's installed | |
# on Ubuntu. But that still can't find it. | |
# freebsd-cross-build: | |
# name: Cross-Build for FreeBSD | |
# runs-on: 'ubuntu-22.04' | |
# env: | |
# CARGO_NET_GIT_FETCH_WITH_CLI: true | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Install dependencies | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y libudev-dev libhidapi-dev | |
# - name: Setup Rust toolchain | |
# run: rustup show | |
# - name: Install cross compilation tool | |
# run: cargo install cross | |
# - name: Build FreeBSD tool | |
# run: cross build --target=x86_64-unknown-freebsd --no-default-features --features unix | |
# - name: Upload FreeBSD App | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: framework_tool_freebsd | |
# path: target/x86_64-unknown-freebsd/debug/framework_tool | |
build: | |
name: Build Linux apps | |
runs-on: ubuntu-22.04 | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
- name: Setup Rust toolchain | |
run: rustup show | |
- name: Build tools | |
run: make linux | |
- name: Upload Linux Apps | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dp_hdmi_linux | |
path: out/ | |
build-windows: | |
name: Build Windows | |
runs-on: windows-2022 | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Rust toolchain | |
run: rustup show | |
- name: Build tools | |
run: make windows | |
- name: Upload Windows Apps | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dp_hdmi_windows | |
path: out/ | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
- name: Setup Rust toolchain | |
run: rustup show | |
- name: Run cargo test | |
run: cargo test -p framework_lib | |
lints: | |
name: Lints | |
runs-on: ubuntu-22.04 | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
- name: Setup Rust toolchain | |
run: rustup show | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy -p framework_lib -p framework_tool -- -D warnings | |
# Just make sure doc generation works | |
doc: | |
name: Generate docs | |
runs-on: ubuntu-22.04 | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
# Fail if warnings are produced | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
- name: Setup Rust toolchain | |
run: rustup show | |
- name: Run cargo doc | |
run: cargo doc |