Skip to content

ci: add git2 in centos7 ci #208

ci: add git2 in centos7 ci

ci: add git2 in centos7 ci #208

name: Build and Test on centos7 amd64
on: ["push", "pull_request"]
jobs:
build-and-test-centos7:
name: Build and Test on centos7 amd64
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: "true"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Pull custom centos7 Docker image
run: |
docker pull kcllang/kcl-builder:centos7
# Use llvm7 to build kcl in centos7
- name: Release
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace -w /workspace \
kcllang/kcl-builder:centos7 \
/bin/bash -c "yum install -y epel-release curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto docbook2X gcc && rpm --import https://opensource.wandisco.com/RPM-GPG-KEY-WANdisco && wget https://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && rpm -i wandisco-git-release-7-2.noarch.rpm && yum install git -y && source ~/.bash_profile && export PATH=$PATH:/opt/build/bin/ && sed -i 's/llvm12/llvm7/g' kclvm/compiler/Cargo.toml && git add . && git commit -m 'chore: bump llvm version to 7.0' && make && make release"
- name: Show Artifact Version
run: _build/dist/centos/kclvm/bin/kclvm_cli version
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: kcl-centos7-amd64
if-no-files-found: error
path: _build/kclvm-centos-latest.tar.gz