3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-27 02:58:48 +00:00

Store caches on main

This commit is contained in:
Miodrag Milanovic 2026-06-26 14:33:12 +02:00
parent 0af18fa273
commit 459a933005
4 changed files with 32 additions and 17 deletions

View file

@ -3,8 +3,8 @@ name: Build and run tests
on:
pull_request:
merge_group:
#push:
# branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
@ -50,6 +50,8 @@ jobs:
run: |
if [ "${{ github.event_name }}" = "merge_group" ]; then
echo "should_skip=false" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" = "push" ]; then
should_skip=false
else
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
fi
@ -83,6 +85,7 @@ jobs:
uses: hendrikmuhs/ccache-action@v1.2.23
with:
key: test-build-${{ matrix.os }}
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
restore-keys: |
test-build-${{ matrix.os }}-
@ -115,7 +118,7 @@ jobs:
name: Run tests
runs-on: ${{ matrix.os }}
needs: [build-yosys, pre_job]
if: needs.pre_job.outputs.should_skip != 'true'
if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true'
env:
CC: clang
strategy:
@ -165,7 +168,7 @@ jobs:
name: Run test_cell
runs-on: ${{ matrix.os }}
needs: [build-yosys, pre_job]
if: needs.pre_job.outputs.should_skip != 'true'
if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true'
env:
CC: clang
strategy:
@ -204,7 +207,7 @@ jobs:
name: Run docs tests
runs-on: ${{ matrix.os }}
needs: [build-yosys, pre_docs_job]
if: needs.pre_docs_job.outputs.should_skip != 'true'
if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true'
strategy:
matrix:
os: [ubuntu-latest]
@ -246,7 +249,7 @@ jobs:
name: Try build docs
runs-on: [self-hosted, linux, x64, fast]
needs: [pre_docs_job]
if: ${{ needs.pre_docs_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }}
if: ${{ github.event_name != 'push' && needs.pre_docs_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }}
strategy:
matrix:
docs-target: [html, latexpdf]