modify centos build #28
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: bcos-crypto GitHub Actions | |
on: | |
push: | |
paths-ignore: | |
- "docs/**" | |
- "Changelog.md" | |
- "README.md" | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "Changelog.md" | |
- "README.md" | |
release: | |
types: [published, created, edited] | |
jobs: | |
build_with_centos: | |
name: build_with_centos | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/centos:8 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 5 | |
- name: install CentOS dependencies | |
run: | | |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo | |
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo | |
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | |
yum install -y epel-release | |
yum install -y git make gcc gcc-c++ glibc-static glibc-devel cmake3 devtoolset-11 llvm-toolset-7.0 rh-perl530-perl | |
- name: configure and compile | |
run: | | |
. /opt/rh/devtoolset-11/enable | |
. /opt/rh/rh-perl530/enable | |
export LIBCLANG_PATH=/opt/rh/llvm-toolset-7.0/root/lib64/ | |
. /opt/rh/llvm-toolset-7.0/enable | |
alias cmake='cmake3' | |
git clone https://github.com/microsoft/vcpkg.git | |
export VCPKG_ROOT=$(pwd)/vcpkg | |
export PATH=$PATH:$VCPKG_ROOT | |
export CXX='g++' | |
export GCC='gcc' | |
cmake --preset=test | |
cmake --build build -j2 | |
cd build/bandersnatch && ctest |