build project in CI
This commit is contained in:
parent
cbd0186fdc
commit
c37bfd8332
37
.github/workflows/rust.yml
vendored
37
.github/workflows/rust.yml
vendored
|
@ -9,9 +9,6 @@ on:
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
# Make sure CI fails on all warnings, including Clippy lints
|
|
||||||
RUSTFLAGS: "-Dwarnings"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
@ -19,27 +16,29 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
|
||||||
- name: Update repos
|
- name: Update repos
|
||||||
run: sudo apt-get update -qq
|
run: sudo apt-get update -qq
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
run: sudo apt-get install -qy cargo rust-clippy
|
run: sudo apt-get install -qy cargo rust-clippy
|
||||||
- name: install lzma
|
- name: install lzma
|
||||||
run: sudo apt-get update && sudo apt-get install -y liblzma-dev
|
run: sudo apt-get install -qy liblzma-dev
|
||||||
|
- name: install dotnet
|
||||||
|
run: sudo apt-get install -qy dotnet-sdk-8.0 ca-certificates libc6 libgcc-s1 libicu74 liblttng-ust1 libssl3 libstdc++6 libunwind8 zlib1g
|
||||||
|
|
||||||
- name: Run Clippy
|
- name: generate bindings
|
||||||
run: cargo clippy --all-targets --all-features
|
run: ./generate-binding.sh
|
||||||
|
|
||||||
- name: build default features
|
|
||||||
run: cargo build --all --verbose
|
|
||||||
- name: build default features -- examples
|
|
||||||
run: cargo build --examples --verbose
|
|
||||||
- name: test default features
|
|
||||||
run: cargo test --all --verbose
|
|
||||||
|
|
||||||
- name: build all features
|
- name: check that generated files did not change
|
||||||
run: cargo build --all-features --verbose
|
run: output=$(git status --porcelain) && [ -z "$output" ]
|
||||||
- name: build all features -- examples
|
|
||||||
run: cargo build --all-features --examples --verbose
|
- name: build solution
|
||||||
- name: test all features
|
run: dotnet publish
|
||||||
run: cargo test --all --all-features --verbose
|
|
||||||
|
- name: run tests
|
||||||
|
run: dotnet test
|
||||||
|
|
||||||
|
- name: run example
|
||||||
|
run: dotnet run --project ServicePoint.Example
|
||||||
|
|
2
ServicePoint.Example/.gitignore
vendored
2
ServicePoint.Example/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
bin
|
|
||||||
obj
|
|
|
@ -1,7 +1,8 @@
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using ServicePoint;
|
using ServicePoint;
|
||||||
|
|
||||||
var connection = new Connection("127.0.0.1:2342");
|
// TODO: replace with new Connection("127.0.0.1:2342") to send to a real display
|
||||||
|
var connection = Connection.NewFake();
|
||||||
connection.Send(Command.Clear());
|
connection.Send(Command.Clear());
|
||||||
|
|
||||||
connection.Send(Command.Brightness(5));
|
connection.Send(Command.Brightness(5));
|
||||||
|
|
Loading…
Reference in a new issue