From 6cfbbba8c65fedd256ca330a89ddc18291fd1316 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Thu, 29 Aug 2024 20:20:34 -0500 Subject: [PATCH] Update ci-windows.yml --- .github/workflows/ci-linux.yml | 24 ------------------------ .github/workflows/ci-macos.yml | 22 ---------------------- .github/workflows/ci-windows.yml | 22 ---------------------- build_tools/ci/build_test_cpp.sh | 6 +++++- 4 files changed, 5 insertions(+), 69 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index bc3a80c93..7bf02b91c 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -69,16 +69,6 @@ jobs: key: ${{ env.CACHE_KEY }} restore-keys: linux-build-test-cpp- - - name: Configure ccache debug logs - run: | - # https://interrupt.memfault.com/blog/ccache-debugging - echo CCACHE_DEBUG=1 >> $GITHUB_ENV - echo CCACHE_DEBUGLEVEL=2 >> $GITHUB_ENV - echo CCACHE_DEBUGDIR="/ccache-debug" >> $GITHUB_ENV - echo CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros >> $GITHUB_ENV - clang --version - echo CCACHE_COMPILERCHECK=content >> $GITHUB_ENV - - name: Build packages run: | export cache_dir="${{ env.CACHE_DIR }}" @@ -89,20 +79,6 @@ jobs: run: | tar cf iree-dist-linux.tar -C iree-install . - - name: Tar ccache logs - if: ${{ !cancelled() }} - run: | - ccache --show-stats -v - tar cf linux-ccache-logs.tar $CCACHE_DEBUGDIR - - - name: Upload ccache logs - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: ccache_logs - path: linux-ccache-logs.tar - if-no-files-found: warn - - name: Upload artifacts uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 18a21391e..10e8ecb85 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -64,14 +64,6 @@ jobs: key: ${{ env.CACHE_KEY }} restore-keys: ${{ matrix.runs-on }}-build-test-cpp- - - name: Configure ccache debug logs - run: | - echo CCACHE_DEBUG=1 >> $GITHUB_ENV - echo CCACHE_DEBUGLEVEL=2 >> $GITHUB_ENV - echo CCACHE_DEBUGDIR="$HOME/ccache-debug" >> $GITHUB_ENV - echo CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros >> $GITHUB_ENV - clang --version - - name: Build packages run: | export cache_dir="${{ env.CACHE_DIR }}" @@ -82,20 +74,6 @@ jobs: run: | tar cf iree-dist-${{ matrix.runs-on }}.tar -C iree-install . - - name: Tar ccache logs - if: ${{ !cancelled() }} - run: | - ccache --show-stats -v - tar cf macos-ccache-logs.tar $CCACHE_DEBUGDIR - - - name: Upload ccache logs - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: ccache_logs - path: macos-ccache-logs.tar - if-no-files-found: warn - - name: Upload artifacts uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index d7cb8a929..23cf467c0 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -72,14 +72,6 @@ jobs: key: ${{ env.CACHE_KEY }} restore-keys: windows-build-test-cpp- - - name: Configure ccache debug logs - run: | - echo CCACHE_DEBUG=1 >> $GITHUB_ENV - echo CCACHE_DEBUGLEVEL=2 >> $GITHUB_ENV - echo CCACHE_DEBUGDIR="/c/ccache-debug" >> $GITHUB_ENV - echo CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros >> $GITHUB_ENV - echo CCACHE_COMPILERCHECK=content >> $GITHUB_ENV - - name: Build packages run: | export cache_dir="${{ env.CACHE_DIR }}" @@ -90,20 +82,6 @@ jobs: run: | tar cf iree-dist-windows.tar -C iree-install . - - name: Tar ccache logs - if: ${{ !cancelled() }} - run: | - ccache --show-stats -v - tar cf windows-ccache-logs.tar $CCACHE_DEBUGDIR - - - name: Upload ccache logs - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: ccache_logs - path: windows-ccache-logs.tar - if-no-files-found: warn - - name: Upload artifacts uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} diff --git a/build_tools/ci/build_test_cpp.sh b/build_tools/ci/build_test_cpp.sh index 296dfc353..00ef3776b 100644 --- a/build_tools/ci/build_test_cpp.sh +++ b/build_tools/ci/build_test_cpp.sh @@ -28,7 +28,7 @@ echo "Using python: $python" # note: on windows (git-bash) result is "msys" # well only if you have apparently the right version of git-bash installed # https://stackoverflow.com/a/72164385 -if [[ "$OSTYPE" == "linux-gnu"* ]]; then +if [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "darwin"* ]]; then export CMAKE_TOOLCHAIN_FILE="$this_dir/linux_default_toolchain.cmake" export CC=clang export CXX=clang++ @@ -41,6 +41,10 @@ export CCACHE_MAXSIZE="700M" export CMAKE_C_COMPILER_LAUNCHER=ccache export CMAKE_CXX_COMPILER_LAUNCHER=ccache +export CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros +CC_VERSION=$($CC --version) +export CCACHE_COMPILERCHECK="string:$CC_VERSION" + # Clear ccache stats. ccache -z