Skip to content

Commit

Permalink
chg: [workflow] cleanup not to use build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
qjerome committed Jul 12, 2024
1 parent f013333 commit f99ecd0
Showing 1 changed file with 5 additions and 50 deletions.
55 changes: 5 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,20 @@ env:
CARGO_TERM_COLOR: always

jobs:
build-tools:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install system tools
run: |
sudo apt update
sudo apt install -y qemu-system-x86 cmake ninja-build clang lld git libbpf-dev
# we need to fetch rust deps first to speed up cargo xtask
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
~/.rustup
target
# if xtask changed maybe linker version changed so we don't want old objects to mess with new ones
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock', '**/.github/workflows/ci.yml', '**/xtask/') }}

- id: cache-key
run: echo "cache-key=$(cargo xtask build-tools --action-cache-key)" >> "$GITHUB_OUTPUT"

- name: Cache build tools
uses: actions/cache@v3
with:
path: |
build-tools/
key: ${{ steps.cache-key.outputs.cache-key }}

- name: Build-Tools (LLVM and bpf-linker)
run: cargo xtask build-tools --free-space

build:
needs: build-tools
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install bpf-linker
run: cargo install bpf-linker

- name: Install system tools
run: |
sudo apt update
sudo apt install -y qemu-system-x86 cmake ninja-build clang lld git libbpf-dev
sudo apt install -y qemu-system-x86 clang lld libbpf-dev
# we need to fetch rust deps first to speed up cargo xtask
- name: Cache Rust dependencies
Expand All @@ -67,18 +33,7 @@ jobs:
~/.cargo
~/.rustup
target
# if xtask changed maybe linker version changed so we don't want old objects to mess with new ones
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock', '**/.github/workflows/ci.yml', '**/xtask/') }}

- id: cache-key
run: echo "cache-key=$(cargo xtask build-tools --action-cache-key)" >> "$GITHUB_OUTPUT"

- name: Cache build tools
uses: actions/cache@v3
with:
path: |
build-tools/
key: ${{ steps.cache-key.outputs.cache-key }}
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock', '**/.github/workflows/ci.yml') }}

- name: Build (eBPF and userland)
run: cargo xtask build --release
Expand Down

0 comments on commit f99ecd0

Please sign in to comment.