Skip to content

Commit

Permalink
Update ci-windows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 30, 2024
1 parent 08f8541 commit 3be318b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 68 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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() }}
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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() }}
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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() }}
Expand Down
9 changes: 9 additions & 0 deletions build_tools/ci/build_test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,23 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
export CMAKE_TOOLCHAIN_FILE="$this_dir/linux_default_toolchain.cmake"
export CC=clang
export CXX=clang++
CC_VERSION=$($CC --version)
elif [[ "$OSTYPE" == "darwin"* ]]; then
# i don't know why but mac doesn't like it when you export CC/CXX
# so just call clang directly
CC_VERSION=$(clang --version)
elif [[ "$OSTYPE" == "msys"* ]]; then
export CC=clang-cl.exe
export CXX=clang-cl.exe
CC_VERSION=$($CC --version)
fi

export CCACHE_DIR="${cache_dir}/ccache"
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
export CCACHE_COMPILERCHECK="string:$CC_VERSION"

# Clear ccache stats.
ccache -z
Expand Down

0 comments on commit 3be318b

Please sign in to comment.