Change the installation method of xmake #9
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: ubuntu-clang19 | |
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-19 -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 - | |
# curl -kfsSL https://xmake.io/shget.text | bash -s v2.8.6 | |
- uses: xmake-io/github-action-setup-xmake@v1 | |
with: | |
xmake-version: v2.8.6 | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: build | |
run: | | |
export XMAKE_ROOT="y" | |
# source ~/.xmake/profile | |
g++-13 -v | |
clang++-19 -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++-19 | |
export CC=clang-19 | |
xmake build -y | |
xmake install -o . | |
ldd ./bin/cpp-freegpt-webui |