mirror of
https://github.com/wownero/wownero.git
synced 2026-10-23 18:38:34 +02:00
ci: don't save caches for pull requests
This commit is contained in:
@@ -40,7 +40,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v5
|
- name: restore ccache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: /Users/runner/Library/Caches/ccache
|
path: /Users/runner/Library/Caches/ccache
|
||||||
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
||||||
@@ -57,6 +59,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{env.CCACHE_SETTINGS}}
|
${{env.CCACHE_SETTINGS}}
|
||||||
${{env.BUILD_DEFAULT}}
|
${{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:
|
build-windows:
|
||||||
name: 'Windows (MSYS2)'
|
name: 'Windows (MSYS2)'
|
||||||
@@ -68,7 +76,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v5
|
- name: restore ccache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: C:\Users\runneradmin\AppData\Local\ccache
|
path: C:\Users\runneradmin\AppData\Local\ccache
|
||||||
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
||||||
@@ -76,6 +86,7 @@ jobs:
|
|||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
update: true
|
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
|
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
|
- uses: ./.github/actions/set-make-job-count
|
||||||
- name: build
|
- name: build
|
||||||
@@ -84,6 +95,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{env.CCACHE_SETTINGS}}
|
${{env.CCACHE_SETTINGS}}
|
||||||
${{env.BUILD_DEFAULT}}
|
${{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:
|
build-arch:
|
||||||
name: 'Arch Linux'
|
name: 'Arch Linux'
|
||||||
@@ -98,7 +115,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v5
|
- name: restore ccache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ccache
|
path: ~/.cache/ccache
|
||||||
key: ccache-arch-build-${{ github.sha }}
|
key: ccache-arch-build-${{ github.sha }}
|
||||||
@@ -110,6 +129,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{ env.CCACHE_SETTINGS }}
|
${{ env.CCACHE_SETTINGS }}
|
||||||
${{ env.BUILD_DEFAULT }}
|
${{ 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:
|
build-debian:
|
||||||
# Oldest supported Debian version
|
# Oldest supported Debian version
|
||||||
@@ -133,7 +158,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v5
|
- name: restore ccache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ccache
|
path: ~/.cache/ccache
|
||||||
key: ccache-debian-11-build-${{ github.sha }}
|
key: ccache-debian-11-build-${{ github.sha }}
|
||||||
@@ -145,6 +172,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{ env.CCACHE_SETTINGS }}
|
${{ env.CCACHE_SETTINGS }}
|
||||||
${{ env.BUILD_DEFAULT }}
|
${{ 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:
|
build-ubuntu:
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
@@ -174,7 +207,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v5
|
- name: restore ccache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ccache
|
path: ~/.cache/ccache
|
||||||
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
|
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
|
||||||
@@ -186,6 +221,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{env.CCACHE_SETTINGS}}
|
${{env.CCACHE_SETTINGS}}
|
||||||
${{env.BUILD_DEFAULT}}
|
${{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:
|
test-ubuntu:
|
||||||
name: "${{ matrix.name }} (tests)"
|
name: "${{ matrix.name }} (tests)"
|
||||||
@@ -221,7 +262,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v5
|
- name: restore ccache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ccache
|
path: ~/.cache/ccache
|
||||||
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
|
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
|
||||||
@@ -238,6 +281,12 @@ jobs:
|
|||||||
${{env.CCACHE_SETTINGS}}
|
${{env.CCACHE_SETTINGS}}
|
||||||
${{env.BUILD_DEFAULT}}
|
${{env.BUILD_DEFAULT}}
|
||||||
cmake --build build --target test
|
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:
|
source-archive:
|
||||||
name: "source archive"
|
name: "source archive"
|
||||||
|
|||||||
@@ -104,21 +104,21 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
# Most volatile cache
|
# Most volatile cache
|
||||||
- name: ccache
|
- name: restore ccache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache/restore@v5
|
||||||
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ccache
|
path: ~/.cache/ccache
|
||||||
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
|
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
|
||||||
restore-keys: ccache-${{ matrix.toolchain.host }}-
|
restore-keys: ccache-${{ matrix.toolchain.host }}-
|
||||||
# Less volatile cache
|
# Less volatile cache
|
||||||
- name: depends cache
|
- name: restore depends cache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache/restore@v5
|
||||||
|
id: depends-restore
|
||||||
with:
|
with:
|
||||||
path: contrib/depends/built
|
path: contrib/depends/built
|
||||||
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
||||||
restore-keys: |
|
restore-keys: depends-${{ matrix.toolchain.host }}-
|
||||||
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
|
||||||
depends-${{ matrix.toolchain.host }}-
|
|
||||||
- name: prepare w64-mingw32
|
- name: prepare w64-mingw32
|
||||||
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' }}
|
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -129,6 +129,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{env.CCACHE_SETTINGS}}
|
${{env.CCACHE_SETTINGS}}
|
||||||
make depends target=${{ matrix.toolchain.host }} -j${{env.MAKE_JOB_COUNT}}
|
make depends target=${{ matrix.toolchain.host }} -j${{env.MAKE_JOB_COUNT}}
|
||||||
|
- 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 }}
|
||||||
|
- name: save depends cache
|
||||||
|
uses: actions/cache/save@v5
|
||||||
|
if: github.event_name != 'pull_request' && steps.depends-restore.outputs.cache-hit != 'true'
|
||||||
|
with:
|
||||||
|
path: contrib/depends/built
|
||||||
|
key: ${{ steps.depends-restore.outputs.cache-primary-key }}
|
||||||
- uses: actions/upload-artifact@v7
|
- uses: actions/upload-artifact@v7
|
||||||
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin' || matrix.toolchain.host == 'arm64-apple-darwin' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
|
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin' || matrix.toolchain.host == 'arm64-apple-darwin' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -23,15 +23,21 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: depends sources cache
|
- name: restore depends sources cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
path: contrib/depends/sources
|
path: contrib/depends/sources
|
||||||
key: sources-${{ hashFiles('contrib/depends/packages/*') }}
|
key: sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||||
- name: download depends sources
|
- name: download depends sources
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: make -C contrib/depends download
|
run: make -C contrib/depends download
|
||||||
|
- name: save depends sources cache
|
||||||
|
uses: actions/cache/save@v5
|
||||||
|
if: github.event_name != 'pull_request' && steps.cache.outputs.cache-hit != 'true'
|
||||||
|
with:
|
||||||
|
path: contrib/depends/sources
|
||||||
|
key: ${{ steps.cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
build-guix:
|
build-guix:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|||||||
Reference in New Issue
Block a user