Repository navigation
90 lines (82 loc) · 2.86 KB
/
Copy pathlinux_arm.yaml
File metadata and controls
90 lines (82 loc) · 2.86 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build and Test on Linux ARCH64
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
build-and-test:
# Ref: https://github.com/actions/runner-images/tree/main/images/linux
name: build and test on Linux MUSL ARCH64
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.24
# 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.91
override: true
components: clippy, rustfmt
- name: Code format check
run: cargo fmt --check
shell: bash
- name: chmod
run: |
chmod -R 777 crates
- name: Code clippy check
run: make lint-all
shell: bash
- name: Grammar test
run: export PATH=$PATH:$PWD/_build/dist/linux/core && make && make test-grammar
shell: bash
- name: Runtime test
run: export PATH=$PATH:$PWD/_build/dist/linux/core && 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
run: export PATH=$PATH:$PWD/_build/dist/linux/core && make test
shell: bash
# RSS stability stress tests for the `release_memory()` path. See
# the matching step in `linux_amd.yaml` for context. ARM glibc has
# the same fragmentation behaviour as AMD glibc, so we run these
# on both.
- name: RSS stability stress tests (kcl-api, glibc malloc_trim)
shell: bash
timeout-minutes: 15
run: |
cargo test -p kcl-api --lib --no-fail-fast -- \
--ignored --nocapture exec_program_rss_
- name: Release
run: export PATH=$PATH:$PWD/_build/dist/linux/core && make release
shell: bash
- name: Read VERSION file
id: read_version
run: |
VERSION=$(cargo pkgid -p kcl-api | cut -d'@' -f2)
echo "VERSION=v${VERSION}" >> $GITHUB_ENV
- name: Rename artifact name with version
run: sudo mv -f _build/dist/linux/kcl-latest-linux-arm64.tar.gz _build/dist/linux/kcl-${{ env.VERSION }}-linux-arm64.tar.gz
- uses: actions/upload-artifact@v4
with:
name: kcl-${{ env.VERSION }}-linux-arm64
if-no-files-found: error
path: _build/dist/linux/kcl-${{ env.VERSION }}-linux-arm64.tar.gz