ci: install newer clang #61
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
name: CI | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Lint | |
uses: golangci/[email protected] | |
with: | |
version: latest | |
skip-build-cache: true | |
skip-pkg-cache: true | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.22.3 | |
- name: Install newer Clang | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x ./llvm.sh | |
sudo ./llvm.sh 17 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y systemtap-sdt-dev libelf1 libelf-dev | |
sudo pip install stapsdt black isort | |
mkdir $GITHUB_WORKSPACE/libstapsdt | |
git clone https://github.com/linux-usdt/libstapsdt $GITHUB_WORKSPACE/libstapsdt | |
cd $GITHUB_WORKSPACE/libstapsdt | |
git reset --hard 5a44c3a5e4b1cdb16e1c02e1cc2474f9ca56d4ff | |
make | |
sudo make install | |
sudo ldconfig | |
- name: Compile | |
run: make -C testdata/ | |
- name: Test | |
run: | | |
export PATH=${PATH}:`go env GOPATH`/bin | |
go mod tidy | |
go test -exec sudo -cover -v ./... |