Skip to content

Commit

Permalink
rust: update workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Nov 17, 2023
1 parent 6a24336 commit 9676d4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand All @@ -27,26 +25,19 @@ jobs:
libnl-3-dev libnl-cli-3-dev libnuma-dev libpcap-dev meson\
pkg-config wget libbpf-dev llvm-dev libclang-dev clang
- name: Install libbpf and libxdp
run: |
sudo apt update
sudo apt install -y wget build-essential golang
sudo wget http://security.ubuntu.com/ubuntu/pool/main/libb/libbpf/libbpf1_1.1.0-1_amd64.deb
sudo wget http://security.ubuntu.com/ubuntu/pool/main/libb/libbpf/libbpf-dev_1.1.0-1_amd64.deb
sudo wget https://mirrors.edge.kernel.org/ubuntu/pool/main/x/xdp-tools/libxdp1_1.3.0-2ubuntu2_amd64.deb
sudo wget https://mirrors.edge.kernel.org/ubuntu/pool/main/x/xdp-tools/libxdp-dev_1.3.0-2ubuntu2_amd64.deb
sudo apt install -y ./libbpf1_1.1.0-1_amd64.deb
sudo apt install -y ./libbpf-dev_1.1.0-1_amd64.deb
sudo apt install -y ./libxdp1_1.3.0-2ubuntu2_amd64.deb
sudo apt install -y ./libxdp-dev_1.3.0-2ubuntu2_amd64.deb
# - name: Install Rust
# run: |
# curl https://sh.rustup.rs -sSf | sh -s -- -y
# source "$HOME/.cargo/env"

- name: Build and Install CNDP
run: make; sudo CNE_DEST_DIR=/ make install

- name: update rust
run: rustup update stable
- name: change dir to lang/rs
run: |
cd lang/rs
- name: Build
working-directory: lang/rs
run: cargo build
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
2 changes: 1 addition & 1 deletion lang/rs/apis/cne/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn get_cstring_from_str(s: &str) -> CString {
}

pub fn free_cchar_ptr(ptr: *mut i8) {
unsafe { let _ = CString::from_raw(ptr); };
unsafe { CString::from_raw(ptr) };
}

#[allow(dead_code)]
Expand Down

0 comments on commit 9676d4e

Please sign in to comment.