Skip to content

Commit

Permalink
Add GitHub Actions config (#2)
Browse files Browse the repository at this point in the history
* Add GitHub Actions config

* Run `apt update` in GitHub Actions

* Add install-deps script

* Update install-deps
  • Loading branch information
keiichiw committed May 31, 2023
1 parent 1b4f4a0 commit 5636c4e
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: ./install-deps
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run doc
run: cargo doc --verbose
- name: Run clippy
run: cargo clippy
25 changes: 25 additions & 0 deletions install-deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

sudo apt update
sudo apt install build-essential git pkg-config -y

# libtraceevent
git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
cd libtraceevent
make
sudo make install
cd ..

# libtracefs
git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
cd libtracefs
make
sudo make install
cd ..

# libtracecmd
git clone git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git
cd trace-cmd
make
sudo make install_libs
cd ..

0 comments on commit 5636c4e

Please sign in to comment.