Skip to content

Commit 9420222

Browse files
chore: add ubuntu arm runner to schedule workflow and trigger by main. (#1842)
chore: add ubuntu arm to schedule workflow and trigger by main. Signed-off-by: Lan Liang <[email protected]>
1 parent 763724d commit 9420222

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: build-and-test-ubuntu-arm
2+
on:
3+
push:
4+
branches:
5+
- main
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
build-and-test:
11+
# Ref: https://github.com/actions/runner-images/tree/main/images/linux
12+
name: Test
13+
runs-on: ubuntu-22.04-arm
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v3
17+
with:
18+
submodules: "true"
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: 1.23
23+
24+
# Prerequisite
25+
26+
- name: Install Python3 (for Grammar test)
27+
shell: bash
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y git wget curl make
31+
sudo apt-get install python3 python3-pip -y
32+
- name: Install rust nightly toolchain
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
toolchain: 1.79
36+
override: true
37+
components: clippy, rustfmt
38+
- name: Code format check
39+
working-directory: ./kclvm
40+
run: cargo fmt --check
41+
shell: bash
42+
- name: chmod
43+
run: |
44+
chmod -R 777 kclvm
45+
- name: Code clippy check
46+
working-directory: ./kclvm
47+
run: cargo clippy --no-deps -r
48+
shell: bash
49+
- name: Grammar test
50+
working-directory: ./kclvm
51+
run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make && make test-grammar
52+
shell: bash
53+
- name: Evaluator Grammar test
54+
working-directory: ./kclvm
55+
run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make test-grammar-evaluator
56+
shell: bash
57+
- name: Runtime test
58+
working-directory: ./kclvm
59+
run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make test-runtime
60+
shell: bash
61+
- name: Install KCL CLI
62+
run: |
63+
go install kcl-lang.io/cli/cmd/kcl@main
64+
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
65+
echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH
66+
- name: Unit test
67+
working-directory: ./kclvm
68+
run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make test
69+
shell: bash
70+

0 commit comments

Comments
 (0)