Skip to content

Commit

Permalink
Create c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shuwens committed Oct 23, 2024
1 parent 9f402b3 commit e8fcdf4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: C/C++ CI

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

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install cross compile tools
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee -a /etc/apt/sources.list > /dev/null
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get update
sudo apt-get install llvm-18 clang-18 lld-18 -y
- name: install deps
run: make install-deps
- name: install boost
run: make install-boost
- name: setup
run: make setup
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ install-boost:
cd boost_1_86_0 && sudo ./b2 install
cat /usr/include/boost/version.hpp | grep "define BOOST_LIB_VERSION"


install-deps:
sudo apt install -y meson nvme-cli net-tools
sudo apt install -y clang-18 lld-18 cmake
sudo apt install -y pkg-config uuid-dev libfmt-dev libarchive-dev python3-pyelftools libssl-dev libisal-dev

install-python:
sudo apt install -y python3-pip
sudo mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.old
pip3 install meson pyelftools
sudo apt install -y pkg-config uuid-dev libfmt-dev libarchive-dev python3-pyelftools libssl-dev libisal-dev
sudo apt install -y nvme-cli net-tools
sudo apt install -y clang-18 lld-18 cmake

0 comments on commit e8fcdf4

Please sign in to comment.