Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 0 additions & 26 deletions .circleci/build_win.ps1

This file was deleted.

3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1640,8 +1640,7 @@ jobs:
- .\deps
- run:
name: "Building solidity"
command: .circleci/build_win.ps1
shell: powershell.exe
command: scripts/ci/build_win.sh
- run:
name: "Run solc.exe to make sure build was successful."
command: .\build\solc\Release\solc.exe --version
Expand Down
46 changes: 46 additions & 0 deletions scripts/ci/build_win.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
set -euo pipefail

(( $# <= 1 )) || { >&2 echo "Usage: $0 [PRERELEASE_SOURCE]"; exit 1; }
prerelease_source="${1:-ci}"
ROOTDIR="$(realpath "$(dirname "$0")/../../")"
FORCE_RELEASE="${FORCE_RELEASE:-}"
CIRCLE_TAG="${CIRCLE_TAG:-}"

cd "$ROOTDIR"
if [[ $FORCE_RELEASE != "" || $CIRCLE_TAG != "" ]]; then
echo -n > prerelease.txt
else
# Use last commit date rather than build date to avoid ending up with builds for
# different platforms having different version strings (and therefore producing different bytecode)
# if the CI is triggered just before midnight.
# NOTE: The -local suffix makes git not use the timezone from the commit but instead convert to
# local one, which we explicitly set to UTC.
# NOTE: git --date is supposed to support the %-m/%-d format too, but it does not seem to
# work on Windows. Without it we get leading zeros for month and day.
last_commit_date=$(TZ=UTC git show --quiet --date="format-local:%Y-%m-%d" --format="%cd")
last_commit_date_stripped=$(date --date="$last_commit_date" "+%Y.%-m.%-d")
echo -n "${prerelease_source}.${last_commit_date_stripped}" > prerelease.txt
fi

mkdir -p build/
cd build/

# NOTE: Using an array to force Bash to do wildcard expansion
boost_dir=("${ROOTDIR}/deps/boost/lib/cmake/Boost-"*)

"${ROOTDIR}/deps/cmake/bin/cmake" \
-G "Visual Studio 16 2019" \
-DBoost_DIR="${boost_dir[*]}" \
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded \
-DCMAKE_INSTALL_PREFIX="${ROOTDIR}/uploads/" \
..
MSBuild.exe solidity.sln \
-property:Configuration=Release \
-maxCpuCount:10 \
-verbosity:minimal
"${ROOTDIR}/deps/cmake/bin/cmake" \
--build . \
-j 10 \
--target install \
--config Release
40 changes: 0 additions & 40 deletions scripts/install_cmake.sh
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script is unrelated, but I noticed it's not used or referenced anywhere. This is a refactor PR anyway, so I thought I'd include it.

This file was deleted.