-
Notifications
You must be signed in to change notification settings - Fork 124
53 lines (46 loc) · 1.75 KB
/
build-test-centos7-amd64.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build and Test on centos7 amd64
on:
pull_request:
branches:
- main
push:
branches:
- main
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 "export KCL_BUILD_GIT_SHA=$(git rev-parse HEAD) && 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 '[email protected]' && git add . && git commit -m 'chore: bump llvm version to 7.0' && make && make release"
- name: Show Artifact Version
run: _build/dist/linux/kclvm/bin/kclvm_cli version
- name: Read VERSION file
id: read_version
run: |
VERSION=$(cat VERSION)
echo "VERSION=v${VERSION}" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: kcl-${{ env.VERSION }}-linux-amd64
if-no-files-found: error
path: _build/kclvm-${{ env.VERSION }}-linux-amd64.tar.gz