Skip to content

Commit

Permalink
fix centos ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Oct 23, 2024
1 parent 4ef3b65 commit 9b714a9
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
types: [published, created, edited]
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build_with_clang:
Expand Down Expand Up @@ -123,29 +124,49 @@ jobs:
volumes:
- /github/home/vcpkg:/github/home/vcpkg
steps:
- name: pre-push
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
id: deps_cache
with:
path: |
deps/
/home/runner/.ccache
/Users/runner/.ccache/
key: centos-notest-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
centos-notest-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
centos-notest-${{ matrix.os }}-${{ github.base_ref }}-
centos-notest-${{ matrix.os }}-
- name: Prepare centos tools
run: |
# Sigh.
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/mirrorlist.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
rpm -ivh https://cbs.centos.org/kojifiles/packages/centos-release-scl-rh/2/3.el7.centos/noarch/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
rpm -ivh https://cbs.centos.org/kojifiles/packages/centos-release-scl/2/3.el7.centos/noarch/centos-release-scl-2-3.el7.centos.noarch.rpm
sed -i s/mirror.centos.org/mirrors.aliyun.com/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
# Avoid https://github.com/actions/checkout/issues/1590
curl -L -o bcos-boostssl.tar.gz https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz
tar xvf bcos-boostssl.tar.gz
cd bcos-boostssl-${GITHUB_SHA}
yum install -y -q epel-release centos-release-scl flex bison patch glibc-static glibc-devel libzstd-devel
cat /etc/yum.repos.d/*.repo
yum clean all
yum makecache
yum update -y
yum install -y epel-release centos-release-scl centos-release-scl-rh
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y -q flex bison patch glibc-static glibc-devel libzstd-devel
yum install -y -q devtoolset-11 llvm-toolset-7.0 rh-perl530-perl cmake3 zlib-devel ccache python-devel python3-devel python3-pip automake openssl
yum reinstall -y -q https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y -q git
- name: configure
run: |
source /opt/rh/devtoolset-7/enable
source /opt/rh/devtoolset-11/enable
ls -lh
pwd
git --version
git submodule init --recursive
mkdir -p build && cd build
cmake3 ../
- name: compile
run: |
source /opt/rh/devtoolset-7/enable
source /opt/rh/devtoolset-11/enable
mkdir -p build && cd build
make -j4
Expand Down

0 comments on commit 9b714a9

Please sign in to comment.