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

[WIP] Ci reenable ccache #3584

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CleanUpCache

on:
workflow_run:
workflows: [LinuxClang, cuda, LinuxGcc, hip, Hypre, intel, macos, PETSc, SUNDIALS, CodeQL, smoke, apps]
workflows: [LinuxClang, cuda, LinuxGcc, hip, Hypre, intel, macos, PETSc, SUNDIALS, windows, CodeQL, smoke, apps]
types:
- completed

Expand Down
120 changes: 61 additions & 59 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,29 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master
#- name: Set Up Cache
# uses: actions/cache@v3
# with:
# path: ~/.ccache
# key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
# restore-keys: |
# ccache-${{ github.workflow }}-${{ github.job }}-git-
#- name: Install Ccache
# run: |
# Invoke-WebRequest https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-windows-x86_64.zip -OutFile ccache-4.8-windows-x86_64.zip
# Expand-Archive ccache-4.8-windows-x86_64.zip
- name: Set Up Cache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Install Ccache
run: |
Invoke-WebRequest https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-windows-x86_64.zip -OutFile ccache-4.8-windows-x86_64.zip
Expand-Archive ccache-4.8-windows-x86_64.zip
- name: Build & Install
run: |
#$ccachepath = Join-Path $pwd "ccache-4.8-windows-x86_64"
#$Env:PATH += ";$ccachepath"
#$ccachecachedir = Join-Path $HOME ".ccache"
#$Env:CCACHE_DIR="$ccachecachedir"
#$Env:CCACHE_DIR
#$Env:CCACHE_COMPRESS='1'
#$Env:CCACHE_COMPRESSLEVEL='10'
#$Env:CCACHE_MAXSIZE='105M'
#ccache -z
$ccachepath = Join-Path $pwd "ccache-4.8-windows-x86_64"
$Env:PATH = "$ccachepath;" + $Env:PATH
Add-Content $env:GITHUB_PATH "$ccachepath"
$ccachecachedir = Join-Path $HOME ".ccache"
$Env:CCACHE_DIR="$ccachecachedir"
$Env:CCACHE_DIR
$Env:CCACHE_COMPRESS='1'
$Env:CCACHE_COMPRESSLEVEL='10'
$Env:CCACHE_MAXSIZE='105M'
ccache.exe -z

cmake -S . -B build `
-G "Ninja" `
Expand All @@ -45,11 +46,11 @@ jobs:
-DAMReX_EB=OFF `
-DAMReX_ENABLE_TESTS=ON `
-DAMReX_FORTRAN=OFF `
-DAMReX_MPI=OFF
#-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DAMReX_MPI=OFF `
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache.exe
cmake --build build --config Debug -j 2

#ccache -s
ccache.exe -s

# Build libamrex and all test (static)
test_msvc_static:
Expand All @@ -58,27 +59,28 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master
#- name: Set Up Cache
# uses: actions/cache@v3
# with:
# path: ~/.ccache
# key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
# restore-keys: |
# ccache-${{ github.workflow }}-${{ github.job }}-git-
#- name: Install Ccache
# run: |
# Invoke-WebRequest https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-windows-x86_64.zip -OutFile ccache-4.8-windows-x86_64.zip
# Expand-Archive ccache-4.8-windows-x86_64.zip
- name: Set Up Cache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Install Ccache
run: |
Invoke-WebRequest https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-windows-x86_64.zip -OutFile ccache-4.8-windows-x86_64.zip
Expand-Archive ccache-4.8-windows-x86_64.zip
- name: Build & Install
run: |
#$ccachepath = Join-Path $pwd "ccache-4.8-windows-x86_64"
#$Env:PATH += ";$ccachepath"
#$ccachecachedir = Join-Path $HOME ".ccache"
#$Env:CCACHE_DIR="$ccachecachedir"
#$Env:CCACHE_COMPRESS='1'
#$Env:CCACHE_COMPRESSLEVEL='10'
#$Env:CCACHE_MAXSIZE='135M'
#ccache -z
$ccachepath = Join-Path $pwd "ccache-4.8-windows-x86_64"
$Env:PATH = "$ccachepath;" + $Env:PATH
Add-Content $env:GITHUB_PATH "$ccachepath"
$ccachecachedir = Join-Path $HOME ".ccache"
$Env:CCACHE_DIR="$ccachecachedir"
$Env:CCACHE_COMPRESS='1'
$Env:CCACHE_COMPRESSLEVEL='10'
$Env:CCACHE_MAXSIZE='135M'
ccache.exe -z

cmake -S . -B build `
-G "Ninja" `
Expand All @@ -87,11 +89,11 @@ jobs:
-DAMReX_EB=ON `
-DAMReX_ENABLE_TESTS=ON `
-DAMReX_FORTRAN=OFF `
-DAMReX_MPI=OFF
#-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DAMReX_MPI=OFF `
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache.exe
cmake --build build --config RelWithDebInfo -j 2

#ccache -s
ccache.exe -s

# Build libamrex and all tests
tests_clang:
Expand All @@ -117,17 +119,17 @@ jobs:
cmake --build build --config Release -j 2

# If we add ccache back, don't forget to update cleanup-cache.yml
#save_pr_number:
# if: github.event_name == 'pull_request'
# runs-on: ubuntu-latest
# steps:
# - name: Save PR number
# env:
# PR_NUMBER: ${{ github.event.number }}
# run: |
# echo $PR_NUMBER > pr_number.txt
# - uses: actions/upload-artifact@v3
# with:
# name: pr_number
# path: pr_number.txt
# retention-days: 1
save_pr_number:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v3
with:
name: pr_number
path: pr_number.txt
retention-days: 1