Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh actions simplify llvm mingw cache #561

Merged
merged 5 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
scripts\download-toolchain.bat
- name: Build
run: |
set VCToolsVersion=14.16
set VCToolsVersion=14.29
set Winsdk=10.0.19041.0
set "WindowsSDKVersion=%Winsdk%\"
if "${{ matrix.arch }}" == "arm64" (call :SetNewVCToolsVersion)
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/compiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
arch: [x86]
crt-linkage: [static]
build_type: [Debug, Release]
runs-on: windows-2022
Expand Down Expand Up @@ -152,9 +152,8 @@ jobs:
uses: actions/cache@v3
with:
path: |
third_party/llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64
third_party/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64
key: ${{ runner.os }}-mingw64-third_party-llvm-20230614-msvcrt-and-ucrt
key: ${{ runner.os }}-mingw64-third_party-llvm-20230614-ucrt
- name: Cache mingw64 curl
id: curl-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -190,9 +189,7 @@ jobs:
if: ${{ steps.mingw-cache.outputs.cache-hit != 'true' }}
run: |
pushd third_party
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64.tar.xz
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz
tar -xf llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64.tar.xz
tar -xf llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz
rm -vf llvm-mingw-*.xz
popd
Expand Down Expand Up @@ -369,10 +366,6 @@ jobs:
# brew update
# brew install ninja cmake p7zip
brew install ninja
- name: Set up Xcode to 14.2 (macos 12)
if: ${{ matrix.os == 'macos-12' }}
run: |
sudo xcode-select -s /Applications/Xcode_14.2.app
- name: Set up Xcode to 15.0.1 (macos 13)
if: ${{ matrix.os == 'macos-13' }}
run: |
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/releases-mingw-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ jobs:
uses: actions/cache@v3
with:
path: |
third_party/llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64
third_party/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64
key: ${{ runner.os }}-mingw64-third_party-llvm-20230614-msvcrt-and-ucrt
third_party/llvm-mingw-20230614-${{ matrix.variant }}-ubuntu-20.04-x86_64
key: ${{ runner.os }}-mingw64-third_party-llvm-20230614-${{ matrix.variant }}
- name: Cache mingw64 curl
id: curl-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -106,10 +105,8 @@ jobs:
if: ${{ steps.mingw-cache.outputs.cache-hit != 'true' }}
run: |
pushd third_party
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64.tar.xz
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz
tar -xf llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64.tar.xz
tar -xf llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-${{ matrix.variant }}-ubuntu-20.04-x86_64.tar.xz
tar -xf llvm-mingw-20230614-${{ matrix.variant }}-ubuntu-20.04-x86_64.tar.xz
rm -vf llvm-mingw-*.xz
popd
- name: "Download dependency: curl"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ jobs:
sudo apt-get update -qq
- name: Populate depedencies
run: sudo apt-get update -qq && sudo apt-get install -y cmake ninja-build llvm libcurl4-openssl-dev
- name: Set clang environment
run: |
echo "CC=${{ github.workspace }}/third_party/llvm-build/Release+Asserts/bin/clang" >> $GITHUB_ENV
echo "CXX=${{ github.workspace }}/third_party/llvm-build/Release+Asserts/bin/clang++" >> $GITHUB_ENV
- name: Build Unittests
run: |
mkdir build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ sscxx
/third_party/curl-8.4.0_7-win64a-mingw
/third_party/llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64
/third_party/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64
/third_party/llvm-mingw-20230614-ucrt-macos-universal
/third_party/crashpad
/third_party/depot_tools
*.aps
Expand Down
21 changes: 17 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,22 @@ if (IOS)
set(_CRASHPAD_OS "-ios-simulator")
set(_CRASHPAD_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
endif()
elseif (ANDROID)
set(_CRASHPAD_OS "-android")
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64-v8a")
set(_CRASHPAD_ARCH "arm64")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "armeabi-v7a")
set(_CRASHPAD_ARCH "arm")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
set(_CRASHPAD_ARCH "x86")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(_CRASHPAD_ARCH "x64")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
set(_CRASHPAD_ARCH "riscv64")
else()
message(WARNING "crashpad: unsupported android architecture ${CMAKE_SYSTEM_PROCESSOR}")
set(_CRASHPAD_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
endif()
elseif (NOT OSX_CROSS_ARCHITECTURES_COUNT)
set(_CRASHPAD_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
elseif (OSX_CROSS_ARCHITECTURES_COUNT EQUAL 1)
Expand All @@ -2287,12 +2303,9 @@ elseif (_CRASHPAD_ARCH STREQUAL "i386" OR _CRASHPAD_ARCH STREQUAL "i586" OR _CRA
elseif (_CRASHPAD_ARCH STREQUAL "aarch64")
set(_CRASHPAD_ARCH "arm64")
endif()
if (ANDROID)
set(_CRASHPAD_OS "-android")
endif()
set(_CRASHPAD_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/third_party/crashpad/crashpad/out/Default-${_CRASHPAD_ARCH}${_CRASHPAD_OS}")
set(_CRASHPAD_BINARY_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/third_party/crashpad/crashpad/out/Binary-${_CRASHPAD_ARCH}${_CRASHPAD_OS}")
if ((${CMAKE_BUILD_TYPE} MATCHES MinSizeRel OR ${CMAKE_BUILD_TYPE} MATCHES Release) AND EXISTS "${_CRASHPAD_PREFIX}/obj/client/libclient.a")
if (UNIX AND (${CMAKE_BUILD_TYPE} MATCHES MinSizeRel OR ${CMAKE_BUILD_TYPE} MATCHES Release) AND EXISTS "${_CRASHPAD_PREFIX}/obj/client/libclient.a")
message(STATUS "Compiling with bundled crashpad client library")
add_library(crashpad_common STATIC IMPORTED)
set_property(TARGET crashpad_common PROPERTY
Expand Down
Loading