ci: use go modules instead of dep

This also updates the LLVM build to include this commit:
d519e424c5
Этот коммит содержится в:
Ayke van Laethem 2019-05-27 12:30:44 +02:00 коммит произвёл Ron Evans
родитель eb1d834dd4
коммит 2f95a5d452

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

@ -40,23 +40,16 @@ commands:
sudo tar -C /usr/local -xf node-v10.15.1-linux-x64.tar.xz sudo tar -C /usr/local -xf node-v10.15.1-linux-x64.tar.xz
sudo ln -s /usr/local/node-v10.15.1-linux-x64/bin/node /usr/bin/node sudo ln -s /usr/local/node-v10.15.1-linux-x64/bin/node /usr/bin/node
rm node-v10.15.1-linux-x64.tar.xz rm node-v10.15.1-linux-x64.tar.xz
dep:
steps:
- run:
name: "Install Go dependencies"
command: |
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure --vendor-only
llvm-source-linux: llvm-source-linux:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- llvm-source-8-v2 - llvm-source-8-v3
- run: - run:
name: "Fetch LLVM source" name: "Fetch LLVM source"
command: make llvm-source command: make llvm-source
- save_cache: - save_cache:
key: llvm-source-8-v2 key: llvm-source-8-v3
paths: paths:
- llvm - llvm
smoketest: smoketest:
@ -66,21 +59,17 @@ commands:
steps: steps:
- run: make smoketest-no-avr - run: make smoketest-no-avr
test-linux: test-linux:
parameters:
llvm:
type: string
steps: steps:
- checkout - checkout
- submodules - submodules
- apt-dependencies: - apt-dependencies:
llvm: <<parameters.llvm>> llvm: "-8"
- install-node - install-node
- restore_cache: - restore_cache:
keys: keys:
- go-cache-{{ checksum "Gopkg.lock" }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }} - go-cache-{{ checksum "Gopkg.lock" }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
- go-cache-{{ checksum "Gopkg.lock" }} - go-cache-{{ checksum "Gopkg.lock" }}
- llvm-source-linux - llvm-source-linux
- dep
- run: go install . - run: go install .
- run: go test -v - run: go test -v
- run: make gen-device -j4 - run: make gen-device -j4
@ -117,7 +106,7 @@ commands:
- llvm-source-linux - llvm-source-linux
- restore_cache: - restore_cache:
keys: keys:
- llvm-build-8-linux-v4 - llvm-build-8-linux-v5
- run: - run:
name: "Build LLVM" name: "Build LLVM"
command: | command: |
@ -135,7 +124,7 @@ commands:
make llvm-build make llvm-build
fi fi
- save_cache: - save_cache:
key: llvm-build-8-linux-v4 key: llvm-build-8-linux-v5
paths: paths:
llvm-build llvm-build
- run: - run:
@ -144,7 +133,6 @@ commands:
ln -s $PWD/llvm-build/bin/clang-8 /go/bin/clang-8 ln -s $PWD/llvm-build/bin/clang-8 /go/bin/clang-8
ln -s $PWD/llvm-build/bin/ld.lld /go/bin/ld.lld-8 ln -s $PWD/llvm-build/bin/ld.lld /go/bin/ld.lld-8
ln -s $PWD/llvm-build/bin/wasm-ld /go/bin/wasm-ld-8 ln -s $PWD/llvm-build/bin/wasm-ld /go/bin/wasm-ld-8
- dep
- run: - run:
name: "Test TinyGo" name: "Test TinyGo"
command: make test command: make test
@ -175,20 +163,20 @@ commands:
- run: - run:
name: "Install dependencies" name: "Install dependencies"
command: | command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install go dep qemu HOMEBREW_NO_AUTO_UPDATE=1 brew install go qemu
- restore_cache: - restore_cache:
keys: keys:
- llvm-source-8-macos-v2 - llvm-source-8-macos-v3
- run: - run:
name: "Fetch LLVM source" name: "Fetch LLVM source"
command: make llvm-source command: make llvm-source
- save_cache: - save_cache:
key: llvm-source-8-macos-v2 key: llvm-source-8-macos-v3
paths: paths:
- llvm - llvm
- restore_cache: - restore_cache:
keys: keys:
- llvm-build-8-macos-v3 - llvm-build-8-macos-v4
- run: - run:
name: "Build LLVM" name: "Build LLVM"
command: | command: |
@ -200,16 +188,13 @@ commands:
make llvm-build make llvm-build
fi fi
- save_cache: - save_cache:
key: llvm-build-8-macos-v3 key: llvm-build-8-macos-v4
paths: paths:
llvm-build llvm-build
- run: - run:
name: "Create LLVM symlinks" name: "Create LLVM symlinks"
command: | command: |
ln -s $PWD/llvm-build/bin/clang-8 /usr/local/bin/clang-8 ln -s $PWD/llvm-build/bin/clang-8 /usr/local/bin/clang-8
- run:
name: "Install Go dependencies"
command: dep ensure --vendor-only
- run: - run:
name: "Test TinyGo" name: "Test TinyGo"
command: make test command: make test
@ -234,27 +219,21 @@ jobs:
test-llvm8-go111: test-llvm8-go111:
docker: docker:
- image: circleci/golang:1.11 - image: circleci/golang:1.11
working_directory: /go/src/github.com/tinygo-org/tinygo
steps: steps:
- test-linux: - test-linux
llvm: "-8"
test-llvm8-go112: test-llvm8-go112:
docker: docker:
- image: circleci/golang:1.12 - image: circleci/golang:1.12
working_directory: /go/src/github.com/tinygo-org/tinygo
steps: steps:
- test-linux: - test-linux
llvm: "-8"
build-linux: build-linux:
docker: docker:
- image: circleci/golang:1.12 - image: circleci/golang:1.12
working_directory: /go/src/github.com/tinygo-org/tinygo
steps: steps:
- build-linux - build-linux
build-macos: build-macos:
macos: macos:
xcode: "10.1.0" xcode: "10.1.0"
working_directory: ~/go/src/github.com/tinygo-org/tinygo
steps: steps:
- build-macos - build-macos