mirror of
https://github.com/YosysHQ/yosys
synced 2026-03-23 04:49:15 +00:00
CI: add support for merge queue
This commit is contained in:
parent
05d1d56b9d
commit
cf4d4ff23d
7 changed files with 161 additions and 58 deletions
39
.github/workflows/extra-builds.yml
vendored
39
.github/workflows/extra-builds.yml
vendored
|
|
@ -1,23 +1,20 @@
|
||||||
name: Test extra build flows
|
name: Test extra build flows
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# always test main
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
merge_group:
|
|
||||||
# test PRs
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# allow triggering tests, ignores skip check
|
merge_group:
|
||||||
|
#push:
|
||||||
|
# branches: [ main ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre_job:
|
pre_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
# don't run on documentation changes
|
# don't run on documentation changes
|
||||||
|
|
@ -26,11 +23,19 @@ jobs:
|
||||||
# but never cancel main
|
# but never cancel main
|
||||||
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
vs-prep:
|
vs-prep:
|
||||||
name: Prepare Visual Studio build
|
name: Prepare Visual Studio build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [pre_job]
|
needs: [pre_job]
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -48,7 +53,7 @@ jobs:
|
||||||
name: Visual Studio build
|
name: Visual Studio build
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [vs-prep, pre_job]
|
needs: [vs-prep, pre_job]
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -65,7 +70,7 @@ jobs:
|
||||||
wasi-build:
|
wasi-build:
|
||||||
name: WASI build
|
name: WASI build
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -111,7 +116,7 @@ jobs:
|
||||||
nix-build:
|
nix-build:
|
||||||
name: "Build nix flake"
|
name: "Build nix flake"
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -126,3 +131,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
install_url: https://releases.nixos.org/nix/nix-2.30.0/install
|
install_url: https://releases.nixos.org/nix/nix-2.30.0/install
|
||||||
- run: nix build .?submodules=1 -L
|
- run: nix build .?submodules=1 -L
|
||||||
|
|
||||||
|
extra-builds-result:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- vs-build
|
||||||
|
- wasi-build
|
||||||
|
- nix-build
|
||||||
|
if: always() && !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
steps:
|
||||||
|
- run: echo "All good"
|
||||||
23
.github/workflows/prepare-docs.yml
vendored
23
.github/workflows/prepare-docs.yml
vendored
|
|
@ -1,17 +1,24 @@
|
||||||
name: Build docs artifact with Verific
|
name: Build docs artifact with Verific
|
||||||
|
|
||||||
on: [push, pull_request, merge_group]
|
on:
|
||||||
|
pull_request:
|
||||||
|
merge_group:
|
||||||
|
push:
|
||||||
|
branches: [ main, "docs-preview/**", "docs-preview*" ]
|
||||||
|
tags: [ "*" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_docs_rebuild:
|
check_docs_rebuild:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
skip_check: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
docs_export: ${{ steps.docs_var.outputs.docs_export }}
|
docs_export: ${{ steps.docs_var.outputs.docs_export }}
|
||||||
env:
|
env:
|
||||||
docs_export: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}
|
docs_export: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
paths_ignore: '["**/README.md"]'
|
paths_ignore: '["**/README.md"]'
|
||||||
|
|
@ -22,11 +29,19 @@ jobs:
|
||||||
- id: docs_var
|
- id: docs_var
|
||||||
run: echo "docs_export=${docs_export}" >> $GITHUB_OUTPUT
|
run: echo "docs_export=${docs_export}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
prepare-docs:
|
prepare-docs:
|
||||||
# docs builds are needed for anything on main, any tagged versions, and any tag
|
# docs builds are needed for anything on main, any tagged versions, and any tag
|
||||||
# or branch starting with docs-preview
|
# or branch starting with docs-preview
|
||||||
needs: check_docs_rebuild
|
needs: check_docs_rebuild
|
||||||
if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' && github.repository == 'YosysHQ/Yosys' }}
|
if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }}
|
||||||
runs-on: [self-hosted, linux, x64, fast]
|
runs-on: [self-hosted, linux, x64, fast]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Yosys
|
- name: Checkout Yosys
|
||||||
|
|
@ -75,7 +90,7 @@ jobs:
|
||||||
make -C docs html -j$procs TARGETS= EXTRA_TARGETS=
|
make -C docs html -j$procs TARGETS= EXTRA_TARGETS=
|
||||||
|
|
||||||
- name: Trigger RTDs build
|
- name: Trigger RTDs build
|
||||||
if: ${{ needs.check_docs_rebuild.outputs.docs_export == 'true' }}
|
if: ${{ needs.check_docs_rebuild.outputs.docs_export == 'true' && github.repository == 'YosysHQ/Yosys' }}
|
||||||
uses: dfm/rtds-action@v1.1.0
|
uses: dfm/rtds-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
|
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
|
||||||
|
|
|
||||||
7
.github/workflows/source-vendor.yml
vendored
7
.github/workflows/source-vendor.yml
vendored
|
|
@ -1,6 +1,11 @@
|
||||||
name: Create source archive with vendored dependencies
|
name: Create source archive with vendored dependencies
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
pull_request:
|
||||||
|
merge_group:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vendor-sources:
|
vendor-sources:
|
||||||
|
|
|
||||||
45
.github/workflows/test-build.yml
vendored
45
.github/workflows/test-build.yml
vendored
|
|
@ -1,23 +1,20 @@
|
||||||
name: Build and run tests
|
name: Build and run tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# always test main
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
merge_group:
|
|
||||||
# test PRs
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# allow triggering tests, ignores skip check
|
merge_group:
|
||||||
|
#push:
|
||||||
|
# branches: [ main ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre_job:
|
pre_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
# don't run on documentation changes
|
# don't run on documentation changes
|
||||||
|
|
@ -26,12 +23,21 @@ jobs:
|
||||||
# but never cancel main
|
# but never cancel main
|
||||||
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
pre_docs_job:
|
pre_docs_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
# don't run on readme changes
|
# don't run on readme changes
|
||||||
|
|
@ -40,6 +46,14 @@ jobs:
|
||||||
# but never cancel main
|
# but never cancel main
|
||||||
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
build-yosys:
|
build-yosys:
|
||||||
name: Reusable build
|
name: Reusable build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
@ -226,7 +240,7 @@ jobs:
|
||||||
name: Try build docs
|
name: Try build docs
|
||||||
runs-on: [self-hosted, linux, x64, fast]
|
runs-on: [self-hosted, linux, x64, fast]
|
||||||
needs: [pre_docs_job]
|
needs: [pre_docs_job]
|
||||||
if: ${{ needs.pre_docs_job.outputs.should_skip != 'true' && github.repository == 'YosysHQ/Yosys' }}
|
if: ${{ needs.pre_docs_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
docs-target: [html, latexpdf]
|
docs-target: [html, latexpdf]
|
||||||
|
|
@ -265,3 +279,14 @@ jobs:
|
||||||
name: docs-build-${{ matrix.docs-target }}
|
name: docs-build-${{ matrix.docs-target }}
|
||||||
path: docs/build/
|
path: docs/build/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
|
test-build-result:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- test-yosys
|
||||||
|
- test-cells
|
||||||
|
- test-docs
|
||||||
|
- test-docs-build
|
||||||
|
if: always() && !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
steps:
|
||||||
|
- run: echo "All good"
|
||||||
31
.github/workflows/test-compile.yml
vendored
31
.github/workflows/test-compile.yml
vendored
|
|
@ -1,23 +1,20 @@
|
||||||
name: Compiler testing
|
name: Compiler testing
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# always test main
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
merge_group:
|
|
||||||
# test PRs
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# allow triggering tests, ignores skip check
|
merge_group:
|
||||||
|
#push:
|
||||||
|
# branches: [ main ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre_job:
|
pre_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
# don't run on documentation changes
|
# don't run on documentation changes
|
||||||
|
|
@ -26,10 +23,18 @@ jobs:
|
||||||
# but never cancel main
|
# but never cancel main
|
||||||
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
test-compile:
|
test-compile:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||||
env:
|
env:
|
||||||
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}}
|
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}}
|
||||||
CC_SHORT: ${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }}
|
CC_SHORT: ${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }}
|
||||||
|
|
@ -90,3 +95,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make config-$CC_SHORT
|
make config-$CC_SHORT
|
||||||
make -j$procs CXXSTD=c++20 compile-only
|
make -j$procs CXXSTD=c++20 compile-only
|
||||||
|
|
||||||
|
test-compile-result:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- test-compile
|
||||||
|
if: always() && !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
steps:
|
||||||
|
- run: echo "All good"
|
||||||
|
|
|
||||||
32
.github/workflows/test-sanitizers.yml
vendored
32
.github/workflows/test-sanitizers.yml
vendored
|
|
@ -1,32 +1,41 @@
|
||||||
name: Check clang sanitizers
|
name: Check clang sanitizers
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# always test main
|
pull_request:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
merge_group:
|
merge_group:
|
||||||
# ignore PRs due to time needed
|
#push:
|
||||||
# allow triggering tests, ignores skip check
|
# branches: [ main ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre_job:
|
pre_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
# don't run on documentation changes
|
# don't run on documentation changes
|
||||||
paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]'
|
paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]'
|
||||||
|
# cancel previous builds if a new commit is pushed
|
||||||
|
# but never cancel main
|
||||||
|
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
run_san:
|
run_san:
|
||||||
name: Build and run tests
|
name: Build and run tests
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||||
env:
|
env:
|
||||||
CC: clang
|
CC: clang
|
||||||
ASAN_OPTIONS: halt_on_error=1
|
ASAN_OPTIONS: halt_on_error=1
|
||||||
|
|
@ -73,3 +82,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
find tests/**/*.err -print -exec cat {} \;
|
find tests/**/*.err -print -exec cat {} \;
|
||||||
|
|
||||||
|
test-sanitizers-result:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- run_san
|
||||||
|
if: always() && !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
steps:
|
||||||
|
- run: echo "All good"
|
||||||
|
|
|
||||||
42
.github/workflows/test-verific.yml
vendored
42
.github/workflows/test-verific.yml
vendored
|
|
@ -1,23 +1,20 @@
|
||||||
name: Build and run tests with Verific (Linux)
|
name: Build and run tests with Verific (Linux)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# always test main
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
merge_group:
|
|
||||||
# test PRs
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# allow triggering tests, ignores skip check
|
merge_group:
|
||||||
|
#push:
|
||||||
|
# branches: [ main ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-job:
|
pre_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.set_output.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
|
if: ${{ github.event_name != 'merge_group' }}
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
# don't run on documentation changes
|
# don't run on documentation changes
|
||||||
|
|
@ -26,9 +23,17 @@ jobs:
|
||||||
# but never cancel main
|
# but never cancel main
|
||||||
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
cancel_others: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
|
- id: set_output
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||||
|
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
test-verific:
|
test-verific:
|
||||||
needs: pre-job
|
needs: pre_job
|
||||||
if: ${{ needs.pre-job.outputs.should_skip != 'true' && github.repository == 'YosysHQ/Yosys' }}
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }}
|
||||||
runs-on: [self-hosted, linux, x64, fast]
|
runs-on: [self-hosted, linux, x64, fast]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Yosys
|
- name: Checkout Yosys
|
||||||
|
|
@ -76,13 +81,13 @@ jobs:
|
||||||
cd tests/svtypes && bash run-test.sh
|
cd tests/svtypes && bash run-test.sh
|
||||||
|
|
||||||
- name: Run SBY tests
|
- name: Run SBY tests
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' }}
|
||||||
run: |
|
run: |
|
||||||
make -C sby run_ci
|
make -C sby run_ci
|
||||||
|
|
||||||
test-pyosys:
|
test-pyosys:
|
||||||
needs: pre-job
|
needs: pre_job
|
||||||
if: ${{ needs.pre-job.outputs.should_skip != 'true' && github.repository == 'YosysHQ/Yosys' }}
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }}
|
||||||
runs-on: [self-hosted, linux, x64, fast]
|
runs-on: [self-hosted, linux, x64, fast]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Yosys
|
- name: Checkout Yosys
|
||||||
|
|
@ -118,3 +123,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
export PYTHONPATH=${GITHUB_WORKSPACE}/.local/usr/lib/python3/site-packages:$PYTHONPATH
|
export PYTHONPATH=${GITHUB_WORKSPACE}/.local/usr/lib/python3/site-packages:$PYTHONPATH
|
||||||
python3 tests/pyosys/run_tests.py
|
python3 tests/pyosys/run_tests.py
|
||||||
|
|
||||||
|
test-verific-result:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- test-verific
|
||||||
|
- test-pyosys
|
||||||
|
if: always() && !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
steps:
|
||||||
|
- run: echo "All good"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue