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

Ci centos eol #50

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
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
17 changes: 6 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fail-fast: true
matrix:
include:
- container: ghcr.io/aceforeverd/hybridsql-base:0.4.0
- container: ghcr.io/4paradigm/hybridsql-base:latest
flags: ""
distro: centos
- container: ubuntu:20.04
Expand All @@ -50,31 +50,26 @@ jobs:
env:
MAKEOPTS: -j2
DISTRO: ${{ matrix.distro }}

ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: setup deps
if: startsWith(matrix.container, 'ubuntu')
run: |
apt update
DEBIAN_FRONTEND=noninteractive apt-get install -y bison python3-dev libcppunit-dev build-essential cmake autoconf tcl pkg-config git curl patch libtool-bin

- name: setup deps(centos)
if: startsWith(matrix.container, 'ghcr')
run: |
yum install -y patch

- name: download thirdparty source
uses: actions/checkout@v2
uses: actions/checkout@v3
if: github.event_name == 'push' || github.event_name == 'pull_request'
with:
repository: ${{ env.OPENMLDB_REPO }}
ref: ${{ env.OPENMLDB_REF }}
path: openmldb

- name: download thirdparty source (workflow_dispatch)
uses: actions/checkout@v2
uses: actions/checkout@v3
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ github.event.inputs.OPENMLDB_REPO }}
Expand All @@ -98,7 +93,7 @@ jobs:

- name: Upload Artifact
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.UPLOAD == true)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: deps/thirdparty-*.tar.gz

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

- name: Build And Push
id: docker_build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: ${{ env.PUSH }}
Expand Down
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ FROM centos:7

ARG TARGETARCH

# hadolint ignore=DL3031
RUN yum update -y && yum install -y centos-release-scl epel-release && yum clean all

RUN yum install -y devtoolset-8 rh-git227 flex autoconf automake unzip bc expect libtool \
COPY ./patch_yum_repo.sh /
# hadolint ignore=DL3031,DL3033
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 update -y && yum install -y centos-release-scl epel-release && \
/patch_yum_repo.sh && \
yum install -y devtoolset-8 rh-git227 flex autoconf automake unzip bc expect libtool \
rh-python38-python-devel gettext byacc xz tcl cppunit-devel rh-python38-python-wheel patch \
&& yum clean all
&& yum clean all && rm /patch_yum_repo.sh

COPY setup_cmake.sh /
RUN /setup_cmake.sh ${TARGETARCH} && rm -f setup_cmake.sh
Expand Down
11 changes: 11 additions & 0 deletions patch_yum_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

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

if [[ "$(arch)" = "aarch64" ]]; then
sed -i s/vault.centos.org\\/centos/vault.centos.org\\/altarch/g /etc/yum.repos.d/*.repo
fi
Loading