Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add macOS 11 to eosio.cdt buildkite #1257

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .cicd/pipeline-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ elif [[ "$BUILDKITE" == 'true' ]]; then
printf "Skipping \033]1339;url=$DOCS_URL;content=documentation\a upload for job retry number $RETRY.\n"
fi
export MACOS_10_15_TAG="eosio-cdt-macos-10.15-$(sha1sum .cicd/platforms/macos-10.15.sh | awk '{print $1}')"
export MACOS_11_TAG="eosio-cdt-macos-11-$(sha1sum .cicd/platforms/macos-11.sh | awk '{print $1}')"
# pipeline upload
echo '+++ :pipeline_upload: Deploying Pipeline Steps'
if [[ "$BUILDKITE" == 'true' ]]; then
Expand Down
191 changes: 190 additions & 1 deletion .cicd/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,45 @@ steps:
- "queue=mac-anka-large-node-fleet"
skip: ${SKIP_MACOS_10_15}${SKIP_MAC}

- label: ":darwin: macOS 11 - Build"
command:
- "git clone $BUILDKITE_REPO eosio.cdt"
- "cd eosio.cdt && if [[ $BUILDKITE_BRANCH =~ ^pull/[0-9]+/head: ]]; then git fetch -v --prune origin refs/pull/$(echo $BUILDKITE_BRANCH | cut -d/ -f2)/head; fi"
- "cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT && git submodule update --init --recursive"
- "cd eosio.cdt && ./.cicd/build.sh"
- "cd eosio.cdt && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz"
plugins:
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
vm-name: 11.4.0_6C_14G_80G
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent::${MACOS_11_TAG}"
modify-cpu: 12
modify-ram: 24
always-pull: true
debug: true
wait-network: true
pre-execute-sleep: 5
pre-execute-ping-sleep: github.com
failover-registries:
- "registry-1"
- "registry-2"
pre-commands:
- "rm -rf mac-anka-fleet; git clone [email protected]:EOSIO/mac-anka-fleet.git && cd mac-anka-fleet && . ./ensure-tag.bash -u 12 -r 25G -a '-n'"
- EOSIO/skip-checkout#v0.1.1:
cd: ~
env:
PROJECT_TAG: ${MACOS_11_TAG}
REPO: ${BUILDKITE_PULL_REQUEST_REPO:-$BUILDKITE_REPO}
REPO_COMMIT: $BUILDKITE_COMMIT
TAG_COMMANDS: "git clone ${BUILDKITE_PULL_REQUEST_REPO:-$BUILDKITE_REPO} eosio.cdt && cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT && git submodule update --init --recursive && . ./.cicd/platforms/macos-11.sh && cd ~/eosio.cdt && cd .. && rm -rf eosio.cdt"
TEMPLATE: 11.4.0_6C_14G_80G
TEMPLATE_TAG: clean::cicd::git-ssh::nas::brew::buildkite-agent
timeout: ${TIMEOUT:-120}
agents:
- "queue=mac-anka-large-node-fleet"
skip: ${SKIP_MACOS_11}${SKIP_MAC}

- wait

- label: ":aws: Amazon_Linux 2 - EOSIO.CONTRACTS Build"
Expand Down Expand Up @@ -158,6 +197,33 @@ steps:
- "queue=mac-anka-node-fleet"
skip: ${SKIP_MACOS_10_15}${SKIP_MAC}${SKIP_WASM_METRICS}

- label: ":darwin: macOS 11 - EOSIO.CONTRACTS Build"
command:
- "git clone $BUILDKITE_REPO eosio.cdt"
- "cd eosio.cdt && if [[ $BUILDKITE_BRANCH =~ ^pull/[0-9]+/head: ]]; then git fetch -v --prune origin refs/pull/$(echo $BUILDKITE_BRANCH | cut -d/ -f2)/head; fi"
- "cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT && git submodule update --init --recursive"
- "cd eosio.cdt && buildkite-agent artifact download build.tar.gz . --step ':darwin: macOS 11 - Build' && tar -xzf build.tar.gz"
- "cd eosio.cdt && ./.cicd/eosio-contracts-build.sh"
plugins:
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
vm-name: 11.4.0_6C_14G_80G
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent::${MACOS_11_TAG}"
always-pull: true
debug: true
wait-network: true
pre-execute-sleep: 5
pre-execute-ping-sleep: github.com
failover-registries:
- "registry-1"
- "registry-2"
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents:
- "queue=mac-anka-node-fleet"
skip: ${SKIP_MACOS_11}${SKIP_MAC}${SKIP_WASM_METRICS}

- label: ":ubuntu: Ubuntu 18.04 - EOSIO.CONTRACTS Unit Test"
command:
- "buildkite-agent artifact download build_eosio_contracts.tar.gz . --step ':ubuntu: Ubuntu 18.04 - EOSIO.CONTRACTS Build' --agent-access-token $$BUILDKITE_AGENT_ACCESS_TOKEN && tar -xzf build_eosio_contracts.tar.gz"
Expand Down Expand Up @@ -242,6 +308,34 @@ steps:
timeout: ${TIMEOUT:-20}
skip: ${SKIP_MACOS_10_15}${SKIP_MAC}${SKIP_UNIT_TESTS}

- label: ":darwin: macOS 11 - Unit Tests"
command:
- "git clone $BUILDKITE_REPO eosio.cdt"
- "cd eosio.cdt && if [[ $BUILDKITE_BRANCH =~ ^pull/[0-9]+/head: ]]; then git fetch -v --prune origin refs/pull/$(echo $BUILDKITE_BRANCH | cut -d/ -f2)/head; fi"
- "cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT && git submodule update --init --recursive"
- "cd eosio.cdt && buildkite-agent artifact download build.tar.gz . --step ':darwin: macOS 11 - Build' && tar -xzf build.tar.gz"
- "cd eosio.cdt && ./.cicd/tests.sh"
plugins:
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
vm-name: 11.4.0_6C_14G_80G
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent::${MACOS_11_TAG}"
always-pull: true
debug: true
wait-network: true
pre-execute-sleep: 5
pre-execute-ping-sleep: github.com
failover-registries:
- "registry-1"
- "registry-2"
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents:
- "queue=mac-anka-node-fleet"
timeout: ${TIMEOUT:-20}
skip: ${SKIP_MACOS_11}${SKIP_MAC}${SKIP_UNIT_TESTS}

- label: ":aws: Amazon_Linux 2 - Toolchain Tests"
command:
- "buildkite-agent artifact download build.tar.gz . --step ':aws: Amazon_Linux 2 - Build' --agent-access-token $$BUILDKITE_AGENT_ACCESS_TOKEN && tar -xzf build.tar.gz"
Expand Down Expand Up @@ -314,6 +408,34 @@ steps:
timeout: ${TIMEOUT:-20}
skip: ${SKIP_MACOS_10_15}${SKIP_MAC}${SKIP_TOOLCHAIN_TESTS}

- label: ":darwin: macOS 11 - Toolchain Tests"
command:
- "git clone $BUILDKITE_REPO eosio.cdt"
- "cd eosio.cdt && if [[ $BUILDKITE_BRANCH =~ ^pull/[0-9]+/head: ]]; then git fetch -v --prune origin refs/pull/$(echo $BUILDKITE_BRANCH | cut -d/ -f2)/head; fi"
- "cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT && git submodule update --init --recursive"
- "cd eosio.cdt && buildkite-agent artifact download build.tar.gz . --step ':darwin: macOS 11 - Build' && tar -xzf build.tar.gz"
- "cd eosio.cdt && ./.cicd/toolchain-tests.sh"
plugins:
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
vm-name: 11.4.0_6C_14G_80G
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent::${MACOS_11_TAG}"
always-pull: true
debug: true
wait-network: true
pre-execute-sleep: 5
pre-execute-ping-sleep: github.com
failover-registries:
- "registry-1"
- "registry-2"
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents:
- "queue=mac-anka-node-fleet"
timeout: ${TIMEOUT:-20}
skip: ${SKIP_MACOS_11}${SKIP_MAC}${SKIP_TOOLCHAIN_TESTS}

- label: ":ubuntu: Ubuntu 18.04 - Integration Tests"
command:
- "buildkite-agent artifact download build.tar.gz . --step ':ubuntu: Ubuntu 18.04 - Build' --agent-access-token $$BUILDKITE_AGENT_ACCESS_TOKEN && tar -xzf build.tar.gz"
Expand Down Expand Up @@ -510,6 +632,63 @@ steps:
timeout: ${TIMEOUT:-10}
skip: ${SKIP_MACOS_10_15}${SKIP_PACKAGE_BUILDER}${SKIP_MAC}

- label: ":darwin: macOS 11 - Package Builder"
command:
- "git clone $BUILDKITE_REPO eosio.cdt"
- "cd eosio.cdt && if [[ $BUILDKITE_BRANCH =~ ^pull/[0-9]+/head: ]]; then git fetch -v --prune origin refs/pull/$(echo $BUILDKITE_BRANCH | cut -d/ -f2)/head; fi"
- "cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT && git submodule update --init --recursive"
- "cd eosio.cdt && buildkite-agent artifact download build.tar.gz . --step ':darwin: macOS 11 - Build' && tar -xzf build.tar.gz"
- "cd eosio.cdt && ./.cicd/package.sh"
plugins:
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
vm-name: 11.4.0_6C_14G_80G
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent::${MACOS_11_TAG}"
always-pull: true
debug: true
wait-network: true
pre-execute-sleep: 5
pre-execute-ping-sleep: github.com
failover-registries:
- "registry-1"
- "registry-2"
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents:
- "queue=mac-anka-node-fleet"
key: "macos11pb"
timeout: ${TIMEOUT:-20}
skip: ${SKIP_MACOS_11}${SKIP_MAC}${SKIP_PACKAGE_BUILDER}

- label: ":darwin: macOS 11 - Test Package"
command:
- "git clone $BUILDKITE_REPO eosio.cdt && cd eosio.cdt && git checkout -f $BUILDKITE_COMMIT"
- "cd eosio.cdt && buildkite-agent artifact download '*' . --step ':darwin: macOS 11 - Package Builder' --agent-access-token $$BUILDKITE_AGENT_ACCESS_TOKEN"
- "cd eosio.cdt && ./.cicd/test-package.anka.sh"
plugins:
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
vm-name: 11.4.0_6C_14G_80G
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
always-pull: true
debug: true
wait-network: true
pre-execute-sleep: 5
pre-execute-ping-sleep: github.com
failover-registries:
- 'registry_1'
- 'registry_2'
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents:
- "queue=mac-anka-node-fleet"
depends_on: "macos11pb"
allow_dependency_failure: false
timeout: ${TIMEOUT:-10}
skip: ${SKIP_MACOS_11}${SKIP_PACKAGE_BUILDER}${SKIP_MAC}

- wait

- label: ":docker::ubuntu: Docker - Build 18.04 Docker Image"
Expand All @@ -519,7 +698,7 @@ steps:
timeout: 10
skip: ${SKIP_DOCKER}${SKIP_UBUNTU_18}${SKIP_LINUX}

- label: ":beer: Brew Updater"
- label: ":beer: Brew Updater 10.15"
command: |
buildkite-agent artifact download eosio.cdt.rb . --step ':darwin: macOS 10.15 - Package Builder'
mv eosio.cdt.rb eosio_cdt_catalina.rb
Expand All @@ -529,6 +708,16 @@ steps:
timeout: "${TIMEOUT:-5}"
skip: ${SKIP_MACOS_10_15}${SKIP_MAC}${SKIP_PACKAGE_BUILDER}

- label: ":beer: Brew Updater 11"
command: |
buildkite-agent artifact download eosio.cdt.rb . --step ':darwin: macOS 11 - Package Builder'
mv eosio.cdt.rb eosio_cdt_BigSur.rb
buildkite-agent artifact upload eosio_cdt_BigSur.rb
agents:
queue: "automation-basic-builder-fleet"
timeout: "${TIMEOUT:-5}"
skip: ${SKIP_MACOS_11}${SKIP_MAC}${SKIP_PACKAGE_BUILDER}

- label: ":git: Git Submodule Regression Check"
command:
- "./.cicd/submodule-regression-checker.sh"
Expand Down
13 changes: 13 additions & 0 deletions .cicd/platforms/macos-11.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -eou pipefail
VERSION=1

brew update
brew unlink md5sha1sum
brew install coreutils gnu-sed grep tree automake cmake doxygen gettext git gmp graphviz lcov libtool python@3 wget

echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo '' >> ~/.bash_profile
source ~/.bash_profile
4 changes: 4 additions & 0 deletions tools/include/compiler_options.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,10 @@ static void GetLdDefaults(std::vector<std::string>& ldopts) {
}
} else {
#ifdef __APPLE__
// Adding the -F option fixes an issue in Big Sur where it's unable to
// link the Foundation framework. Adding this doesn't seem to cause
// problems for the older version of OSX.
ldopts.insert(ldopts.end(), {"-F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/"});
ldopts.insert(ldopts.end(), {"-arch", "x86_64", "-macosx_version_min", "10.13", "-framework", "Foundation", "-framework", "System"});
#endif
ldopts.emplace_back("-static");
Expand Down