3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-28 11:38:50 +00:00

Add ccache

This commit is contained in:
Miodrag Milanovic 2026-06-26 08:02:58 +02:00
parent 06a64af1f4
commit 63dd0e1a60
4 changed files with 44 additions and 13 deletions

View file

@ -45,6 +45,11 @@ jobs:
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.23
with:
key: vs-build
- name: Install flex/bison
shell: pwsh
run: |
@ -57,8 +62,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: >
@ -85,6 +91,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 +104,12 @@ 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
- name: Build Yosys
shell: msys2 {0}
@ -107,7 +117,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
@ -121,6 +131,11 @@ jobs:
with:
submodules: true
persist-credentials: false
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.23
with:
key: wasi-build
- name: Build
run: |
WASI_VER=33
@ -140,7 +155,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: