forked from verilator/verilator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add ci for cmake on windows (verilator#2681) (verilator#3819)
- Loading branch information
Kritik Bhimani
authored
Dec 23, 2022
1 parent
45abcb6
commit a86ded9
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# DESCRIPTION: Github actions config | ||
# This name is key to badges in README.rst, so we use the name build | ||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 | ||
|
||
name: msbuild | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 0' # weekly | ||
|
||
env: | ||
CI_OS_NAME: win | ||
CI_COMMIT: ${{ github.sha }} | ||
CCACHE_COMPRESS: 1 | ||
CCACHE_DIR: ${{ github.workspace }}/.ccache | ||
CCACHE_LIMIT_MULTIPLE: 0.95 | ||
|
||
defaults: | ||
run: | ||
working-directory: repo | ||
|
||
jobs: | ||
|
||
windows: | ||
name: run on windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: repo | ||
- name: Cache $CCACHE_DIR | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CCACHE_DIR }} | ||
key: msbuild-msvc-cmake | ||
- name: compile | ||
env: | ||
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache | ||
run: ./ci/ci-win-compile.ps1 | ||
- name: test build | ||
run: ./ci/ci-win-test.ps1 | ||
- name: Zip up repository | ||
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip | ||
- name: Upload zip archive | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ${{ github.workspace }}/repo/verilator.zip | ||
name: verilator-win.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if (-Not (Test-Path $PWD/../.ccache/win_bison.exe)) { | ||
git clone --depth 1 https://github.com/lexxmark/winflexbison | ||
cd winflexbison | ||
mkdir build | ||
cd build | ||
cmake .. --install-prefix $PWD/../../../.ccache | ||
cmake --build . --config Release | ||
cmake --install . --prefix $PWD/../../../.ccache | ||
cd ../.. | ||
} | ||
mkdir build | ||
cd build | ||
cmake .. --install-prefix $PWD/../install | ||
cmake --build . --config Release | ||
cmake --install . --prefix $PWD/../install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cd install | ||
$Env:VERILATOR_ROOT=$PWD | ||
cd examples/cmake_tracing_c | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . --config Release | ||
Release/example.exe | ||
cd .. | ||
Remove-Item -path build -recurse |