From 942022280a93867f9812ff9d43a0a87a181f6bcc Mon Sep 17 00:00:00 2001 From: Lan Date: Sat, 8 Feb 2025 20:22:32 +0800 Subject: [PATCH] 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 --- .github/workflows/ubuntu_test_arm.yaml | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/ubuntu_test_arm.yaml diff --git a/.github/workflows/ubuntu_test_arm.yaml b/.github/workflows/ubuntu_test_arm.yaml new file mode 100644 index 000000000..303534117 --- /dev/null +++ b/.github/workflows/ubuntu_test_arm.yaml @@ -0,0 +1,70 @@ +name: build-and-test-ubuntu-arm +on: + push: + branches: + - main + schedule: + - cron: '0 0 * * *' + +jobs: + build-and-test: + # Ref: https://github.com/actions/runner-images/tree/main/images/linux + name: Test + runs-on: ubuntu-22.04-arm + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + submodules: "true" + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.23 + + # Prerequisite + + - name: Install Python3 (for Grammar test) + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y git wget curl make + sudo apt-get install python3 python3-pip -y + - name: Install rust nightly toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.79 + override: true + components: clippy, rustfmt + - name: Code format check + working-directory: ./kclvm + run: cargo fmt --check + shell: bash + - name: chmod + run: | + chmod -R 777 kclvm + - name: Code clippy check + working-directory: ./kclvm + run: cargo clippy --no-deps -r + shell: bash + - name: Grammar test + working-directory: ./kclvm + run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make && make test-grammar + shell: bash + - name: Evaluator Grammar test + working-directory: ./kclvm + run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make test-grammar-evaluator + shell: bash + - name: Runtime test + working-directory: ./kclvm + run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make test-runtime + shell: bash + - name: Install KCL CLI + run: | + go install kcl-lang.io/cli/cmd/kcl@main + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH + - name: Unit test + working-directory: ./kclvm + run: export PATH=$PATH:$PWD/../_build/dist/linux/kclvm/bin && make test + shell: bash +