mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-26 18:48:51 +00:00
Merge pull request #5988 from YosysHQ/ccache
CI cleanups and improvements
This commit is contained in:
commit
0af18fa273
12 changed files with 96 additions and 53 deletions
8
.github/actions/setup-build-env/action.yml
vendored
8
.github/actions/setup-build-env/action.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
6
.github/actions/setup-iverilog/action.yml
vendored
6
.github/actions/setup-iverilog/action.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
54
.github/workflows/extra-builds.yml
vendored
54
.github/workflows/extra-builds.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
6
.github/workflows/prepare-docs.yml
vendored
6
.github/workflows/prepare-docs.yml
vendored
|
|
@ -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: |
|
||||
|
|
|
|||
2
.github/workflows/source-vendor.yml
vendored
2
.github/workflows/source-vendor.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
25
.github/workflows/test-build.yml
vendored
25
.github/workflows/test-build.yml
vendored
|
|
@ -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/
|
||||
|
|
|
|||
18
.github/workflows/test-compile.yml
vendored
18
.github/workflows/test-compile.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
14
.github/workflows/test-sanitizers.yml
vendored
14
.github/workflows/test-sanitizers.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
.github/workflows/test-verific-cfg.yml
vendored
2
.github/workflows/test-verific-cfg.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
8
.github/workflows/test-verific.yml
vendored
8
.github/workflows/test-verific.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
.github/workflows/wheels.yml
vendored
2
.github/workflows/wheels.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue