Skip to content

Commit

Permalink
Merge pull request #2 from christopherL91/github-actions
Browse files Browse the repository at this point in the history
Add github actions
  • Loading branch information
sidcha authored Dec 16, 2023
2 parents dbdd011 + 40f5dd6 commit bfaa8ab
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
reviewers:
- sidcha
schedule:
interval: monthly
groups:
production-dependencies:
dependency-type: production
40 changes: 40 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rust 🦀
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: clippy 💅
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: cargo check 👷
uses: actions-rs/cargo@v1
with:
command: check
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rust 🦀
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: cargo test ⚙️
uses: actions-rs/cargo@v1
with:
command: test
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ impl GitInfo {
fn generate_osdp_build_headers(out_dir: &str) -> Result<()> {
// Add an empty file as we don't
let data = "#define OSDP_EXPORT";
std::fs::write(path_join(&out_dir, "osdp_export.h"), data)
std::fs::write(path_join(out_dir, "osdp_export.h"), data)
.context("Failed to create osdp_export.h")?;

let git = GitInfo::new()?;
let src = "vendor/src/osdp_config.h.in";
let dest = path_join(&out_dir, "osdp_config.h");
std::fs::copy(&src, &dest).context(format!("Failed: copy {src} -> {dest}"))?;
let dest = path_join(out_dir, "osdp_config.h");
std::fs::copy(src, &dest).context(format!("Failed: copy {src} -> {dest}"))?;
configure_file(
&dest,
vec![
Expand Down

0 comments on commit bfaa8ab

Please sign in to comment.