Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jfernandez committed Feb 13, 2024
0 parents commit db15e20
Show file tree
Hide file tree
Showing 13 changed files with 1,555 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM ghcr.io/catthehacker/ubuntu:custom-20.04-20240208
RUN apt-get update && apt-get install -y zlib1g-dev libelf-dev
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
}

// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
// "source": "devcontainer-cargo-cache-${devcontainerId}",
// "target": "/usr/local/cargo",
// "type": "volume"
// }
// ]

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
ignore:
# These are peer deps of Cargo and should not be automatically bumped
- dependency-name: "semver"
- dependency-name: "crates-io"
rebase-strategy: "disabled"
31 changes: 31 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Rust

on:
push:
branches: [ "main" ]
tags:
- 'v*' # Trigger the workflow on push to tags like v1.0, v20.15.10
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y zlib1g-dev libelf-dev
- name: Test
run: cargo test --verbose
- name: Build
run: cargo build --release --verbose
- name: Upload binary
uses: actions/[email protected]
with:
name: bpftop
path: target/release/bpftop
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
target/
root/
Loading

0 comments on commit db15e20

Please sign in to comment.