Skip to content

Commit

Permalink
changes to deps, docker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Dec 30, 2024
1 parent 58bfdc6 commit d6a2794
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 11 deletions.
27 changes: 27 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# editor things
.idea/
.zed/
.vscode/

# misc things
.DS_Store
.gitignore
*.nix

# python things
pyrightconfig.json
__pycache__/

# Added by cargo (rust things)
/target
build/
dist/
logs/

# protobuf
mod.rs
command_data.rs
serverdata.rs

# private testing
/privatetest/
2 changes: 1 addition & 1 deletion .github/workflows/calypso-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Create and publish Calypso docker image
on:
push:
branches: ['Develop']
path:
paths:
- "Dockerfile"
workflow_dispatch:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Build
run: cargo build --verbose
run: cargo build --all --verbose
- name: Test
run: cargo test --verbose
- name: Fmt
run: cargo fmt --check
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --verbose --all -- -D warnings
- name: Audit
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ serde_json = "1.0.134"


[dependencies]
socketcan = "3.3.1"
paho-mqtt = "0.12.5"
protobuf-codegen = "3.5.1"
protobuf = "3.5.1"
Expand All @@ -29,6 +28,9 @@ phf = { version = "0.11.2", features = ["macros"] }
calypso-cangen = { path = "./libs/calypso-cangen" }
daedalus = { path = "./libs/daedalus" }

[target.'cfg(target_os = "linux")'.dependencies]
socketcan = { version = "3.3.1" }


[build-dependencies]
protobuf-codegen = "3.5.1"
Expand Down
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::process;
/* Prebuild script */
fn main() {
println!("cargo:rerun-if-changed=Embedded-Base");
println!("cargo:rerun-if-changed=src/proto");

protobuf_codegen::Codegen::new()
.pure()
Expand All @@ -13,7 +14,7 @@ fn main() {
.input("src/proto/command_data.proto")
.input("src/proto/serverdata.proto")
// Specify output directory relative to Cargo output directory.
.out_dir("src")
.out_dir("src/proto")
.run_from_script();

// Validate CAN spec
Expand Down
4 changes: 2 additions & 2 deletions src/bin/simulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::{
time::{Duration, UNIX_EPOCH},
};

use calypso::proto::serverdata;
use calypso::{
mqtt::MqttClient, serverdata, simulatable_message::SimShared,
simulate_data::create_simulated_components,
mqtt::MqttClient, simulatable_message::SimShared, simulate_data::create_simulated_components,
};
use clap::Parser;

Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
pub mod command_data;
pub mod data;
pub mod decode_data;
pub mod encode_data;
pub mod mqtt;
pub mod serverdata;
pub mod proto;
pub mod simulatable_message;
pub mod simulate_data;
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use std::{
};

use calypso::{
command_data, data::DecodeData, data::EncodeData, decode_data::*, encode_data::*,
mqtt::MqttClient, serverdata,
data::DecodeData, data::EncodeData, decode_data::*, encode_data::*, mqtt::MqttClient,
proto::command_data, proto::serverdata,
};
use clap::Parser;
use protobuf::Message;
Expand Down

0 comments on commit d6a2794

Please sign in to comment.