mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-15 11:45:41 +00:00
Merge remote-tracking branch 'upstream'
This commit is contained in:
commit
da7a6b8331
6 changed files with 40 additions and 48 deletions
17
.github/workflows/extra-builds.yml
vendored
17
.github/workflows/extra-builds.yml
vendored
|
|
@ -3,8 +3,8 @@ name: Test extra build flows
|
|||
on:
|
||||
pull_request:
|
||||
merge_group:
|
||||
#push:
|
||||
# branches: [ main ]
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
@ -27,6 +27,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
|
||||
|
|
@ -35,7 +37,7 @@ jobs:
|
|||
name: Visual Studio build
|
||||
runs-on: windows-latest
|
||||
needs: [pre_job]
|
||||
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
|
|
@ -51,6 +53,7 @@ jobs:
|
|||
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||
with:
|
||||
key: vs-build
|
||||
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
restore-keys: |
|
||||
vs-build-
|
||||
|
||||
|
|
@ -80,7 +83,7 @@ jobs:
|
|||
name: MINGW64 build
|
||||
runs-on: windows-latest
|
||||
needs: [pre_job]
|
||||
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
|
|
@ -114,6 +117,7 @@ jobs:
|
|||
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||
with:
|
||||
key: mingw-build
|
||||
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
restore-keys: |
|
||||
mingw-build-
|
||||
|
||||
|
|
@ -130,7 +134,7 @@ jobs:
|
|||
wasi-build:
|
||||
name: WASI build
|
||||
needs: pre_job
|
||||
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
|
@ -142,6 +146,7 @@ jobs:
|
|||
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||
with:
|
||||
key: wasi-build
|
||||
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
restore-keys: |
|
||||
wasi-build-
|
||||
|
||||
|
|
@ -184,7 +189,7 @@ jobs:
|
|||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
install_url: https://releases.nixos.org/nix/nix-2.30.0/install
|
||||
- run: nix build .?submodules=1 -L
|
||||
- run: nix build -L
|
||||
|
||||
extra-builds-result:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
17
.github/workflows/test-build.yml
vendored
17
.github/workflows/test-build.yml
vendored
|
|
@ -3,8 +3,8 @@ name: Build and run tests
|
|||
on:
|
||||
pull_request:
|
||||
merge_group:
|
||||
#push:
|
||||
# branches: [ main ]
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
- id: set_output
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||
echo "should_skip=false" >> $GITHUB_OUTPUT
|
||||
echo "should_skip=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
|
@ -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
|
||||
|
|
@ -86,6 +88,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 }}-
|
||||
|
||||
|
|
@ -118,7 +121,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:
|
||||
|
|
@ -172,7 +175,7 @@ jobs:
|
|||
name: Run test_cell
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [build-yosys, pre_job]
|
||||
if: needs.pre_job.outputs.should_skip != 'true' && false
|
||||
if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true'
|
||||
env:
|
||||
CC: clang
|
||||
strategy:
|
||||
|
|
@ -211,7 +214,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]
|
||||
|
|
@ -257,7 +260,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]
|
||||
|
|
|
|||
17
.github/workflows/test-compile.yml
vendored
17
.github/workflows/test-compile.yml
vendored
|
|
@ -3,8 +3,8 @@ name: Compiler testing
|
|||
on:
|
||||
pull_request:
|
||||
merge_group:
|
||||
#push:
|
||||
# branches: [ main ]
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
@ -27,6 +27,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
|
||||
|
|
@ -34,7 +36,7 @@ jobs:
|
|||
test-compile:
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: pre_job
|
||||
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
env:
|
||||
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}}
|
||||
strategy:
|
||||
|
|
@ -43,7 +45,7 @@ jobs:
|
|||
- ubuntu-latest
|
||||
compiler:
|
||||
# oldest supported
|
||||
- 'clang-14'
|
||||
- 'clang-16'
|
||||
- 'gcc-11'
|
||||
# newest, make sure to update maximum standard step to match
|
||||
- 'clang-22'
|
||||
|
|
@ -70,6 +72,7 @@ jobs:
|
|||
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||
with:
|
||||
key: test-compile-${{ matrix.os }}-${{ matrix.compiler }}
|
||||
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
restore-keys: |
|
||||
test-compile-${{ matrix.os }}-${{ matrix.compiler }}-
|
||||
|
||||
|
|
@ -77,7 +80,6 @@ jobs:
|
|||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
compiler: ${{ matrix.compiler }}
|
||||
gcc: ${{ (matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang-14') && '12' || '' }}
|
||||
|
||||
- name: Tool versions
|
||||
shell: bash
|
||||
|
|
@ -85,11 +87,6 @@ jobs:
|
|||
$CC --version
|
||||
$CXX --version
|
||||
|
||||
- name: Fix clang-14 toolchain
|
||||
if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang-14'
|
||||
run: |
|
||||
echo 'CXXFLAGS=--gcc-toolchain=/usr -isystem /usr/include/c++/12 -isystem /usr/include/x86_64-linux-gnu/c++/12' >> $GITHUB_ENV
|
||||
|
||||
# minimum standard
|
||||
- name: Build C++20
|
||||
shell: bash
|
||||
|
|
|
|||
33
.github/workflows/test-sanitizers.yml
vendored
33
.github/workflows/test-sanitizers.yml
vendored
|
|
@ -27,24 +27,20 @@ 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
|
||||
|
||||
run_san:
|
||||
name: Build and run tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
test-sanitizers:
|
||||
runs-on: [self-hosted, linux, x64, fast]
|
||||
needs: pre_job
|
||||
if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true'
|
||||
env:
|
||||
CC: clang
|
||||
ASAN_OPTIONS: halt_on_error=1 detect_container_overflow=0
|
||||
UBSAN_OPTIONS: halt_on_error=1
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
sanitizer: ['undefined,address']
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout Yosys
|
||||
uses: actions/checkout@v7
|
||||
|
|
@ -53,20 +49,9 @@ jobs:
|
|||
persist-credentials: false
|
||||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-build-env
|
||||
with:
|
||||
runs-on: ${{ matrix.os }}
|
||||
get-build-deps: true
|
||||
get-test-deps: true
|
||||
get-iverilog: true
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||
with:
|
||||
key: test-san-${{ matrix.os }}
|
||||
restore-keys: |
|
||||
test-san-${{ matrix.os }}-
|
||||
- name: Runtime environment
|
||||
run: |
|
||||
echo "procs=$(nproc)" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
|
|
@ -74,7 +59,7 @@ jobs:
|
|||
rm -rf build
|
||||
cmake -B build . \
|
||||
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_BUILD_TYPE=Sanitize -DSANITIZE=${{ matrix.sanitizer }} \
|
||||
-DCMAKE_BUILD_TYPE=Sanitize -DSANITIZE='undefined,address' \
|
||||
-DYOSYS_COMPILER_LAUNCHER=ccache
|
||||
cmake --build build -j$procs
|
||||
|
||||
|
|
@ -96,7 +81,7 @@ jobs:
|
|||
test-sanitizers-result:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- run_san
|
||||
- test-sanitizers
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check results
|
||||
|
|
|
|||
2
abc
2
abc
|
|
@ -1 +1 @@
|
|||
Subproject commit a2b0f3455f33c8d9a9da3ef4bec317519c64ec7c
|
||||
Subproject commit 648de7a21751cfab01c253aca6d4751f642577df
|
||||
|
|
@ -60,6 +60,7 @@ function(yosys_abc_target arg_LIBNAME arg_EXENAME)
|
|||
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:ABC_NAMESPACE=abc>
|
||||
ABC_USE_STDINT_H=1
|
||||
ABC_USE_CUDD=1
|
||||
ABC_NO_HISTORY=1
|
||||
ABC_NO_DYNAMIC_LINKING
|
||||
$<${YOSYS_ENABLE_THREADS}:ABC_USE_PTHREADS>
|
||||
$<${YOSYS_ENABLE_READLINE}:ABC_USE_READLINE>
|
||||
|
|
@ -83,6 +84,7 @@ function(yosys_abc_target arg_LIBNAME arg_EXENAME)
|
|||
-Wno-deprecated-comma-subscript
|
||||
-Wno-format
|
||||
-Wno-constant-logical-operand
|
||||
-Wno-sizeof-pointer-memaccess
|
||||
)
|
||||
target_link_libraries(${arg_LIBNAME} PUBLIC
|
||||
$<${YOSYS_ENABLE_THREADS}:Threads::Threads>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue