Skip to content

Commit

Permalink
Use rust
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Rüth committed Dec 10, 2023
1 parent 715d835 commit 9873afe
Show file tree
Hide file tree
Showing 39 changed files with 5,645 additions and 597 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ jobs:
# Install dependencies so that they are cached
install: |
apt-get --quiet update -y
apt-get install -y -q wget cmake file build-essential libboost-dev nlohmann-json3-dev libusb-1.0-0 libusb-1.0-0-dev
apt-get install -y -q apt-get install -y -q libssl-dev pkg-config clang build-essential libusb-1.0-0 libusb-1.0-0-dev
cargo install cargo-deb
# build
run: |
cmake . -B.build
make -C .build -j2
make -C .build package
make deb
- uses: actions/upload-artifact@v3
with:
name: packages-${{ matrix.arch }}
path: .build/artifacts/*.deb
path: target/release/debian/*.deb
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Rust check

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install -y libssl-dev pkg-config clang build-essential libusb-1.0-0 libusb-1.0-0-dev
- name: Check fmt
run: make fmt
- name: Lint
run: make lint
- name: Tests usual
run: make test
- name: Build usual
run: make build
9 changes: 4 additions & 5 deletions .github/workflows/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ jobs:
- name: Build
run: |
sudo apt-get --quiet update -y
sudo apt-get install -y -q wget cmake file build-essential libboost-dev nlohmann-json3-dev libusb-1.0-0 libusb-1.0-0-dev
cmake . -B.build
make -C .build -j2
make -C .build package
sudo apt-get install -y -q libssl-dev pkg-config clang build-essential libusb-1.0-0 libusb-1.0-0-dev
cargo install cargo-deb
make deb
- uses: actions/upload-artifact@v3
with:
name: packages-x86_64
path: .build/artifacts/*.deb
path: target/release/debian/*.deb
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
Makefile
epsonscan2-*
CMakeFiles
CMakeCache.txt
cmake_install.cmake
ess2devstate
.vscode
build
.DS_Store
include/*
target/
129 changes: 0 additions & 129 deletions CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 9873afe

Please sign in to comment.