mirror of
https://github.com/monero-project/monero.git
synced 2026-06-12 19:11:36 -07:00
ci: don't save caches for pull requests
This commit is contained in:
@@ -40,7 +40,9 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v5
|
||||
- name: restore ccache
|
||||
uses: actions/cache/restore@v5
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: /Users/runner/Library/Caches/ccache
|
||||
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
||||
@@ -57,6 +59,12 @@ jobs:
|
||||
run: |
|
||||
${{env.CCACHE_SETTINGS}}
|
||||
${{env.BUILD_DEFAULT}}
|
||||
- name: save ccache
|
||||
uses: actions/cache/save@v5
|
||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: /Users/runner/Library/Caches/ccache
|
||||
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
|
||||
|
||||
build-windows:
|
||||
name: 'Windows (MSYS2)'
|
||||
@@ -68,7 +76,9 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v5
|
||||
- name: restore ccache
|
||||
uses: actions/cache/restore@v5
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: C:\Users\runneradmin\AppData\Local\ccache
|
||||
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
||||
@@ -76,6 +86,7 @@ jobs:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
cache: false
|
||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound mingw-w64-x86_64-rust git pkg-config
|
||||
- uses: ./.github/actions/set-make-job-count
|
||||
- name: build
|
||||
@@ -84,6 +95,12 @@ jobs:
|
||||
run: |
|
||||
${{env.CCACHE_SETTINGS}}
|
||||
${{env.BUILD_DEFAULT}}
|
||||
- name: save ccache
|
||||
uses: actions/cache/save@v5
|
||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: C:\Users\runneradmin\AppData\Local\ccache
|
||||
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
|
||||
|
||||
build-arch:
|
||||
name: 'Arch Linux'
|
||||
@@ -98,7 +115,9 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v5
|
||||
- name: restore ccache
|
||||
uses: actions/cache/restore@v5
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ccache-arch-build-${{ github.sha }}
|
||||
@@ -110,6 +129,12 @@ jobs:
|
||||
run: |
|
||||
${{ env.CCACHE_SETTINGS }}
|
||||
${{ env.BUILD_DEFAULT }}
|
||||
- name: save ccache
|
||||
uses: actions/cache/save@v5
|
||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
|
||||
|
||||
build-debian:
|
||||
# Oldest supported Debian version
|
||||
@@ -133,7 +158,9 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v5
|
||||
- name: restore ccache
|
||||
uses: actions/cache/restore@v5
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ccache-debian-11-build-${{ github.sha }}
|
||||
@@ -145,6 +172,12 @@ jobs:
|
||||
run: |
|
||||
${{ env.CCACHE_SETTINGS }}
|
||||
${{ env.BUILD_DEFAULT }}
|
||||
- name: save ccache
|
||||
uses: actions/cache/save@v5
|
||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
|
||||
|
||||
build-ubuntu:
|
||||
name: ${{ matrix.name }}
|
||||
@@ -174,7 +207,9 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v5
|
||||
- name: restore ccache
|
||||
uses: actions/cache/restore@v5
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
|
||||
@@ -186,6 +221,12 @@ jobs:
|
||||
run: |
|
||||
${{env.CCACHE_SETTINGS}}
|
||||
${{env.BUILD_DEFAULT}}
|
||||
- name: save ccache
|
||||
uses: actions/cache/save@v5
|
||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
|
||||
|
||||
test-ubuntu:
|
||||
name: "${{ matrix.name }} (tests)"
|
||||
@@ -221,7 +262,9 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v5
|
||||
- name: restore ccache
|
||||
uses: actions/cache/restore@v5
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
|
||||
@@ -238,6 +281,12 @@ jobs:
|
||||
${{env.CCACHE_SETTINGS}}
|
||||
${{env.BUILD_DEFAULT}}
|
||||
cmake --build build --target test
|
||||
- name: save ccache
|
||||
uses: actions/cache/save@v5
|
||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
|
||||
|
||||
source-archive:
|
||||
name: "source archive"
|
||||
|
||||
Reference in New Issue
Block a user