Skip to content

Commit

Permalink
ci: add github workflow to release and lint crate
Browse files Browse the repository at this point in the history
  • Loading branch information
metaclips committed Nov 25, 2024
1 parent d9a3ab8 commit b3b20af
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Rust Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Run cargo check
run: cargo check

- name: Run cargo clippy
run: cargo clippy -- -D warnings
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release ockam_ebpf

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release'
required: true

env:
BINARY_ROOT_PATH: ockam_ebpf_impl

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Install Rust
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
with:
toolchain: stable
profile: minimal
override: true

- name: Build ockam_ebpf crate
working-directory: ${{ env.BINARY_ROOT_PATH }}
run: cargo build --release

- name: Create Release
working-directory: ${{ env.BINARY_ROOT_PATH }}
run: |
echo "Creating release ${{ github.event.inputs.tag }}"
gh release create ${{ github.event.inputs.tag }} ./target/bpfel-unknown-none/release/ockam_ebpf -t ${{ github.event.inputs.tag }} -n "Release ${{ github.event.inputs.tag }} --latest"

0 comments on commit b3b20af

Please sign in to comment.