diff --git a/.buildkite/coverage.yml b/.buildkite/coverage.yml index bbb8fa91387..c5a50bc64f4 100644 --- a/.buildkite/coverage.yml +++ b/.buildkite/coverage.yml @@ -6,14 +6,14 @@ steps: echo "--- :spiral_note_pad: Generating Code Coverage Report" && \ /usr/bin/ninja EOSIO_ut_coverage && \ echo "--- :arrow_up: Publishing Code Coverage Report" && \ - buildkite-agent artifact upload "EOSIO_ut_coverage/**/*" s3://eosio-coverage/$BUILDKITE_JOB_ID && \ + buildkite-agent artifact upload "EOSIO_ut_coverage/**/*" s3://eos-coverage/$BUILDKITE_JOB_ID && \ cp /config/.coveralls.yml . && \ /usr/local/bin/coveralls-lcov EOSIO_ut_coverage_filtered.info && \ echo "+++ View Report" && \ - printf "\033]1339;url=https://eosio-coverage.s3-us-west-2.amazonaws.com/$BUILDKITE_JOB_ID/EOSIO_ut_coverage/index.html;content=View Full Coverage Report\a\n" + printf "\033]1339;url=https://eos-coverage.s3-us-west-2.amazonaws.com/$BUILDKITE_JOB_ID/EOSIO_ut_coverage/index.html;content=View Full Coverage Report\a\n" label: ":spiral_note_pad: Generate Report" agents: - - "role=linux-coverage" + queue: "automation-large-builder-fleet" plugins: docker#v1.4.0: image: "eosio/ci:ubuntu18" diff --git a/.buildkite/debug.yml b/.buildkite/debug.yml index d6f95814f54..28576d56195 100644 --- a/.buildkite/debug.yml +++ b/.buildkite/debug.yml @@ -19,10 +19,10 @@ steps: tar -pczf build.tar.gz build/ label: ":ubuntu: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -34,10 +34,10 @@ steps: tar -pczf build.tar.gz build/ label: ":ubuntu: 18.04 Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -49,10 +49,10 @@ steps: tar -pczf build.tar.gz build/ label: ":fedora: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -64,10 +64,10 @@ steps: tar -pczf build.tar.gz build/ label: ":centos: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -79,10 +79,10 @@ steps: tar -pczf build.tar.gz build/ label: ":aws: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 @@ -122,13 +122,13 @@ steps: limit: 1 label: ":ubuntu: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -146,13 +146,13 @@ steps: limit: 1 label: ":ubuntu: 18.04 Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -170,13 +170,13 @@ steps: limit: 1 label: ":fedora: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -194,13 +194,13 @@ steps: limit: 1 label: ":centos: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -218,13 +218,13 @@ steps: limit: 1 label: ":aws: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.4.0: + docker#v2.0.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 diff --git a/.buildkite/docker.yml b/.buildkite/docker.yml new file mode 100644 index 00000000000..f8f6d8e0a12 --- /dev/null +++ b/.buildkite/docker.yml @@ -0,0 +1,74 @@ +steps: + - command: | + echo "AUTHENTICATING GOOGLE SERVICE ACCOUNT" && \ + gcloud --quiet auth activate-service-account b1-automation-svc@b1-automation-dev.iam.gserviceaccount.com --key-file=/etc/gcp-service-account.json && \ + docker-credential-gcr configure-docker && \ + echo "BUILDING BUILD IMAGE" && \ + cd Docker/builder && \ + docker build -t eosio/builder:latest -t eosio/builder:$BUILDKITE_COMMIT . --build-arg branch=$BUILDKITE_COMMIT && \ + docker tag eosio/builder:$BUILDKITE_COMMIT gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT && \ + docker tag eosio/builder:latest gcr.io/b1-automation-dev/eosio/builder:latest && \ + echo "PUSHING DOCKER IMAGES" && \ + docker push gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT && \ + docker push gcr.io/b1-automation-dev/eosio/builder:latest && \ + echo "TRASHING OLD IMAGES" && \ + docker rmi eosio/builder:$BUILDKITE_COMMIT && \ + docker rmi eosio/builder:latest && \ + docker rmi gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT && \ + docker rmi gcr.io/b1-automation-dev/eosio/builder:latest + label: "Docker build builder" + agents: + queue: "automation-docker-builder-fleet" + timeout: 300 + + - wait + + - command: | + echo "AUTHENTICATING GOOGLE SERVICE ACCOUNT" && \ + gcloud --quiet auth activate-service-account b1-automation-svc@b1-automation-dev.iam.gserviceaccount.com --key-file=/etc/gcp-service-account.json && \ + docker-credential-gcr configure-docker && \ + echo "BUILDING EOS IMAGE" && \ + docker pull gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT && \ + cd Docker && \ + docker build -t eosio/eos:latest -t eosio/eos:$BUILDKITE_COMMIT . --build-arg branch=$BUILDKITE_BRANCH && \ + docker tag eosio/eos:$BUILDKITE_COMMIT gcr.io/b1-automation-dev/eosio/eos:$BUILDKITE_COMMIT && \ + docker tag eosio/eos:latest gcr.io/b1-automation-dev/eosio/eos:latest && \ + echo "PUSHING DOCKER IMAGES" && \ + docker push gcr.io/b1-automation-dev/eosio/eos:$BUILDKITE_COMMIT && \ + docker push gcr.io/b1-automation-dev/eosio/eos:latest && \ + echo "TRASHING OLD IMAGES" && \ + docker rmi eosio/eos:$BUILDKITE_COMMIT && \ + docker rmi eosio/eos:latest && \ + docker rmi gcr.io/b1-automation-dev/eosio/eos:$BUILDKITE_COMMIT && \ + docker rmi gcr.io/b1-automation-dev/eosio/eos:latest && \ + docker rmi gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT + label: "Docker build eos" + agents: + queue: "automation-docker-builder-fleet" + timeout: 300 + + - command: | + echo "AUTHENTICATING GOOGLE SERVICE ACCOUNT" && \ + gcloud --quiet auth activate-service-account b1-automation-svc@b1-automation-dev.iam.gserviceaccount.com --key-file=/etc/gcp-service-account.json && \ + docker-credential-gcr configure-docker && \ + echo "BUILDING EOS DEV IMAGE" && \ + docker pull gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT && \ + cd Docker/dev && \ + docker build -t eosio/eos-dev:latest -t eosio/eos-dev:$BUILDKITE_COMMIT . --build-arg branch=$BUILDKITE_BRANCH && \ + docker tag eosio/eos-dev:$BUILDKITE_COMMIT gcr.io/b1-automation-dev/eosio/eos-dev:$BUILDKITE_COMMIT && \ + docker tag eosio/eos-dev:latest gcr.io/b1-automation-dev/eosio/eos-dev:latest && \ + echo "PUSHING DOCKER IMAGES" && \ + docker push gcr.io/b1-automation-dev/eosio/eos-dev:$BUILDKITE_COMMIT && \ + docker push gcr.io/b1-automation-dev/eosio/eos-dev:latest && \ + echo "TRASHING OLD IMAGES" && \ + docker rmi eosio/eos-dev:$BUILDKITE_COMMIT && \ + docker rmi eosio/eos-dev:latest && \ + docker rmi gcr.io/b1-automation-dev/eosio/eos-dev:$BUILDKITE_COMMIT && \ + docker rmi gcr.io/b1-automation-dev/eosio/eos-dev:latest && \ + docker rmi gcr.io/b1-automation-dev/eosio/builder:$BUILDKITE_COMMIT + label: "Docker build eos-dev" + agents: + queue: "automation-docker-builder-fleet" + timeout: 300 + + - wait diff --git a/.buildkite/long_running_tests.yml b/.buildkite/long_running_tests.yml index e20657a2db6..e22016c4de4 100644 --- a/.buildkite/long_running_tests.yml +++ b/.buildkite/long_running_tests.yml @@ -19,7 +19,7 @@ steps: tar -pczf build.tar.gz build/ label: ":ubuntu: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -34,7 +34,7 @@ steps: tar -pczf build.tar.gz build/ label: ":ubuntu: 18.04 Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -49,7 +49,7 @@ steps: tar -pczf build.tar.gz build/ label: ":fedora: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -64,7 +64,7 @@ steps: tar -pczf build.tar.gz build/ label: ":centos: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -79,7 +79,7 @@ steps: tar -pczf build.tar.gz build/ label: ":aws: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -116,7 +116,7 @@ steps: cd /data/job/build && ctest -L long_running_tests --output-on-failure label: ":ubuntu: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -137,7 +137,7 @@ steps: cd /data/job/build && ctest -L long_running_tests --output-on-failure label: ":ubuntu: 18.04 Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -158,7 +158,7 @@ steps: cd /data/job/build && ctest -L long_running_tests --output-on-failure label: ":fedora: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -179,7 +179,7 @@ steps: cd /data/job/build && ctest -L long_running_tests --output-on-failure label: ":centos: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -200,7 +200,7 @@ steps: cd /data/job/build && ctest -L long_running_tests --output-on-failure label: ":aws: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d35e401f7b6..1cd49460163 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -6,12 +6,26 @@ steps: echo 1 | ./eosio_build.sh && \ echo "--- Compressing build directory :compression:" && \ tar -pczf build.tar.gz build/ - label: ":darwin: Build" + label: ":darwin: High Sierra Build" agents: - "role=macos-builder" artifact_paths: "build.tar.gz" timeout: 60 + - command: | + echo "--- Creating symbolic link to job directory :file_folder:" && \ + sleep 5 && ln -s "$(pwd)" /data/job && cd /data/job && \ + echo "+++ Building :hammer:" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- Compressing build directory :compression:" && \ + tar -pczf build.tar.gz build/ + label: ":darwin: Mojave Build" + agents: + - "role=builder" + - "os=mojave" + artifact_paths: "build.tar.gz" + timeout: 60 + - command: | echo "+++ :hammer: Building" && \ echo 1 | ./eosio_build.sh && \ @@ -19,7 +33,7 @@ steps: tar -pczf build.tar.gz build/ label: ":ubuntu: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -34,7 +48,7 @@ steps: tar -pczf build.tar.gz build/ label: ":ubuntu: 18.04 Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -49,7 +63,7 @@ steps: tar -pczf build.tar.gz build/ label: ":fedora: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -64,7 +78,7 @@ steps: tar -pczf build.tar.gz build/ label: ":centos: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -79,7 +93,7 @@ steps: tar -pczf build.tar.gz build/ label: ":aws: Build" agents: - - "role=linux-builder" + queue: "automation-large-builder-fleet" artifact_paths: "build.tar.gz" plugins: docker#v1.4.0: @@ -91,15 +105,16 @@ steps: - command: | echo "--- :arrow_down: Downloading build directory" && \ - buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Build" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: High Sierra Build" && \ tar -zxf build.tar.gz && \ echo "--- :m: Starting MongoDB" && \ $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ echo "+++ :microscope: Running tests" && \ ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -j8 -LE _tests --output-on-failure - label: ":darwin: Tests" + label: ":darwin: High Sierra Tests" agents: - "role=macos-tester" + - "os=high-sierra" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -108,13 +123,13 @@ steps: - command: | echo "--- :arrow_down: Downloading build directory" && \ - buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Build" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: High Sierra Build" && \ tar -zxf build.tar.gz && \ echo "--- :m: Starting MongoDB" && \ $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ echo "+++ :microscope: Running tests" && \ ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure - label: ":darwin: NP Tests" + label: ":darwin: High Sierra NP Tests" agents: - "role=macos-tester" artifact_paths: @@ -122,6 +137,42 @@ steps: - "build/genesis.json" - "build/config.ini" timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":darwin: Mojave Tests" + agents: + - "role=tester" + - "os=mojave" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":darwin: Mojave NP Tests" + agents: + - "role=tester" + - "os=mojave" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + timeout: 60 - command: | echo "--- :arrow_down: Downloading build directory" && \ @@ -133,7 +184,7 @@ steps: cd /data/job/build && ctest -j8 -LE _tests --output-on-failure label: ":ubuntu: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -154,7 +205,7 @@ steps: cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure label: ":ubuntu: NP Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -175,7 +226,7 @@ steps: cd /data/job/build && ctest -j8 -LE _tests --output-on-failure label: ":ubuntu: 18.04 Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -196,7 +247,7 @@ steps: cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure label: ":ubuntu: 18.04 NP Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -217,7 +268,7 @@ steps: cd /data/job/build && ctest -j8 -LE _tests --output-on-failure label: ":fedora: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -238,7 +289,7 @@ steps: cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure label: ":fedora: NP Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -259,7 +310,7 @@ steps: cd /data/job/build && ctest -j8 -LE _tests --output-on-failure label: ":centos: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -280,7 +331,7 @@ steps: cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure label: ":centos: NP Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -301,7 +352,7 @@ steps: cd /data/job/build && ctest -j8 -LE _tests --output-on-failure label: ":aws: Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -322,7 +373,7 @@ steps: cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure label: ":aws: NP Tests" agents: - - "role=linux-tester" + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "build/genesis.json" @@ -332,3 +383,127 @@ steps: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 + + - wait + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: High Sierra Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build/packages && bash generate_package.sh brew + label: ":darwin: High Sierra Package Builder" + agents: + - "role=macos-builder" + - "os=high-sierra" + artifact_paths: + - "build/packages/*.tar.gz" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build/packages && bash generate_package.sh brew + label: ":darwin: Mojave Package Builder" + agents: + - "role=builder" + - "os=mojave" + artifact_paths: + - "build/packages/*.tar.gz" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + cd /data/job/build/packages && bash generate_package.sh deb + label: ":ubuntu: Package builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu" + workdir: /data/job + env: + OS: "ubuntu-16.04" + PKGTYPE: "deb" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: 18.04 Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + cd /data/job/build/packages && bash generate_package.sh deb + label: ":ubuntu: 18.04 Package builder" + agents: + - "role=linux-builder" + artifact_paths: + - "build/packages/*.deb" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + workdir: /data/job + env: + OS: "ubuntu-18.04" + PKGTYPE: "deb" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":fedora: Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + yum install -y rpm-build && \ + mkdir -p /root/rpmbuild/BUILD && \ + mkdir -p /root/rpmbuild/BUILDROOT && \ + mkdir -p /root/rpmbuild/RPMS && \ + mkdir -p /root/rpmbuild/SOURCES && \ + mkdir -p /root/rpmbuild/SPECS && \ + mkdir -p /root/rpmbuild/SRPMS && \ + cd /data/job/build/packages && bash generate_package.sh rpm + label: ":fedora: Package builder" + agents: + - "role=linux-builder" + artifact_paths: + - "build/packages/x86_64/*.rpm" + plugins: + docker#v1.4.0: + image: "eosio/ci:fedora" + workdir: /data/job + env: + OS: "fc27" + PKGTYPE: "rpm" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":centos: Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + yum install -y rpm-build && \ + mkdir -p /root/rpmbuild/BUILD && \ + mkdir -p /root/rpmbuild/BUILDROOT && \ + mkdir -p /root/rpmbuild/RPMS && \ + mkdir -p /root/rpmbuild/SOURCES && \ + mkdir -p /root/rpmbuild/SPECS && \ + mkdir -p /root/rpmbuild/SRPMS && \ + cd /data/job/build/packages && bash generate_package.sh rpm + label: ":centos: Package builder" + agents: + - "role=linux-builder" + artifact_paths: + - "build/packages/x86_64/*.rpm" + plugins: + docker#v1.4.0: + image: "eosio/ci:centos" + workdir: /data/job + env: + OS: "el7" + PKGTYPE: "rpm" + timeout: 60 diff --git a/.buildkite/sanitizers.yml b/.buildkite/sanitizers.yml index db479d25697..b8588135610 100644 --- a/.buildkite/sanitizers.yml +++ b/.buildkite/sanitizers.yml @@ -21,7 +21,7 @@ steps: echo "--- :beers: Done" label: ":_: Undefined Sanitizer" agents: - - "role=automation-builder-large" + queue: "automation-large-builder-fleet" artifact_paths: - "build.tar.gz" - "ninja.log" @@ -41,6 +41,49 @@ steps: - UBSAN_OPTIONS=print_stacktrace=1 timeout: 60 + - command: | + echo "--- :hammer: Building with Address Sanitizer" && \ + /usr/bin/cmake -GNinja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_COMPILER=clang++-4.0 \ + -DCMAKE_C_COMPILER=clang-4.0 \ + -DBOOST_ROOT="${BOOST_ROOT}" \ + -DWASM_ROOT="${WASM_ROOT}" \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" \ + -DBUILD_MONGO_DB_PLUGIN=true \ + -DENABLE_COVERAGE_TESTING=true \ + -DBUILD_DOXYGEN=false \ + -DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize-recover=all -O1 -g -fno-omit-frame-pointer" \ + -DCMAKE_C_FLAGS="-fsanitize=address -fsanitize-recover=all -O1 -g -fno-omit-frame-pointer" \ + -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address -fsanitize-recover=all -rtlib=compiler-rt -lgcc_s" \ + -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address -fsanitize-recover=all -rtlib=compiler-rt -lgcc_s" + echo "--- :shinto_shrine: Running ninja" && \ + /usr/bin/ninja | tee ninja.log && \ + echo "--- :compression: Compressing build directory" && \ + tar -pczf build.tar.gz * + echo "--- :beers: Done" + label: ":_: Address Sanitizer" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build.tar.gz" + - "ninja.log" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + command: ["--privileged"] + workdir: /data/job + mounts: + - /etc/buildkite-agent/config:/config + environment: + - BOOST_ROOT=/root/opt/boost + - OPENSSL_ROOT_DIR=/usr/include/openssl + - WASM_ROOT=/root/opt/wasm + - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/opt/wasm/bin + - CI=true + - ASAN_OPTIONS=fast_unwind_on_malloc=0:halt_on_error=0:detect_odr_violation=0:detect_leaks=0:symbolize=1:verbosity=1 + timeout: 60 + - wait - command: | @@ -50,10 +93,32 @@ steps: echo "--- :m: Starting MongoDB" && \ $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ echo "+++ :microscope: Running tests" && \ - ctest -j8 -LE _tests -V -O sanitizer.log + ctest -j8 -LE _tests -V -O sanitizer.log || true label: ":_: Undefined Sanitizer Tests" agents: - - "role=automation-builder-large" + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "sanitizer.log" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + workdir: /data/job + mounts: + - /etc/buildkite-agent/config:/config + timeout: 120 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":_: Address Sanitizer" && \ + tar -zxf build.tar.gz --no-same-owner && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ctest -j8 -LE _tests -V -O sanitizer.log || true + label: ":_: Address Sanitizer Tests" + agents: + queue: "automation-large-builder-fleet" artifact_paths: - "mongod.log" - "sanitizer.log" diff --git a/CMakeLists.txt b/CMakeLists.txt index def3695cb8c..360d6c973ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ set( CXX_STANDARD_REQUIRED ON) set(VERSION_MAJOR 1) set(VERSION_MINOR 4) -set(VERSION_PATCH 3) +set(VERSION_PATCH 4) set( CLI_CLIENT_EXECUTABLE_NAME cleos ) set( NODE_EXECUTABLE_NAME nodeos ) @@ -49,13 +49,18 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) message(FATAL_ERROR "GCC version must be at least 6.0!") endif() -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + if ("${CMAKE_GENERATOR}" STREQUAL "Ninja") + add_compile_options(-fdiagnostics-color=always) + endif() +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) message(FATAL_ERROR "Clang version must be at least 4.0!") endif() + if ("${CMAKE_GENERATOR}" STREQUAL "Ninja") + add_compile_options(-fcolor-diagnostics) + endif() endif() - set(CMAKE_EXPORT_COMPILE_COMMANDS "ON") set(BUILD_DOXYGEN FALSE CACHE BOOL "Build doxygen documentation on every make") set(BUILD_MONGO_DB_PLUGIN FALSE CACHE BOOL "Build mongo database plugin") diff --git a/CMakeModules/EosioTester.cmake.in b/CMakeModules/EosioTester.cmake.in index f47743fe5cb..741ee5f0e84 100644 --- a/CMakeModules/EosioTester.cmake.in +++ b/CMakeModules/EosioTester.cmake.in @@ -8,6 +8,15 @@ set(EOSIO_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@") enable_testing() +if (UNIX) + if (APPLE) + if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR) + set(LLVM_DIR "/usr/local/opt/llvm@4/lib/cmake/llvm") + endif() + endif() +endif() + + find_package( Gperftools QUIET ) if( GPERFTOOLS_FOUND ) message( STATUS "Found gperftools; compiling tests with TCMalloc") diff --git a/CMakeModules/EosioTesterBuild.cmake.in b/CMakeModules/EosioTesterBuild.cmake.in index 5618fe0d149..04ac7da6fe5 100644 --- a/CMakeModules/EosioTesterBuild.cmake.in +++ b/CMakeModules/EosioTesterBuild.cmake.in @@ -8,6 +8,15 @@ set(EOSIO_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@") enable_testing() +if (UNIX) + if (APPLE) + if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR) + set(LLVM_DIR "/usr/local/opt/llvm@4/lib/cmake/llvm") + endif() + endif() +endif() + + find_package( Gperftools QUIET ) if( GPERFTOOLS_FOUND ) message( STATUS "Found gperftools; compiling tests with TCMalloc") diff --git a/Docker/README.md b/Docker/README.md index 7f96f6b6391..db0340e3116 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -20,10 +20,10 @@ cd eos/Docker docker build . -t eosio/eos ``` -The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.4.3 tag, you could do the following: +The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.4.4 tag, you could do the following: ```bash -docker build -t eosio/eos:v1.4.3 --build-arg branch=v1.4.3 . +docker build -t eosio/eos:v1.4.4 --build-arg branch=v1.4.4 . ``` By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image. diff --git a/README.md b/README.md index 348201ab470..2a048d5b973 100644 --- a/README.md +++ b/README.md @@ -39,24 +39,33 @@ $ brew remove eosio ``` #### Ubuntu 18.04 Debian Package Install ```sh -$ wget https://github.com/eosio/eos/releases/download/v1.4.3/eosio-1.4.3.ubuntu-18.04-x86_64.deb -$ sudo apt install ./eosio-1.4.3.ubuntu-18.04-x86_64.deb +$ wget https://github.com/eosio/eos/releases/download/v1.4.4/eosio_1.4.4-1-ubuntu-18.04_amd64.deb +$ sudo apt install ./eosio_1.4.4-1-ubuntu-18.04_amd64.deb ``` #### Ubuntu 16.04 Debian Package Install ```sh -$ wget https://github.com/eosio/eos/releases/download/v1.4.3/eosio-1.4.3.ubuntu-16.04-x86_64.deb -$ sudo apt install ./eosio-1.4.3.ubuntu-16.04-x86_64.deb +$ wget https://github.com/eosio/eos/releases/download/v1.4.4/eosio_1.4.4-1-ubuntu-16.04_amd64.deb +$ sudo apt install ./eosio_1.4.4-1-ubuntu-16.04_amd64.deb ``` #### Debian Package Uninstall ```sh $ sudo apt remove eosio ``` -#### RPM Package Install +#### Centos RPM Package Install ```sh -$ wget https://github.com/eosio/eos/releases/download/v1.4.3/eosio-1.4.3.x86_64-0.x86_64.rpm -$ sudo yum install ./eosio-1.4.3.x86_64-0.x86_64.rpm +$ wget https://github.com/eosio/eos/releases/download/v1.4.4/eosio-1.4.4-1.el7.x86_64.rpm +$ sudo yum install ./eosio-1.4.4-1.el7.x86_64.rpm ``` -#### RPM Package Uninstall +#### Centos RPM Package Uninstall +```sh +$ sudo yum remove eosio.cdt +``` +#### Fedora RPM Package Install +```sh +$ wget https://github.com/eosio/eos/releases/download/v1.4.4/eosio-1.4.4-1.fc27.x86_64.rpm +$ sudo yum install ./eosio-1.4.4-1.fc27.x86_64.rpm +``` +#### Fedora RPM Package Uninstall ```sh $ sudo yum remove eosio.cdt ``` diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 61093adfef2..2603a87178b 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1060,31 +1060,32 @@ uint64_t read_only::get_table_index_name(const read_only::get_table_rows_params& template<> uint64_t convert_to_type(const string& str, const string& desc) { - uint64_t value = 0; + try { - value = boost::lexical_cast(str.c_str(), str.size()); - } catch( ... ) { + return boost::lexical_cast(str.c_str(), str.size()); + } catch( ... ) { } + + try { + auto trimmed_str = str; + boost::trim(trimmed_str); + name s(trimmed_str); + return s.value; + } catch( ... ) { } + + if (str.find(',') != string::npos) { // fix #6274 only match formats like 4,EOS try { - auto trimmed_str = str; - boost::trim(trimmed_str); - name s(trimmed_str); - value = s.value; - } catch( ... ) { - try { - auto symb = eosio::chain::symbol::from_string(str); - value = symb.value(); - } catch( ... ) { - try { - value = ( eosio::chain::string_to_symbol( 0, str.c_str() ) >> 8 ); - } catch( ... ) { - EOS_ASSERT( false, chain_type_exception, "Could not convert ${desc} string '${str}' to any of the following: " - "uint64_t, valid name, or valid symbol (with or without the precision)", - ("desc", desc)("str", str)); - } - } - } + auto symb = eosio::chain::symbol::from_string(str); + return symb.value(); + } catch( ... ) { } + } + + try { + return ( eosio::chain::string_to_symbol( 0, str.c_str() ) >> 8 ); + } catch( ... ) { + EOS_ASSERT( false, chain_type_exception, "Could not convert ${desc} string '${str}' to any of the following: " + "uint64_t, valid name, or valid symbol (with or without the precision)", + ("desc", desc)("str", str)); } - return value; } abi_def get_abi( const controller& db, const name& account ) { diff --git a/programs/cleos/httpc.cpp b/programs/cleos/httpc.cpp index b0b8acd574e..5503c8fe8ec 100644 --- a/programs/cleos/httpc.cpp +++ b/programs/cleos/httpc.cpp @@ -198,12 +198,12 @@ namespace eosio { namespace client { namespace http { request_stream << "content-length: " << postjson.size() << "\r\n"; request_stream << "Accept: */*\r\n"; request_stream << "Connection: close\r\n"; - request_stream << "\r\n"; // append more customized headers std::vector::iterator itr; for (itr = cp.headers.begin(); itr != cp.headers.end(); itr++) { request_stream << *itr << "\r\n"; } + request_stream << "\r\n"; request_stream << postjson; if ( print_request ) { diff --git a/scripts/generate_bottle.sh b/scripts/generate_bottle.sh index fbec0a7a340..13cd62fd71d 100644 --- a/scripts/generate_bottle.sh +++ b/scripts/generate_bottle.sh @@ -3,7 +3,7 @@ VERS=`sw_vers -productVersion | awk '/10\.13\..*/{print $0}'` if [[ -z "$VERS" ]]; then - VERS=`sw_vers -productVersion | awk '/10\.14\..*/{print $0}'` + VERS=`sw_vers -productVersion | awk '/10\.14.*/{print $0}'` if [[ -z "$VERS" ]]; then echo "Error, unsupported OS X version" diff --git a/scripts/generate_deb.sh b/scripts/generate_deb.sh index e52d4527316..9b7cb9a54f0 100644 --- a/scripts/generate_deb.sh +++ b/scripts/generate_deb.sh @@ -1,6 +1,6 @@ #! /bin/bash -NAME="${PROJECT}-${VERSION}.x86_64" +NAME="${PROJECT}_${VERSION}-1_amd64" PREFIX="usr" SPREFIX=${PREFIX} SUBPREFIX="opt/${PROJECT}/${VERSION}" diff --git a/scripts/generate_rpm.sh b/scripts/generate_rpm.sh index 5e9be4f5149..a35efde71ec 100644 --- a/scripts/generate_rpm.sh +++ b/scripts/generate_rpm.sh @@ -1,6 +1,6 @@ #! /bin/bash -NAME="${PROJECT}-${VERSION}.x86_64" +NAME="${PROJECT}-${VERSION}-1" PREFIX="usr" SPREFIX=${PREFIX} SUBPREFIX="opt/${PROJECT}/${VERSION}" @@ -13,7 +13,7 @@ export SSUBPREFIX bash generate_tarball.sh ${NAME}.tar.gz -RPMBUILD=`realpath ~/rpmbuild/BUILDROOT/${NAME}-0.x86_64` +RPMBUILD=`realpath ~/rpmbuild/BUILDROOT/${NAME}.x86_64` mkdir -p ${RPMBUILD} FILES=$(tar -xvzf ${NAME}.tar.gz -C ${RPMBUILD}) PFILES="" @@ -26,7 +26,7 @@ echo -e ${PFILES} &> ~/rpmbuild/BUILD/filenames.txt mkdir -p ${PROJECT} echo -e "Name: ${PROJECT} -Version: ${VERSION}.x86_64 +Version: ${VERSION} License: MIT Vendor: ${VENDOR} Source: ${URL} @@ -34,7 +34,7 @@ Requires: openssl-devel.x86_64, gmp-devel.x86_64, libstdc++-devel.x86_64, bzip2. URL: ${URL} Packager: ${VENDOR} <${EMAIL}> Summary: ${DESC} -Release: 0 +Release: 1 %description ${DESC} %files -f filenames.txt" &> ${PROJECT}.spec