diff --git a/.github/actions/setup-build-env/action.yml b/.github/actions/setup-build-env/action.yml index c1d3e2b01..b61bb95ac 100644 --- a/.github/actions/setup-build-env/action.yml +++ b/.github/actions/setup-build-env/action.yml @@ -33,21 +33,21 @@ runs: # and docs/source/getting_started/installation.rst to match. - name: Linux common dependencies if: runner.os == 'Linux' - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 + uses: awalsh128/cache-apt-pkgs-action@v1.6.1 with: packages: gawk git make python3 version: ${{ inputs.runs-on }}-commonys - name: Linux build dependencies if: runner.os == 'Linux' && inputs.get-build-deps == 'true' - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 + uses: awalsh128/cache-apt-pkgs-action@v1.6.1 with: packages: bison clang flex libffi-dev libfl-dev libreadline-dev pkg-config tcl-dev zlib1g-dev libgtest-dev libgmock-dev version: ${{ inputs.runs-on }}-buildys - name: Linux docs dependencies if: runner.os == 'Linux' && inputs.get-docs-deps == 'true' - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 + uses: awalsh128/cache-apt-pkgs-action@v1.6.1 with: packages: graphviz xdot version: ${{ inputs.runs-on }}-docsys @@ -70,7 +70,7 @@ runs: shell: bash run: | echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH - echo "$(brew --prefix llvm@20)/bin" >> $GITHUB_PATH + echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH echo "procs=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV diff --git a/.github/actions/setup-iverilog/action.yml b/.github/actions/setup-iverilog/action.yml index 0acb582e3..3457303e2 100644 --- a/.github/actions/setup-iverilog/action.yml +++ b/.github/actions/setup-iverilog/action.yml @@ -11,7 +11,7 @@ runs: steps: - name: iverilog Linux deps if: steps.restore-iverilog.outputs.cache-hit != 'true' && runner.os == 'Linux' - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 + uses: awalsh128/cache-apt-pkgs-action@v1.6.1 with: packages: autoconf gperf make gcc g++ bison flex libbz2-dev version: ${{ inputs.runs-on }}-iverilog @@ -40,7 +40,7 @@ runs: make -j$procs make install - - uses: actions/cache/restore@v4 + - uses: actions/cache/restore@v6 id: restore-iverilog with: path: .local/ @@ -62,7 +62,7 @@ runs: run: | iverilog -V - - uses: actions/cache/save@v4 + - uses: actions/cache/save@v6 id: save-iverilog if: steps.restore-iverilog.outputs.cache-hit != 'true' with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dcdfc03cb..708f6e4ac 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,7 +3,7 @@ name: "CodeQL" on: workflow_dispatch: schedule: - - cron: '0 3 * * *' + - cron: '0 3 * * 6' jobs: analyze: @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: submodules: true persist-credentials: false diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index 603d91e5d..411fd9f55 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -15,7 +15,7 @@ jobs: steps: - id: skip_check if: ${{ github.event_name != 'merge_group' }} - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: # don't run on documentation changes paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' @@ -37,13 +37,22 @@ jobs: needs: [pre_job] if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v7 with: submodules: true persist-credentials: false - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 + uses: TheMrMilchmann/setup-msvc-dev@v4 + with: + arch: x64 + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.23 + with: + key: vs-build + restore-keys: | + vs-build- - name: Install flex/bison shell: pwsh @@ -57,8 +66,9 @@ jobs: - name: Configure CMake run: > cmake -S . -B build - -A x64 + -G Ninja -DCMAKE_BUILD_TYPE=Release + -DYOSYS_COMPILER_LAUNCHER=ccache - name: Build run: > @@ -72,7 +82,7 @@ jobs: needs: [pre_job] if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v7 with: submodules: true persist-credentials: false @@ -85,6 +95,11 @@ jobs: install: >- base-devel + bison + flex + gawk + diffutils + make mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-gtest @@ -93,13 +108,14 @@ jobs: mingw-w64-x86_64-tcl mingw-w64-x86_64-libffi mingw-w64-x86_64-git + mingw-w64-x86_64-ccache - msys2-install: >- - bison - flex - gawk - diffutils - make + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.23 + with: + key: mingw-build + restore-keys: | + mingw-build- - name: Build Yosys shell: msys2 {0} @@ -107,7 +123,7 @@ jobs: set -e procs=$(nproc) rm -rf build - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DYOSYS_COMPILER_LAUNCHER=ccache cmake --build build -j${procs} ctest --test-dir build/tests/unit --output-on-failure @@ -117,10 +133,18 @@ jobs: if: (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@v5 + - uses: actions/checkout@v7 with: submodules: true persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.23 + with: + key: wasi-build + restore-keys: | + wasi-build- + - name: Build run: | WASI_VER=33 @@ -140,7 +164,7 @@ jobs: make install) export PATH=${WASI_SDK_PATH}/bin:$(pwd)/flex-prefix/bin:${PATH} - cmake -B build -DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_PATH}/share/cmake/wasi-sdk-p1.cmake -DCMAKE_BUILD_TYPE=Release . + cmake -B build -DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_PATH}/share/cmake/wasi-sdk-p1.cmake -DCMAKE_BUILD_TYPE=Release -DYOSYS_COMPILER_LAUNCHER=ccache . cmake --build build -j$(nproc) nix-build: @@ -153,7 +177,7 @@ jobs: os: [ubuntu-latest, macos-latest] fail-fast: false steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v7 with: submodules: true persist-credentials: false diff --git a/.github/workflows/prepare-docs.yml b/.github/workflows/prepare-docs.yml index ff2b96872..32f4619f7 100644 --- a/.github/workflows/prepare-docs.yml +++ b/.github/workflows/prepare-docs.yml @@ -18,7 +18,7 @@ jobs: docs_export: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }} steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: paths_ignore: '["**/README.md"]' # don't cancel in case we're updating docs @@ -46,7 +46,7 @@ jobs: runs-on: [self-hosted, linux, x64, fast] steps: - name: Checkout Yosys - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false submodules: true @@ -72,7 +72,7 @@ jobs: cmake --build build --target docs-prepare -j$procs - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: cmd-ref-${{ github.sha }} path: | diff --git a/.github/workflows/source-vendor.yml b/.github/workflows/source-vendor.yml index d85b2af08..b64306c29 100644 --- a/.github/workflows/source-vendor.yml +++ b/.github/workflows/source-vendor.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository with submodules - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: submodules: 'recursive' persist-credentials: false diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index e09fd9eb3..0c8ac6b90 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -15,7 +15,7 @@ jobs: steps: - id: skip_check if: ${{ github.event_name != 'merge_group' }} - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: # don't run on documentation changes paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' @@ -38,7 +38,7 @@ jobs: steps: - id: skip_check if: ${{ github.event_name != 'merge_group' }} - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: # don't run on readme changes paths_ignore: '["**/README.md"]' @@ -68,7 +68,7 @@ jobs: fail-fast: false steps: - name: Checkout Yosys - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: submodules: true persist-credentials: false @@ -79,11 +79,18 @@ jobs: runs-on: ${{ matrix.os }} get-build-deps: true + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.23 + with: + key: test-build-${{ matrix.os }} + restore-keys: | + test-build-${{ matrix.os }}- + - name: Build shell: bash run: | rm -rf build - cmake -B build . -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release + cmake -B build . -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DYOSYS_COMPILER_LAUNCHER=ccache cmake --build build -j$procs ctest --test-dir build/tests/unit @@ -117,7 +124,7 @@ jobs: fail-fast: false steps: - name: Checkout Yosys - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: persist-credentials: false @@ -166,7 +173,7 @@ jobs: os: [ubuntu-latest] steps: - name: Checkout Yosys - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: persist-credentials: false @@ -204,7 +211,7 @@ jobs: fail-fast: false steps: - name: Checkout Yosys - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: persist-credentials: false @@ -246,7 +253,7 @@ jobs: fail-fast: false steps: - name: Checkout Yosys - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: submodules: true persist-credentials: false @@ -276,7 +283,7 @@ jobs: cmake --build build --target docs-${{ matrix.docs-target }} -j$procs - name: Store docs build artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: docs-build-${{ matrix.docs-target }} path: docs/build/ diff --git a/.github/workflows/test-compile.yml b/.github/workflows/test-compile.yml index 3093e8dfd..fafa82894 100644 --- a/.github/workflows/test-compile.yml +++ b/.github/workflows/test-compile.yml @@ -15,7 +15,7 @@ jobs: steps: - id: skip_check if: ${{ github.event_name != 'merge_group' }} - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: # don't run on documentation changes paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' @@ -49,16 +49,13 @@ jobs: - 'clang-22' - 'gcc-16' include: - # macOS x86 - - os: macos-15-intel - compiler: 'clang-22' # macOS arm - os: macos-latest compiler: 'clang-22' fail-fast: false steps: - name: Checkout Yosys - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: submodules: true persist-credentials: false @@ -69,6 +66,13 @@ jobs: runs-on: ${{ matrix.os }} get-build-deps: true + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.23 + with: + key: test-compile-${{ matrix.os }}-${{ matrix.compiler }} + restore-keys: | + test-compile-${{ matrix.os }}-${{ matrix.compiler }}- + - name: Setup Cpp uses: aminya/setup-cpp@v1 with: @@ -91,7 +95,7 @@ jobs: shell: bash run: | rm -rf build - cmake -B build -DCMAKE_CXX_STANDARD=20 . --fresh + cmake -B build -DCMAKE_CXX_STANDARD=20 -DYOSYS_COMPILER_LAUNCHER=ccache . --fresh cmake --build build --target yosys -j$procs # maximum standard, only on newest compilers @@ -100,7 +104,7 @@ jobs: shell: bash run: | rm -rf build - cmake -B build -DCMAKE_CXX_STANDARD=26 . --fresh + cmake -B build -DCMAKE_CXX_STANDARD=26 -DYOSYS_COMPILER_LAUNCHER=ccache . --fresh cmake --build build --target yosys -j$procs test-compile-result: diff --git a/.github/workflows/test-sanitizers.yml b/.github/workflows/test-sanitizers.yml index d6c77fcf1..5439b16b4 100644 --- a/.github/workflows/test-sanitizers.yml +++ b/.github/workflows/test-sanitizers.yml @@ -15,7 +15,7 @@ jobs: steps: - id: skip_check if: ${{ github.event_name != 'merge_group' }} - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: # don't run on documentation changes paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' @@ -47,7 +47,7 @@ jobs: fail-fast: false steps: - name: Checkout Yosys - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: submodules: true persist-credentials: false @@ -60,13 +60,21 @@ jobs: 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: Build shell: bash run: | 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=${{ matrix.sanitizer }} \ + -DYOSYS_COMPILER_LAUNCHER=ccache cmake --build build -j$procs - name: Log yosys-config output diff --git a/.github/workflows/test-verific-cfg.yml b/.github/workflows/test-verific-cfg.yml index 6721c0c9b..733eb2989 100644 --- a/.github/workflows/test-verific-cfg.yml +++ b/.github/workflows/test-verific-cfg.yml @@ -9,7 +9,7 @@ jobs: runs-on: [self-hosted, linux, x64, fast] steps: - name: Checkout Yosys - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false submodules: true diff --git a/.github/workflows/test-verific.yml b/.github/workflows/test-verific.yml index 9143c2f19..f268f4b65 100644 --- a/.github/workflows/test-verific.yml +++ b/.github/workflows/test-verific.yml @@ -15,7 +15,7 @@ jobs: steps: - id: skip_check if: ${{ github.event_name != 'merge_group' }} - uses: fkirc/skip-duplicate-actions@v5 + uses: mmicko/skip-duplicate-actions@master with: # don't run on documentation changes paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' @@ -37,7 +37,7 @@ jobs: runs-on: [self-hosted, linux, x64, fast] steps: - name: Checkout Yosys - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false submodules: true @@ -70,7 +70,7 @@ jobs: cmake --build build --target install - name: Checkout SBY - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: repository: 'YosysHQ/sby' path: 'sby' @@ -125,7 +125,7 @@ jobs: runs-on: [self-hosted, linux, x64, fast] steps: - name: Checkout Yosys - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false submodules: true diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e6381a637..043c9a664 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -47,7 +47,7 @@ jobs: name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }} runs-on: ${{ matrix.os.runner }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v7 with: fetch-depth: 0 submodules: true