Skip to content

Commit

Permalink
[tests only, circleci] Use Ubuntu 20.04 for builds, bump cache, build…
Browse files Browse the repository at this point in the history
… makemsis from source (#2713)
  • Loading branch information
rfay committed Dec 28, 2020
1 parent 95a6f48 commit e93110b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
46 changes: 23 additions & 23 deletions .circleci/config.yml
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DRUD_NONINTERACTIVE: "true"
Expand All @@ -11,13 +11,13 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: NORMAL Circle VM setup - tools, docker, golang

- run:
command: source ~/.bashrc && nvm use 10 && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
command: source ~/.bashrc && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: staticrequired
- run:
command: |
Expand All @@ -34,14 +34,14 @@ jobs:
root: ~/
paths: ddev
- save_cache:
key: linux-v13
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache

lx_nginx_fpm_test:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DDEV_TEST_WEBSERVER_TYPE: nginx-fpm
Expand All @@ -52,7 +52,7 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/linux_circle_vm_setup.sh
Expand All @@ -66,7 +66,7 @@ jobs:
- store_test_results:
path: /tmp/testresults
- save_cache:
key: linux-v13
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:

lx_apache_fpm_test:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DDEV_TEST_WEBSERVER_TYPE: apache-fpm
Expand All @@ -173,7 +173,7 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
- attach_workspace:
at: ~/
- run:
Expand All @@ -188,14 +188,14 @@ jobs:
- store_test_results:
path: /tmp/testresults
- save_cache:
key: linux-v13
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache

lx_nfsmount_test:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DDEV_TEST_USE_NFSMOUNT: true
Expand All @@ -206,7 +206,7 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
- attach_workspace:
at: ~/
- run:
Expand All @@ -216,40 +216,40 @@ jobs:
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
# Run the built-in ddev tests with the executables just built.
- run:
# CircleCI image ubuntu-1604:202007-01 has umask 002, which results in
# CircleCI image ubuntu-2004:202010-01 has umask 002, which results in
# default perms 700 for new directories, which doesn't seem to work with NFS
command: umask u=rwx,g=rwx,o=rx && make -s test EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: ddev tests
no_output_timeout: "120m"
- store_test_results:
path: /tmp/testresults
- save_cache:
key: linux-v13
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache

staticrequired:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
steps:
- checkout
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- run:
command: source ~/.bashrc && nvm use 10 && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
command: source ~/.bashrc && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: staticrequired

lx_container_test:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
GOTEST_SHORT: true
Expand All @@ -259,7 +259,7 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
Expand All @@ -283,7 +283,7 @@ jobs:
name: linux container test

- save_cache:
key: linux-v13
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
Expand Down Expand Up @@ -312,21 +312,21 @@ jobs:

artifacts:
machine:
image: ubuntu-1604:202007-01
image: ubuntu-2004:202010-01
working_directory: ~/ddev
steps:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v13
- linux-v15
- attach_workspace:
at: ~/
- run:
command: ./.circleci/generate_artifacts.sh ~/artifacts
name: tar/zip up artifacts and make hashes
no_output_timeout: "40m"
- save_cache:
key: linux-v13
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
Expand Down
9 changes: 4 additions & 5 deletions .circleci/linux_circle_vm_setup.sh
Expand Up @@ -13,7 +13,7 @@ if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then
fi

sudo apt-get update -qq
sudo apt-get install -qq mysql-client realpath zip jq expect nfs-kernel-server build-essential curl git libnss3-tools libcurl4-gnutls-dev
sudo apt-get install -qq mysql-client coreutils zip jq expect nfs-kernel-server build-essential curl git libnss3-tools libcurl4-gnutls-dev

curl -sSL --fail -o /tmp/ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip && sudo unzip -o -d /usr/local/bin /tmp/ngrok.zip

Expand All @@ -32,16 +32,15 @@ export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1

brew tap drud/ddev >/dev/null
for item in osslsigncode golang golangci-lint mkcert mkdocs ddev makensis bats-core; do
for item in osslsigncode golang mkcert mkdocs ddev bats-core; do
brew install $item >/dev/null || /home/linuxbrew/.linuxbrew/bin/brew upgrade $item >/dev/null
done
brew install --build-from-source makensis

# nvm on CircleCI has a few things. 10 is compatible with markdownlint-cli
nvm use 10
npm install --global markdownlint-cli
markdownlint --version
# readthedocs has ancient version of mkdocs in it.
pyenv global 3.8.3 # added to make CircleCi give us pip3
pyenv global 3.8.5 # added to make CircleCi give us pip3
pip3 install -q yq mkdocs==0.17.5

# Get the Stubs and Plugins for makensis; the linux makensis build doesn't do this.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -70,7 +70,7 @@ BUILD_OS = $(shell go env GOHOSTOS)
BUILD_ARCH = $(shell go env GOHOSTARCH)
VERSION_LDFLAGS=$(foreach v,$(VERSION_VARIABLES),-X '$(PKG)/pkg/version.$(v)=$($(v))')
LDFLAGS=-extldflags -static $(VERSION_LDFLAGS)
BUILD_IMAGE ?= golang:1.15.3
BUILD_IMAGE ?= drud/golang-build-container:v1.15.6
DOCKERBUILDCMD=docker run -t --rm -u $(shell id -u):$(shell id -g) \
-v "/$(PWD)://workdir$(DOCKERMOUNTFLAG)" \
-e GOPATH="//workdir/$(GOTMP)" \
Expand Down Expand Up @@ -253,7 +253,7 @@ golangci-lint:
$$CMD; \
else \
$(DOCKERTESTCMD) \
time bash -c "$$CMD"; \
bash -c "$$CMD"; \
fi

version:
Expand Down

0 comments on commit e93110b

Please sign in to comment.