-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add github workflow to release and lint crate
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 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,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 |
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,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" |