-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
199 additions
and
128 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,15 @@ | ||
name: Security audit | ||
on: | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
jobs: | ||
security_audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/audit-check@v1 | ||
# FIXME: needs to cd into ./marauder https://github.com/actions-rs/audit-check/issues/116 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,83 @@ | ||
on: [push, pull_request] | ||
|
||
name: Continuous integration | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
target: armv7-unknown-linux-gnueabihf | ||
override: true | ||
components: rustfmt | ||
- run: make ujipenchars2.txt | ||
working-directory: marauder | ||
- uses: marcopolo/cargo@master # TODO: - uses: actions-rs/cargo@v1 https://github.com/actions-rs/cargo/pull/59 | ||
with: | ||
working-directory: marauder | ||
use-cross: true | ||
args: --target armv7-unknown-linux-gnueabihf | ||
command: check | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
target: armv7-unknown-linux-gnueabihf | ||
override: true | ||
components: rustfmt | ||
- run: make ujipenchars2.txt | ||
working-directory: marauder | ||
- uses: marcopolo/cargo@master # TODO: - uses: actions-rs/cargo@v1 https://github.com/actions-rs/cargo/pull/59 | ||
with: | ||
working-directory: marauder | ||
use-cross: true | ||
args: --target armv7-unknown-linux-gnueabihf | ||
command: test | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
target: armv7-unknown-linux-gnueabihf | ||
override: true | ||
components: rustfmt | ||
- uses: marcopolo/cargo@master # TODO: - uses: actions-rs/cargo@v1 https://github.com/actions-rs/cargo/pull/59 | ||
with: | ||
working-directory: marauder | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
target: armv7-unknown-linux-gnueabihf | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: marcopolo/cargo@master # TODO: - uses: actions-rs/cargo@v1 https://github.com/actions-rs/cargo/pull/59 | ||
with: | ||
working-directory: marauder | ||
use-cross: true | ||
args: --target armv7-unknown-linux-gnueabihf -- -D warnings | ||
command: clippy |
This file was deleted.
Oops, something went wrong.
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
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
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,23 +3,23 @@ | |
# rustup target add armv7-unknown-linux-musleabihf --toolchain=nightly | ||
# cargo install cross | ||
|
||
TARGET = armv7-unknown-linux-musleabihf | ||
# TARGET ?= armv7-unknown-linux-musleabihf | ||
TARGET ?= armv7-unknown-linux-gnueabihf | ||
EXE = marauder | ||
BIN = ./target/$(TARGET)/release/$(EXE) | ||
IMG ?= rust-build-remarkable:latest | ||
DEVICE ?= remarkable | ||
RUN ?= docker run --rm --user $$(id -u):$$(id -g) | ||
FLATC ?= $(RUN) -v "$$PWD"/src:/src -v "$$PWD"/src:/dst neomantra/flatbuffers:clang-v1.12.0-cc0.6.0 flatc | ||
|
||
all: src/strokes/strokes_generated.rs lint | ||
cross build --release --target=$(TARGET) | ||
cross build --target=$(TARGET) --release | ||
ls -lh $(BIN) | ||
|
||
fmt: | ||
cargo fmt | ||
|
||
lint: fmt | ||
cross clippy --target=$(TARGET) | ||
cross clippy --target=$(TARGET) #-- -W clippy::pedantic | ||
|
||
test: fmt test-ujipenchars2 | ||
cargo test | ||
|
@@ -33,7 +33,6 @@ test-ujipenchars2: ujipenchars2.txt | |
update: | ||
cargo update | ||
|
||
debug: DEVICE ?= [email protected] | ||
debug: all | ||
ssh $(DEVICE) 'killall -q -9 $(EXE) || true; systemctl stop xochitl || true' | ||
scp -pC $(BIN) $(DEVICE): | ||
|
@@ -42,31 +41,10 @@ debug: all | |
src/strokes/strokes_generated.rs: src/strokes/strokes.fbs | ||
$(FLATC) --rust -o /dst/strokes /$^ | ||
|
||
.PHONY: docker-env | ||
docker-env: | ||
cd docker-toolchain && docker build \ | ||
--build-arg UNAME=builder \ | ||
--build-arg UID=$(shell id -u) \ | ||
--build-arg GID=$(shell id -g) \ | ||
--build-arg ostype=${shell uname} \ | ||
--tag $(IMG) . | ||
|
||
whiteboard: DEVICE ?= [email protected] | ||
whiteboard: HOST ?= http://fknwkdacd.com:10000 | ||
whiteboard: EXE = whiteboard | ||
whiteboard: BIN = ./target/armv7-unknown-linux-gnueabihf/release/$(EXE) | ||
whiteboard: VOLUME ?= cargoregistry | ||
whiteboard: fmt docker-env | ||
docker volume inspect $(VOLUME) >/dev/null 2>&1 || docker volume create $(VOLUME) | ||
# TODO: https://github.com/toltec-dev/toolchain/issues/2 | ||
docker run \ | ||
-it --rm \ | ||
--user builder \ | ||
-v "$$PWD":/home/builder/libremarkable:rw \ | ||
-v $(VOLUME):/home/builder/.cargo/registry \ | ||
-w /home/builder/libremarkable \ | ||
$(IMG) \ | ||
cargo build --release --bin $(EXE) --target=armv7-unknown-linux-gnueabihf #--locked #--frozen #--offline | ||
whiteboard: fmt | ||
cross build --target=$(TARGET) --release --bin $(EXE) #--locked #--frozen #--offline | ||
ssh $(DEVICE) 'killall -q -9 $(EXE) || true; systemctl stop xochitl || true' | ||
scp -pC $(BIN) $(DEVICE): | ||
ssh $(DEVICE) 'RUST_BACKTRACE=1 RUST_LOG=debug ./$(EXE) --host=$(HOST) | tail -f' |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.