Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix centos ci #42

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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
31 changes: 19 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 @@ -128,21 +129,17 @@ jobs:
container:
image: docker.io/centos:7
volumes:
- /github/home/vcpkg:/github/home/vcpkg
- /usr/local/share/vcpkg:/usr/local/share/vcpkg
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Prepare vcpkg
if: runner.os != 'Windows'
uses: friendlyanon/setup-vcpkg@v1
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 }
- uses: actions/cache@v2
id: cache
with:
path: |
/home/runner/vcpkg
/github/home/vcpkg
/usr/local/share/vcpkg/buildtrees
/usr/local/share/vcpkg/packages
ccache
key: vcpkg-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
Expand All @@ -151,13 +148,23 @@ jobs:
vcpkg-centos-v1-notest-${{ runner.temp }}-
- name: install CentOS dependencies
run: |
yum install -y epel-release centos-release-scl
yum install -y git make gcc gcc-c++ glibc-static glibc-devel cmake3 ccache devtoolset-7 openssl libzstd-devel zlib-devel flex bison python-devel python3-devel && source /opt/rh/devtoolset-7/enable
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
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 git make gcc gcc-c++ glibc-static glibc-devel cmake3 ccache devtoolset-11 openssl libzstd-devel zlib-devel flex bison python-devel python3-devel && source /opt/rh/devtoolset-11/enable
- name: configure and compile
run: |
source /opt/rh/devtoolset-7/enable
source /opt/rh/devtoolset-11/enable
# mkdir -p build && cd build
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DTESTS=ON .
cmake3 -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake -DTESTS=ON .
make -j2
CTEST_OUTPUT_ON_FAILURE=TRUE make test ARGS="--output-on-failure"

Expand Down
Loading