Skip to content

Commit

Permalink
fix: git2 in centos CI
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <xpf6677@163.com>
  • Loading branch information
Peefy committed Aug 5, 2024
1 parent cb240bd commit 2885c9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-centos7-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
docker run --rm \
-v ${{ github.workspace }}:/workspace -w /workspace \
kcllang/kcl-builder:centos7 \
/bin/bash -c "yum-config-manager --disable updates && 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 config --global --add safe.directory /workspace && git config --global user.name 'GitHub Action' && git config --global user.email 'action@github.com' && git add . && git commit -m 'chore: bump llvm version to 7.0' && make && make release"
/bin/bash -c "source ~/.bash_profile && export PATH=$PATH:/opt/build/bin/ && sed -i 's/llvm12/llvm7/g' kclvm/compiler/Cargo.toml && git config --global --add safe.directory /workspace && git config --global user.name 'GitHub Action' && git config --global user.email 'action@github.com' && 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
Expand Down
2 changes: 1 addition & 1 deletion kclvm/version/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ use vergen::EmitBuilder;

fn main() -> Result<(), Box<dyn Error>> {
// Emit the instructions
EmitBuilder::builder().all_rustc().all_git().emit()?;
EmitBuilder::builder().all_rustc().git_sha(false).emit()?;
Ok(())
}
5 changes: 3 additions & 2 deletions kclvm/version/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pub const VERSION: &str = include_str!("./../../../VERSION");
pub const CHECK_SUM: &str = "c020ab3eb4b9179219d6837a57f5d323";
pub const GIT_SHA: &str = env!("VERGEN_GIT_SHA");
pub const HOST_TRIPLE: &str = env!("VERGEN_RUSTC_HOST_TRIPLE");

/// Get kCL full version string with the format `{version}-{check_sum}`.
#[inline]
Expand All @@ -16,7 +17,7 @@ pub fn get_version_info() -> String {
format!(
"Version: {}\r\nPlatform: {}\r\nGitCommit: {}",
get_version_string(),
env!("VERGEN_RUSTC_HOST_TRIPLE"),
env!("VERGEN_GIT_SHA")
HOST_TRIPLE,
GIT_SHA,
)
}

0 comments on commit 2885c9c

Please sign in to comment.