mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[ci] Add simple build job using ninja.
This commit is contained in:
parent
5db2907636
commit
9a1d33c5d2
@ -96,6 +96,10 @@ defaults:
|
|||||||
name: Build
|
name: Build
|
||||||
command: scripts/ci/build.sh
|
command: scripts/ci/build.sh
|
||||||
|
|
||||||
|
- run_build_ninja: &run_build_ninja
|
||||||
|
name: Build (Ninja)
|
||||||
|
command: scripts/ci/build_ninja.sh
|
||||||
|
|
||||||
- run_build_ossfuzz: &run_build_ossfuzz
|
- run_build_ossfuzz: &run_build_ossfuzz
|
||||||
name: Build_ossfuzz
|
name: Build_ossfuzz
|
||||||
command: scripts/ci/build_ossfuzz.sh
|
command: scripts/ci/build_ossfuzz.sh
|
||||||
@ -214,6 +218,11 @@ defaults:
|
|||||||
command: ./test/lsp.py ./build/solc/solc
|
command: ./test/lsp.py ./build/solc/solc
|
||||||
- gitter_notify_failure_unless_pr
|
- gitter_notify_failure_unless_pr
|
||||||
|
|
||||||
|
- steps_build_ninja: &steps_build_ninja
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: *run_build_ninja
|
||||||
|
|
||||||
- steps_build: &steps_build
|
- steps_build: &steps_build
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
@ -760,6 +769,12 @@ jobs:
|
|||||||
<<: *base_ubuntu2004_xlarge
|
<<: *base_ubuntu2004_xlarge
|
||||||
<<: *steps_build
|
<<: *steps_build
|
||||||
|
|
||||||
|
b_ubu_ninja: &b_ubu_ninja
|
||||||
|
# this runs 2x faster on xlarge but takes 4x more resources (compared to medium).
|
||||||
|
# Enough other jobs depend on it that it's worth it though.
|
||||||
|
<<: *base_ubuntu2004
|
||||||
|
<<: *steps_build_ninja
|
||||||
|
|
||||||
# x64 ASAN build, for testing for memory related bugs
|
# x64 ASAN build, for testing for memory related bugs
|
||||||
b_ubu_asan: &b_ubu_asan
|
b_ubu_asan: &b_ubu_asan
|
||||||
# Runs slightly faster on large and xlarge but we only run it nightly so efficiency matters more.
|
# Runs slightly faster on large and xlarge but we only run it nightly so efficiency matters more.
|
||||||
@ -1448,6 +1463,7 @@ workflows:
|
|||||||
|
|
||||||
# Ubuntu build and tests
|
# Ubuntu build and tests
|
||||||
- b_ubu: *workflow_trigger_on_tags
|
- b_ubu: *workflow_trigger_on_tags
|
||||||
|
- b_ubu_ninja: *workflow_trigger_on_tags
|
||||||
- t_ubu_cli: *workflow_ubuntu2004
|
- t_ubu_cli: *workflow_ubuntu2004
|
||||||
- t_ubu_soltest_all: *workflow_ubuntu2004
|
- t_ubu_soltest_all: *workflow_ubuntu2004
|
||||||
- t_ubu_soltest_enforce_yul: *workflow_ubuntu2004
|
- t_ubu_soltest_enforce_yul: *workflow_ubuntu2004
|
||||||
|
29
scripts/ci/build_ninja.sh
Executable file
29
scripts/ci/build_ninja.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
ROOTDIR="$(dirname "$0")/../.."
|
||||||
|
cd "${ROOTDIR}"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2166
|
||||||
|
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]
|
||||||
|
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.
|
||||||
|
TZ=UTC git show --quiet --date="format-local:%Y.%-m.%-d" --format="ci.%cd" >prerelease.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$CIRCLE_SHA1" ]
|
||||||
|
then
|
||||||
|
echo -n "$CIRCLE_SHA1" >commit_hash.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
cmake --version
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" $CMAKE_OPTIONS -G "Ninja"
|
||||||
|
ninja -j 4
|
Loading…
Reference in New Issue
Block a user