add ci test on arm (#168)

* add test on arm

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* download arm tidb

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
This commit is contained in:
YangKeao 2022-05-20 13:50:43 +08:00 committed by GitHub
parent bf14130d80
commit 03541d3687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -7,15 +7,16 @@ on:
jobs:
pull:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
job:
- verify
- build
- unit-test
- integration-test
runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
steps:
- name: Set up Go 1.16

View File

@ -61,7 +61,12 @@ kill $pid
# TODO: add test for latency, stress and gc
echo "download && run tidb"
tidb_dir="tidb-v5.3.0-linux-amd64"
case $( uname -m ) in
aarch64) ARCH=arm64;;
arm64) ARCH=arm64;;
*) ARCH=amd64;;
esac
tidb_dir="tidb-v5.3.0-linux-$ARCH"
if [[ ! (-e ${tidb_dir}.tar.gz) ]]; then
curl -fsSL -o ${tidb_dir}.tar.gz https://download.pingcap.org/${tidb_dir}.tar.gz
tar zxvf ${tidb_dir}.tar.gz

View File

@ -40,6 +40,12 @@ fi
if [ "$test_case" == "*" ]; then
for script in $test_dir/$test_case/run.sh; do
# stress are not supported in aarch64
# TODO: support stress in aarch64, and remove this check
if [[ $script == *"stress"* && "$(uname -m)" == "aarch64" ]]; then
continue
fi
run $script
done
else