fix link error of unittest when chain lib is compiled by pinned build… #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu 20.04 | |
on: | |
push: | |
branches: | |
- main | |
- "release/*" | |
pull_request: | |
types: [assigned, opened, synchronize, reopened, labeled] | |
env: | |
BUILDER_IMAGE: "ghcr.io/eosnetworkfoundation/contract-builder-ubuntu-20.04-unpinned:61d503c54e0e1893d04b3a470933d553b35e957d" | |
jobs: | |
ubuntu-2004-build: | |
name: Ubuntu 20.04 | Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
set -e | |
export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} --user $(id -u):$(id -g) ${BUILDER_IMAGE}" | |
docker pull ${BUILDER_IMAGE} | |
echo ===== | |
mkdir build | |
${DOCKER} bash -c "cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=yes .." | |
echo ===== | |
${DOCKER} bash -c "cd build && make -j $(nproc) VERBOSE=1" | |
echo ===== | |
tar -pczf build.tar.gz build | |
echo ===== | |
mkdir built-contracts | |
cp \ | |
build/contracts/eosio.bios/eosio.bios.abi \ | |
build/contracts/eosio.bios/eosio.bios.wasm \ | |
build/contracts/eosio.msig/eosio.msig.abi \ | |
build/contracts/eosio.msig/eosio.msig.wasm \ | |
build/contracts/eosio.system/.powerup/powup.results.abi \ | |
build/contracts/eosio.system/.rex/rex.results.abi \ | |
build/contracts/eosio.system/eosio.system.abi \ | |
build/contracts/eosio.system/eosio.system.wasm \ | |
build/contracts/eosio.token/eosio.token.abi \ | |
build/contracts/eosio.token/eosio.token.wasm \ | |
build/contracts/eosio.wrap/eosio.wrap.abi \ | |
build/contracts/eosio.wrap/eosio.wrap.wasm \ | |
built-contracts | |
ls -l built-contracts | |
- name: Upload build | |
uses: actions/upload-artifact@v1 | |
with: | |
name: ubuntu-2004-build | |
path: build.tar.gz | |
- name: Upload built contracts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: built-contracts | |
path: built-contracts | |
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} ${BUILDER_IMAGE}" | |
docker pull ${BUILDER_IMAGE} | |
${DOCKER} bash -c 'cd build/tests && ctest -j $(nproc)' |