-
Notifications
You must be signed in to change notification settings - Fork 50
58 lines (53 loc) · 2.31 KB
/
ubuntu-clang18.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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