Skip to content

direct package repo access update #220

direct package repo access update

direct package repo access update #220

Workflow file for this run

name: direct package repo access update
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch: {}
jobs:
update-archive:
strategy:
fail-fast: false
matrix:
distro: [ ubuntu, debian, centos, fedora, ol, opensuse-leap ]
name: ${{ matrix.distro }}
runs-on: ubuntu-latest
steps:
- name: free up some disk space
run: |
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/.ghcup || true
sudo docker image prune --all --force || true
sudo apt-get remove -y --fix-missing '^aspnetcore-.*' '^dotnet-.*' 'php.*' '^mongodb-.*' '^mysql-.*' azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri google-cloud-sdk google-cloud-cli || true
- name: install required packages
run: |
export DEBIAN_FRONTEND=noninteractive
sudo dpkg --purge unattended-upgrades
sudo apt-get update
sudo apt-get install -y bsdutils build-essential pkgconf zlib1g-dev libdw-dev libdwarf-dev libelf-dev software-properties-common devscripts ubuntu-dev-tools
sudo apt-get autoremove -y || true
sudo apt-get clean || true
- name: authenticate
run: |
gh auth login --with-token <<<'${{ secrets.DD_BTFHUB_BOT_GITHUB_TOKEN }}'
- name: checkout btfhub
uses: actions/checkout@v3
with:
token: ${{ secrets.DD_BTFHUB_BOT_GITHUB_TOKEN }}
submodules: 'recursive'
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: install newer clang
run: |
wget -nv https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
mv clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu- clang
echo "$GITHUB_WORKSPACE/clang/bin" >> $GITHUB_PATH
- name: build pahole
run: |
cd ./3rdparty/dwarves
mkdir build
cd build
cmake -D__LIB=lib ..
sudo make install
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/pahole.conf
sudo ldconfig
- name: build bpftool
run: |
cd ./3rdparty/bpftool
sudo -E PATH="$PATH" make -C src/ V=1 install-bin
- name: build btfhub
run: make
- name: checkout btfhub-archive
uses: actions/checkout@v3
with:
repository: DataDog/btfhub-archive
ref: main
token: ${{ secrets.DD_BTFHUB_BOT_GITHUB_TOKEN }}
path: archive
sparse-checkout: |
${{ matrix.distro }}
- name: setup git config
run: |
cd archive
git config --local user.name "Bryce Kahle"
git config --local user.email "[email protected]"
- name: generate BTFs
run: |
./btfhub -workers 6 -d ${{ matrix.distro }}
- name: check git status
run: |
cd archive
git status
- name: commit and push to btfhub-archive
run: |
cd archive
git add -A
git diff-index --quiet HEAD || git commit -m "update ${{ matrix.distro }} btfhub-archive on $(date -u +%Y-%m-%d)"
git push || (git pull --rebase && git push)