Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Windows build via circleci #539

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 49 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 2.1
orbs:
win: circleci/windows@5.0

executors:
lint:
Expand Down Expand Up @@ -76,6 +78,12 @@ commands:
command: |
curl -L https://github.com/Kitware/CMake/releases/download/v<<parameters.version>>/cmake-<<parameters.version>>-linux-x86_64.tar.gz | sudo tar -xz --strip=1

checkout_submodules:
steps:
- run:
name: "Update submodules"
command: git submodule update --init --recursive

build_silkworm:
parameters:
branch:
Expand Down Expand Up @@ -145,9 +153,7 @@ commands:
description: "Build"
steps:
- checkout
- run:
name: "Update submodules"
command: git submodule update --init --recursive
- checkout_submodules
- run:
name: "Environment"
command: |
Expand Down Expand Up @@ -195,6 +201,7 @@ commands:
steps:
- run:
name: "Test"
shell: bash
working_directory: ~/build
command: ctest -R ${TESTS_FILTER:-'.*'} --schedule-random --output-on-failure --parallel $CMAKE_BUILD_PARALLEL_LEVEL --output-junit ~/test_results/evmone.xml
- store_test_results:
Expand Down Expand Up @@ -241,8 +248,9 @@ commands:
steps:
- run:
name: "Build Package"
shell: bash
working_directory: ~/package
command: cmake --build ~/build --target package && mv ~/build/evmone*.tar.gz* .
command: cmake --build ~/build --target package && mv ~/build/evmone-*.* .
- store_artifacts:
path: ~/package
destination: package
Expand Down Expand Up @@ -286,6 +294,38 @@ jobs:
- test
- package

release-windows:
executor: win/server-2022
environment:
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4
steps:
- checkout
- checkout_submodules
- run:
name: "Setup environment (bash)"
shell: bash
command: |
echo 'export PATH=$PATH:"/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin"' >> $BASH_ENV
- run:
name: 'Configure'
shell: powershell
command: |
$ErrorActionPreference = "Stop"
& 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1' -Arch amd64
which cmake
cmake -S . -B ~/build -G Ninja -DCMAKE_INSTALL_PREFIX=C:\install -DEVMONE_TESTING=ON
- run:
name: 'Build'
shell: powershell
command: |
$ErrorActionPreference = "Stop"
& 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1' -Arch amd64
cmake --build ~/build
- test
- package


release-macos:
executor: macos
environment:
Expand Down Expand Up @@ -505,15 +545,18 @@ workflows:
filters:
tags:
only: /.*/
- release-windows:
filters:
tags:
only: /.*/
- release-macos:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
- deploy:
requires:
- release-linux
- release-windows
- release-macos
filters:
branches:
Expand Down