Skip to content

Update README.md

Update README.md #260

name: ubuntu-clang18
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- name: Installation
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip gobjc g++-13 wget sudo libcurl4-openssl-dev libnss3 nss-plugin-pem ca-certificates
sudo apt install lsb-release wget software-properties-common gnupg -y
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs) main"
sudo apt update
sudo apt list | grep clang
sudo apt install clang-18 -y
wget https://github.com/lwthiker/curl-impersonate/releases/download/v0.5.4/libcurl-impersonate-v0.5.4.x86_64-linux-gnu.tar.gz
sudo mv libcurl-impersonate-v0.5.4.x86_64-linux-gnu.tar.gz /usr/lib64
cd /usr/lib64
sudo tar -xvf libcurl-impersonate-v0.5.4.x86_64-linux-gnu.tar.gz
cd -
wget https://github.com/xmake-io/xmake/releases/download/v2.8.2/xmake-v2.8.2.xz.run
chmod 777 xmake-v2.8.2.xz.run
./xmake-v2.8.2.xz.run > a.txt
- name: checkout
uses: actions/checkout@v3
- name: build
run: |
export XMAKE_ROOT="y"
source ~/.xmake/profile
g++-13 -v
clang++-18 -v
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=/usr/lib64:$LIBRARY_PATH
export CXX=g++-13
export CC=gcc-13
echo "-y" | xrepo install bzip2
sed -i 's/add_cxflags("-O2 -Wall -Wextra -pedantic-errors -Wno-missing-field-initializers -Wno-ignored-qualifiers")/add_cxflags("-O2 -Wall -Wno-missing-field-initializers -Wno-ignored-qualifiers")/g' xmake.lua
sed '/add_cxflags("-O2 -Wall -Wno-missing-field-initializers -Wno-ignored-qualifiers")/a add_defines("__cpp_concepts=202002L")' xmake.lua > temp.txt
mv temp.txt xmake.lua
cat xmake.lua
export CXX=clang++-18
export CC=clang-18
xmake build -y
xmake install -o .
ldd ./bin/cpp-freegpt-webui