Instead of doing lots of repetitive tests in test-llvm11-go115 and
test-llvm11-go116, do those tests only once in assert-test-linux and
only run smoke tests for older Go versions.

Benefits:
  - This should reduce total CI time, because these jobs don't do tests
    that are done elsewere anyway. They only do the minimal work
    necessary to prove that the given Go/LLVM version works.
  - Doing all tests in assert-test-linux hopefully catches bugs that
    might not be found in regular LLVM builds.
Этот коммит содержится в:
Ayke van Laethem 2021-11-16 12:52:24 +01:00 коммит произвёл Ron Evans
родитель 869e917dc6
коммит 3d0c6dd02d

Просмотреть файл

@ -6,28 +6,6 @@ commands:
- run: - run:
name: "Pull submodules" name: "Pull submodules"
command: git submodule update --init command: git submodule update --init
apt-dependencies:
parameters:
llvm:
type: string
steps:
- run:
name: "Install apt dependencies"
command: |
echo 'deb https://apt.llvm.org/buster/ llvm-toolchain-buster-<<parameters.llvm>> main' | sudo tee /etc/apt/sources.list.d/llvm.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get update
sudo apt-get install --no-install-recommends \
llvm-<<parameters.llvm>>-dev \
clang-<<parameters.llvm>> \
libclang-<<parameters.llvm>>-dev \
lld-<<parameters.llvm>> \
qemu-system-arm \
qemu-user \
gcc-avr \
avr-libc \
cmake \
ninja-build
install-node: install-node:
steps: steps:
- run: - run:
@ -137,11 +115,21 @@ commands:
steps: steps:
- checkout - checkout
- submodules - submodules
- apt-dependencies: - run:
llvm: "<<parameters.llvm>>" name: "Install apt dependencies"
- install-node command: |
- install-chrome echo 'deb https://apt.llvm.org/buster/ llvm-toolchain-buster-<<parameters.llvm>> main' | sudo tee /etc/apt/sources.list.d/llvm.list
- install-wasmtime wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install --no-install-recommends \
llvm-<<parameters.llvm>>-dev \
clang-<<parameters.llvm>> \
libclang-<<parameters.llvm>>-dev \
lld-<<parameters.llvm>> \
gcc-avr \
avr-libc \
cmake \
ninja-build
- hack-ninja-jobs - hack-ninja-jobs
- build-binaryen-linux - build-binaryen-linux
- restore_cache: - restore_cache:
@ -158,14 +146,8 @@ commands:
key: wasi-libc-sysroot-systemclang-v3 key: wasi-libc-sysroot-systemclang-v3
paths: paths:
- lib/wasi-libc/sysroot - lib/wasi-libc/sysroot
- run:
name: "Test TinyGo"
command: go test -v -timeout=20m -tags=llvm<<parameters.llvm>> ./builder ./cgo ./compileopts ./compiler ./interp ./transform .
no_output_timeout: 20m
- run: make gen-device -j4 - run: make gen-device -j4
- run: make smoketest XTENSA=0 - run: make smoketest XTENSA=0
- run: make tinygo-test
- run: make wasmtest
- save_cache: - save_cache:
key: go-cache-v2-{{ checksum "go.mod" }}-{{ .Environment.CIRCLE_BUILD_NUM }} key: go-cache-v2-{{ checksum "go.mod" }}-{{ .Environment.CIRCLE_BUILD_NUM }}
paths: paths:
@ -189,6 +171,7 @@ commands:
ninja-build \ ninja-build \
python3 python3
- install-node - install-node
- install-chrome
- install-wasmtime - install-wasmtime
- install-cmake - install-cmake
- hack-ninja-jobs - hack-ninja-jobs
@ -219,7 +202,11 @@ commands:
paths: paths:
llvm-build llvm-build
- build-binaryen-linux-stretch - build-binaryen-linux-stretch
- run: make ASSERT=1 - run:
name: "Build TinyGo"
command: |
make ASSERT=1
echo 'export PATH=$(pwd)/build:$PATH' >> $BASH_ENV
- build-wasi-libc - build-wasi-libc
- run: - run:
name: "Test TinyGo" name: "Test TinyGo"
@ -236,7 +223,9 @@ commands:
- ~/.cache/go-build - ~/.cache/go-build
- /go/pkg/mod - /go/pkg/mod
- run: make gen-device -j4 - run: make gen-device -j4
- run: make smoketest TINYGO=build/tinygo - run: make smoketest
- run: make tinygo-test
- run: make wasmtest
build-linux: build-linux:
steps: steps:
- checkout - checkout