diff --git a/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile b/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile new file mode 100644 index 00000000000..a51ff573bb0 --- /dev/null +++ b/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile @@ -0,0 +1,30 @@ +FROM ubuntu:20.04 + +# install dependencies. +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yq \ + binaryen \ + build-essential \ + ccache \ + cmake \ + curl \ + dumb-init \ + git \ + jq \ + libboost-all-dev \ + libcurl4-openssl-dev \ + libgmp-dev \ + libssl-dev \ + libtinfo5 \ + libusb-1.0-0-dev \ + libzstd-dev \ + llvm-11-dev \ + ninja-build \ + npm \ + pkg-config \ + time \ + && apt-get clean -yq \ + && rm -rf /var/lib/apt/lists/* + +ENTRYPOINT ["/usr/bin/dumb-init", "--"] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 20c04810660..00000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,488 +0,0 @@ -name: Pull Request -on: [pull_request] - -env: - PR_NUMBER: ${{ toJson(github.event.number) }} - -jobs: - submodule_regression_check: - if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id - name: Submodule Regression Check - runs-on: ubuntu-latest - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Submodule Regression Check - run: ./.cicd/submodule-regression-check.sh - - - amazon_linux-2-build: - if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id - name: Amazon_Linux 2 | Build - runs-on: ubuntu-latest - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Build - run: | - ./.cicd/build.sh - tar -pczf build.tar.gz build - env: - IMAGE_TAG: amazon_linux-2-pinned - PLATFORM_TYPE: pinned - - name: Upload Build Artifact - uses: actions/upload-artifact@v1 - with: - name: amazon_linux-2-build - path: build.tar.gz - amazon_linux-2-parallel-test: - name: Amazon_Linux 2 | Parallel Test - runs-on: ubuntu-latest - needs: amazon_linux-2-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: amazon_linux-2-build - - name: Parallel Test - run: | - tar -xzf amazon_linux-2-build/build.tar.gz - ./.cicd/test.sh scripts/parallel-test.sh - env: - IMAGE_TAG: amazon_linux-2-pinned - PLATFORM_TYPE: pinned - amazon_linux-2-wasm-test: - name: Amazon_Linux 2 | WASM Spec Test - runs-on: ubuntu-latest - needs: amazon_linux-2-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: amazon_linux-2-build - - name: WASM Spec Test - run: | - tar -xzf amazon_linux-2-build/build.tar.gz - ./.cicd/test.sh scripts/wasm-spec-test.sh - env: - IMAGE_TAG: amazon_linux-2-pinned - PLATFORM_TYPE: pinned - amazon_linux-2-serial-test: - name: Amazon_Linux 2 | Serial Test - runs-on: ubuntu-latest - needs: amazon_linux-2-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: amazon_linux-2-build - - name: Serial Test - run: | - tar -xzf amazon_linux-2-build/build.tar.gz - ./.cicd/test.sh scripts/serial-test.sh - env: - IMAGE_TAG: amazon_linux-2-pinned - PLATFORM_TYPE: pinned - - - centos-77-build: - if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id - name: CentOS 7.7 | Build - runs-on: ubuntu-latest - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Build - run: | - ./.cicd/build.sh - tar -pczf build.tar.gz build - env: - IMAGE_TAG: centos-7.7-pinned - PLATFORM_TYPE: pinned - - name: Upload Build Artifact - uses: actions/upload-artifact@v1 - with: - name: centos-77-build - path: build.tar.gz - centos-77-parallel-test: - name: CentOS 7.7 | Parallel Test - runs-on: ubuntu-latest - needs: centos-77-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: centos-77-build - - name: Parallel Test - run: | - tar -xzf centos-77-build/build.tar.gz - ./.cicd/test.sh scripts/parallel-test.sh - env: - IMAGE_TAG: centos-7.7-pinned - PLATFORM_TYPE: pinned - centos-77-wasm-test: - name: CentOS 7.7 | WASM Spec Test - runs-on: ubuntu-latest - needs: centos-77-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: centos-77-build - - name: WASM Spec Test - run: | - tar -xzf centos-77-build/build.tar.gz - ./.cicd/test.sh scripts/wasm-spec-test.sh - env: - IMAGE_TAG: centos-7.7-pinned - PLATFORM_TYPE: pinned - centos-77-serial-test: - name: CentOS 7.7 | Serial Test - runs-on: ubuntu-latest - needs: centos-77-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: centos-77-build - - name: Serial Test - run: | - tar -xzf centos-77-build/build.tar.gz - ./.cicd/test.sh scripts/serial-test.sh - env: - IMAGE_TAG: centos-7.7-pinned - PLATFORM_TYPE: pinned - - - ubuntu-1604-build: - if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id - name: Ubuntu 16.04 | Build - runs-on: ubuntu-latest - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Build - run: | - ./.cicd/build.sh - tar -pczf build.tar.gz build - env: - IMAGE_TAG: ubuntu-16.04-pinned - PLATFORM_TYPE: pinned - - name: Upload Build Artifact - uses: actions/upload-artifact@v1 - with: - name: ubuntu-1604-build - path: build.tar.gz - ubuntu-1604-parallel-test: - name: Ubuntu 16.04 | Parallel Test - runs-on: ubuntu-latest - needs: ubuntu-1604-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: ubuntu-1604-build - - name: Parallel Test - run: | - tar -xzf ubuntu-1604-build/build.tar.gz - ./.cicd/test.sh scripts/parallel-test.sh - env: - IMAGE_TAG: ubuntu-16.04-pinned - PLATFORM_TYPE: pinned - ubuntu-1604-wasm-test: - name: Ubuntu 16.04 | WASM Spec Test - runs-on: ubuntu-latest - needs: ubuntu-1604-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: ubuntu-1604-build - - name: WASM Spec Test - run: | - tar -xzf ubuntu-1604-build/build.tar.gz - ./.cicd/test.sh scripts/wasm-spec-test.sh - env: - IMAGE_TAG: ubuntu-16.04-pinned - PLATFORM_TYPE: pinned - ubuntu-1604-serial-test: - name: Ubuntu 16.04 | Serial Test - runs-on: ubuntu-latest - needs: ubuntu-1604-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: ubuntu-1604-build - - name: Serial Test - run: | - tar -xzf ubuntu-1604-build/build.tar.gz - ./.cicd/test.sh scripts/serial-test.sh - env: - IMAGE_TAG: ubuntu-16.04-pinned - PLATFORM_TYPE: pinned - - - ubuntu-1804-build: - if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id - name: Ubuntu 18.04 | Build - runs-on: ubuntu-latest - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Build - run: | - ./.cicd/build.sh - tar -pczf build.tar.gz build - env: - IMAGE_TAG: ubuntu-18.04-pinned - PLATFORM_TYPE: pinned - - name: Upload Build Artifact - uses: actions/upload-artifact@v1 - with: - name: ubuntu-1804-build - path: build.tar.gz - ubuntu-1804-parallel-test: - name: Ubuntu 18.04 | Parallel Test - runs-on: ubuntu-latest - needs: ubuntu-1804-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: ubuntu-1804-build - - name: Parallel Test - run: | - tar -xzf ubuntu-1804-build/build.tar.gz - ./.cicd/test.sh scripts/parallel-test.sh - env: - IMAGE_TAG: ubuntu-18.04-pinned - PLATFORM_TYPE: pinned - ubuntu-1804-wasm-test: - name: Ubuntu 18.04 | WASM Spec Test - runs-on: ubuntu-latest - needs: ubuntu-1804-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: ubuntu-1804-build - - name: WASM Spec Test - run: | - tar -xzf ubuntu-1804-build/build.tar.gz - ./.cicd/test.sh scripts/wasm-spec-test.sh - env: - IMAGE_TAG: ubuntu-18.04-pinned - PLATFORM_TYPE: pinned - ubuntu-1804-serial-test: - name: Ubuntu 18.04 | Serial Test - runs-on: ubuntu-latest - needs: ubuntu-1804-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: ubuntu-1804-build - - name: Serial Test - run: | - tar -xzf ubuntu-1804-build/build.tar.gz - ./.cicd/test.sh scripts/serial-test.sh - env: - IMAGE_TAG: ubuntu-18.04-pinned - PLATFORM_TYPE: pinned - - - macos-1015-build: - if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id - name: MacOS 10.15 | Build - runs-on: macos-latest - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Build - run: | - ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh - ./.cicd/build.sh - tar -pczf build.tar.gz build - - name: Upload Build Artifact - uses: actions/upload-artifact@v1 - with: - name: macos-1015-build - path: build.tar.gz - macos-1015-parallel-test: - name: MacOS 10.15 | Parallel Test - runs-on: macos-latest - needs: macos-1015-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: macos-1015-build - - name: Parallel Test - run: | - ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh - tar -xzf macos-1015-build/build.tar.gz - ./.cicd/test.sh scripts/parallel-test.sh - macos-1015-wasm-test: - name: MacOS 10.15 | WASM Spec Test - runs-on: macos-latest - needs: macos-1015-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: macos-1015-build - - name: WASM Spec Test - run: | - ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh - tar -xzf macos-1015-build/build.tar.gz - ./.cicd/test.sh scripts/wasm-spec-test.sh - macos-1015-serial-test: - name: MacOS 10.15 | Serial Test - runs-on: macos-latest - needs: macos-1015-build - steps: - - name: Checkout - run: | - git clone https://github.com/${GITHUB_REPOSITORY} . - git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge - git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge - git submodule sync --recursive - git submodule update --init --force --recursive - - name: Download Build Artifact - uses: actions/download-artifact@v1 - with: - name: macos-1015-build - - name: Serial Test - run: | - ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh - tar -xzf macos-1015-build/build.tar.gz - ./.cicd/test.sh scripts/serial-test.sh \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000000..328defdeca4 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,20 @@ +name: Pull Request +on: [pull_request] + +env: + PR_NUMBER: ${{ toJson(github.event.number) }} + +jobs: + submodule_regression_check: + name: Submodule Regression Check + runs-on: ubuntu-latest + steps: + - name: Checkout + run: | + git clone https://github.com/${GITHUB_REPOSITORY} . + git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge + git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge + git submodule sync --recursive + git submodule update --init --force --recursive + - name: Submodule Regression Check + run: ./.cicd/submodule-regression-check.sh diff --git a/.github/workflows/ubuntu-2004.yml b/.github/workflows/ubuntu-2004.yml new file mode 100644 index 00000000000..e5e716b7006 --- /dev/null +++ b/.github/workflows/ubuntu-2004.yml @@ -0,0 +1,369 @@ +name: Ubuntu 20.04 +on: + push: + branches: + - main + - "release/*" + pull_request: + types: [assigned, opened, synchronize, reopened, labeled] + +env: + UBUNTU_2004_IMAGE: "ghcr.io/eosnetworkfoundation/builder-ubuntu-20.04-unpinned:latest" + +jobs: + ubuntu-2004-build: + name: Ubuntu 20.04 | Build + runs-on: ubuntu-latest + steps: + - name: Timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC) + message("::set-output name=timestamp::${current_date}") + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Preserve ccache + uses: actions/cache@v1.1.0 + with: + path: .ccache + key: $ubuntu-20.04-ccache_make-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + restore-keys: | + $ubuntu-20.04-ccache_make- + - name: Build + run: | + set -e + export CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache + export CCACHE_CONFIGPATH=${GITHUB_WORKSPACE}/ccache.conf + echo max_size = 600M >${GITHUB_WORKSPACE}/ccache.conf + echo log_file = ${GITHUB_WORKSPACE}/ccache.log >>${GITHUB_WORKSPACE}/ccache.conf + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} -e CCACHE_DIR -e CCACHE_CONFIGPATH --user $(id -u):$(id -g) ${UBUNTU_2004_IMAGE}" + export DOCKER_ROOT="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} -e CCACHE_DIR -e CCACHE_CONFIGPATH ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + echo ===== + ${DOCKER} ccache -s + echo ===== + mkdir build + ${DOCKER} bash -c "cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache .." + echo ===== + ${DOCKER} bash -c "cd build && make -j $(nproc)" + echo ===== + mkdir install + ${DOCKER_ROOT} bash -c "cd build && DESTDIR=${GITHUB_WORKSPACE}/installed make -j $(nproc) install" + echo ===== + ls -la ${GITHUB_WORKSPACE} + echo ===== + ${DOCKER} ccache -s + echo ===== + ${DOCKER} build/bin/nodeos --version + ${DOCKER} build/bin/nodeos --full-version + echo ===== + tar -pczf build.tar.gz build + tar -pczf usr_local.tar.gz installed + - name: Upload build + uses: actions/upload-artifact@v1 + with: + name: ubuntu-2004-build + path: build.tar.gz + - name: Upload usr_local + uses: actions/upload-artifact@v1 + with: + name: ubuntu-2004-usr-local + path: usr_local.tar.gz + ubuntu-2004-docker: + name: Ubuntu 20.04 | Contract Builder Docker + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: Download usr_local + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-usr-local + - name: Docker Buildx setup + uses: docker/setup-buildx-action@v1 + - name: Login to GitHub Package Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Define Tags + id: prep + run: | + REGISTRY="ghcr.io" + IMAGE="${REGISTRY}/${{ github.repository_owner }}/contract-builder-ubuntu-20.04-unpinned" + TAGS="${IMAGE}:${{ github.sha }}" + if [[ $GITHUB_REF == ref/head/main ]]; then + TAGS="${TAGS},${IMAGE}:latest" + fi + echo ::set-output name=tags::${TAGS,,} + - name: Prepare Dockerfile + run: | + set -e + mkdir installed + tar -xzf ubuntu-2004-build/build.tar.gz + tar -xzf ubuntu-2004-usr-local/usr_local.tar.gz installed + echo ===== + ls -l installed/usr/local/bin + echo ===== + echo `pwd`/build/unittests + ls -l `pwd`/build/unittests + echo ===== + echo "FROM ${UBUNTU_2004_IMAGE}" >Dockerfile + echo "RUN curl -LO https://github.com/EOSIO/eosio.cdt/releases/download/v1.7.0/eosio.cdt_1.7.0-1-ubuntu-18.04_amd64.deb \\" >>Dockerfile + echo " && dpkg -i eosio.cdt_1.7.0-1-ubuntu-18.04_amd64.deb \\" >>Dockerfile + echo " && rm eosio.cdt_1.7.0-1-ubuntu-18.04_amd64.deb" >>Dockerfile + echo "COPY installed/usr/local /usr/local" >>Dockerfile + echo "RUN mkdir -p `pwd`/build/unittests" >>Dockerfile + echo "COPY build/unittests `pwd`/build/unittests" >>Dockerfile + cat Dockerfile + echo ===== + echo ${{ steps.prep.outputs.tags }} + - name: Build & Publish Image + uses: docker/build-push-action@v2 + with: + push: true + file: Dockerfile + tags: ${{ steps.prep.outputs.tags }} + context: . + ubuntu-2004-parallel-test: + name: Ubuntu 20.04 | Parallel Test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: Parallel Test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -j $(nproc) -LE "nonparallelizable_tests|long_running_tests|wasm_spec_tests"' + ubuntu-2004-wasm-test: + name: Ubuntu 20.04 | WASM Spec Test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: WASM Spec Test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -j $(nproc) -L "wasm_spec_tests"' + ubuntu-2004-serial-test: + name: Ubuntu 20.04 | Serial Test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: Serial Test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + echo ===== + ${DOCKER} npm i + echo ===== + ${DOCKER} bash -c 'cd build && ctest -L "nonparallelizable_tests"' + ubuntu-2004-long-test: + name: Ubuntu 20.04 | Long-Running Test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: Long-Running Test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -L "long_running_tests" -E "nodeos_short_fork_take_over_lr_test|nodeos_under_min_avail_ram_lr_test|nodeos_startup_catchup_lr_test|nodeos_producer_watermark_lr_test|nodeos_irreversible_mode_lr_test|nodeos_forked_chain_lr_test|nodeos_voting_lr_test"' + nodeos_short_fork_take_over_lr_test: + name: Ubuntu 20.04 | nodeos_short_fork_take_over_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_short_fork_take_over_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_short_fork_take_over_lr_test' + nodeos_under_min_avail_ram_lr_test: + name: Ubuntu 20.04 | nodeos_under_min_avail_ram_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_under_min_avail_ram_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_under_min_avail_ram_lr_test' + nodeos_startup_catchup_lr_test: + name: Ubuntu 20.04 | nodeos_startup_catchup_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_startup_catchup_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_startup_catchup_lr_test' + nodeos_producer_watermark_lr_test: + name: Ubuntu 20.04 | nodeos_producer_watermark_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_producer_watermark_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_producer_watermark_lr_test' + nodeos_irreversible_mode_lr_test: + name: Ubuntu 20.04 | nodeos_irreversible_mode_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_irreversible_mode_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_irreversible_mode_lr_test' + nodeos_forked_chain_lr_test: + name: Ubuntu 20.04 | nodeos_forked_chain_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_forked_chain_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_forked_chain_lr_test' + nodeos_voting_lr_test: + name: Ubuntu 20.04 | nodeos_voting_lr_test + runs-on: ubuntu-latest + needs: ubuntu-2004-build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: ubuntu-2004-build + - name: nodeos_voting_lr_test + run: | + set -e + tar -xzf ubuntu-2004-build/build.tar.gz + export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} ${UBUNTU_2004_IMAGE}" + docker pull ${UBUNTU_2004_IMAGE} + ${DOCKER} bash -c 'cd build && ctest -R nodeos_voting_lr_test' diff --git a/README.md b/README.md index 0ae3cd8b9b4..8caec374727 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ apt-get update && apt-get install \ cmake \ curl \ git \ + jq \ libboost-all-dev \ libcurl4-openssl-dev \ libgmp-dev \ @@ -30,8 +31,8 @@ apt-get update && apt-get install \ libusb-1.0-0-dev \ libzstd-dev \ llvm-11-dev \ - npm \ ninja-build \ + npm \ pkg-config \ time ```