aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-09-12 23:11:00 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-09-13 00:09:33 +0300
commit9454b8e985fb847b067a1a209da5d0267b4a9cf0 (patch)
tree8f7cee1c3ea8c972c9b1b44fd8539a6a6d8acd08
parentstress_test.sh: move to test/ (diff)
downloadmath-server-9454b8e985fb847b067a1a209da5d0267b4a9cf0.tar.gz
math-server-9454b8e985fb847b067a1a209da5d0267b4a9cf0.zip
Travis: switch to Focal
-rw-r--r--.travis.yml47
-rw-r--r--Makefile14
-rw-r--r--README.md5
3 files changed, 23 insertions, 43 deletions
diff --git a/.travis.yml b/.travis.yml
index da019f0..98181d7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,40 +1,22 @@
language: cpp
os: linux
-dist: bionic
+dist: focal
addons:
apt:
- update: true
packages:
- - cmake
- - g++-multilib
- sources:
- - sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
- key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
+ - libboost-filesystem-dev
+ - libboost-program-options-dev
+ - libboost-regex-dev
+ - libboost-test-dev
env:
- global:
- boost_version=1.67.0
jobs:
- - configuration=Debug platform=x86
- - configuration=Release platform=x86
- configuration=Debug platform=x64
- configuration=Release platform=x64
-# Bionic repositories have Boost 1.65, but 1.66 or higher is required.
-# Tests fail to compile w/ Boost 1.66 also:
-# https://lists.boost.org/boost-bugs/2018/01/49711.php
-before_script:
- - cd cmake
- - >-
- python3 -m project.ci.travis.boost
- --
- --with-filesystem
- --with-program_options
- --with-regex
- --with-test
-
script:
+ - cd cmake
- >-
python3 -m project.ci.travis.cmake
--install "$HOME/install"
@@ -48,21 +30,14 @@ script:
jobs:
fast_finish: true
- # Clear irrelevant matrix build settings:
_clear: &clear
language: shell
addons: {apt: {packages: []}}
- before_script: []
script: []
_docker: &docker
<<: *clear
services: [docker]
- install:
- # GCR & BuildKit don't play nice together, e.g.:
- # https://github.com/moby/buildkit/issues/606
- - echo '{}' | sudo tee /etc/docker/daemon.json
- - sudo systemctl restart docker
include:
- <<: *clear
@@ -86,12 +61,6 @@ jobs:
stage: publish
name: 'Docker: build & publish multi-arch images'
if: branch = master
- addons:
- apt:
- # Newer docker for BuildKit/buildx support:
- packages:
- - docker-ce
- sources:
- - key_url: 'https://download.docker.com/linux/ubuntu/gpg'
- sourceline: 'deb https://download.docker.com/linux/ubuntu "$(lsb_release -cs)" stable'
+ # buildx isn't installed on Focal.
+ before_install: make buildx/install
script: make login && make buildx/create && make buildx/push
diff --git a/Makefile b/Makefile
index 3cf3086..5c780c7 100644
--- a/Makefile
+++ b/Makefile
@@ -11,9 +11,11 @@ PROJECT := math-server
# Enable buildx support:
export DOCKER_CLI_EXPERIMENTAL := enabled
# Target platforms (used by buildx):
-platforms := linux/amd64,linux/armhf
+PLATFORMS := linux/amd64,linux/armhf
# Docker Hub credentials:
DOCKER_USERNAME := egortensin
+# In case buildx isn't installed (e.g. on Ubuntu):
+BUILDX_VERSION := v0.4.2
.PHONY: all
all: build
@@ -103,6 +105,12 @@ compose/push: check-push compose/build
fix-binfmt:
docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+.PHONY: buildx/install
+buildx/install:
+ mkdir -p -- ~/.docker/cli-plugins/
+ curl --silent --show-error --location -- 'https://github.com/docker/buildx/releases/download/$(BUILDX_VERSION)/buildx-$(BUILDX_VERSION).linux-amd64' > ~/.docker/cli-plugins/docker-buildx
+ chmod +x -- ~/.docker/cli-plugins/docker-buildx
+
.PHONY: buildx/create
buildx/create: fix-binfmt
docker buildx create --use --name "$(PROJECT)_builder"
@@ -112,13 +120,13 @@ buildx/rm:
docker buildx rm "$(PROJECT)_builder"
buildx/build/%: DO
- docker buildx build -f "$*/Dockerfile" -t "$(DOCKER_USERNAME)/math-$*" --platform "$(platforms)" --progress plain .
+ docker buildx build -f "$*/Dockerfile" -t "$(DOCKER_USERNAME)/math-$*" --platform "$(PLATFORMS)" --progress plain .
.PHONY: buildx/build
buildx/build: buildx/build/client buildx/build/server
buildx/push/%: DO
- docker buildx build -f "$*/Dockerfile" -t "$(DOCKER_USERNAME)/math-$*" --platform "$(platforms)" --progress plain --push .
+ docker buildx build -f "$*/Dockerfile" -t "$(DOCKER_USERNAME)/math-$*" --platform "$(PLATFORMS)" --progress plain --push .
.PHONY: buildx/push
buildx/push: buildx/push/client buildx/push/server
diff --git a/README.md b/README.md
index 0cbf8af..d3c1963 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,10 @@ Development
Build using CMake.
Depends on Boost.{Filesystem,Program_options,Regex,Test}.
-Boost version 1.66 or higher is required.
+Boost version 1.67 or higher is required (it would be Boost 1.66 in a perfect
+world, but the tests [fail to compile] with that).
+
+[fail to compile]: https://lists.boost.org/boost-bugs/2018/01/49711.php
Usage
-----