Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
Signed-off-by: qwq233 <qwq233@qwq2333.top>
  • Loading branch information
qwq233 committed Nov 8, 2024
1 parent 48fd16e commit e152181
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
git -c submodule."libs/rust".update=none submodule update --init --recursive
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
uses: jwlawson/actions-setup-cmake@v1.12
with:
cmake-version: '3.22.1'
- name: Setup Java
Expand Down Expand Up @@ -73,8 +73,9 @@ jobs:
sudo apt-get install wget bison gcc make curl ninja-build -y
echo "y" | sdkmanager --install "ndk;$ndkversion" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang
chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang
wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18
chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18
touch ${ANDROID_SDK_ROOT}/ndk/$ndkversion/enable_ollvm
echo "sdk.dir=${ANDROID_HOME}" >> local.properties
- name: Debug Build
run: |
Expand Down Expand Up @@ -124,7 +125,7 @@ jobs:
run: |
git -c submodule."libs/rust".update=none submodule update --init --recursive
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
uses: jwlawson/actions-setup-cmake@v1.12
with:
cmake-version: '3.22.1'
- name: Setup Java
Expand All @@ -145,7 +146,7 @@ jobs:
- name: Prepare Environment
run: |
echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*' aspnetcore-targeting-pack-6.0 aspnetcore-targeting-pack-7.0
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
Expand All @@ -166,8 +167,9 @@ jobs:
sudo apt-get install bison gcc make wget curl ninja-build -y
echo "y" | sdkmanager --install "ndk;$ndkversion" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang
chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang
wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18
chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18
touch ${ANDROID_SDK_ROOT}/ndk/$ndkversion/enable_ollvm
echo "sdk.dir=${ANDROID_HOME}" >> local.properties
- name: Debug Build
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
git -c submodule."libs/rust".update=none submodule update --init --recursive
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
uses: jwlawson/actions-setup-cmake@v1.12
with:
cmake-version: '3.22.1'
- name: Setup Java
Expand Down Expand Up @@ -72,8 +72,6 @@ jobs:
sudo apt-get install wget bison gcc make curl ninja-build -y
echo "y" | sdkmanager --install "ndk;$ndkversion" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang
chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang
echo "sdk.dir=${ANDROID_HOME}" >> local.properties
- name: Debug Build
Expand Down
4 changes: 1 addition & 3 deletions TMessagesProj/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ ${CMAKE_HOME_DIRECTORY}/boringssl/lib/libssl_${ANDROID_ABI}.a,
${CMAKE_HOME_DIRECTORY}/boringssl/lib/libcrypto_${ANDROID_ABI}.a")

if (UNIX)
if(EXISTS "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang")
if(EXISTS "${CMAKE_ANDROID_NDK}/enable_ollvm")
message("ollvm enabled")
set(CMAKE_C_COMPILER "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang")
set(CMAKE_CXX_COMPILER "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mllvm -fla -mllvm -split -mllvm -sub -mllvm -bcf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -fla -mllvm -split -mllvm -sub -mllvm -bcf")
endif()
Expand Down

0 comments on commit e152181

Please sign in to comment.