Docker improvements (#571)

- Copy the current checkout to the Dockerfile.
- Add .dockerignore to exclude files while copying.
- Test tip-of-tree build within CI.
- Run the test suite outside the Docker image.
- Perform extra sanity tests.
- Switch to make commands for CircleCI.
- Improve Docker README.
This commit is contained in:
Kleis Auke Wolthuizen
2020-09-02 19:50:52 +02:00
committed by GitHub
parent f6c9e453f8
commit 645d276b5c
6 changed files with 86 additions and 63 deletions

View File

@@ -96,9 +96,13 @@ jobs:
name: install docker
command: apt-get update -q && apt-get install -q -y docker.io
- setup_remote_docker
# Build and test the tip-of-tree build of EMSDK
- run:
name: build
command: docker build --network host ./docker
command: make -C ./docker version=tot build
- run:
name: test
command: make -C ./docker version=tot test
publish-docker-image:
executor: bionic
@@ -110,16 +114,15 @@ jobs:
- setup_remote_docker
- run:
name: build
command: docker build --network host --build-arg EMSCRIPTEN_VERSION=${CIRCLE_TAG} --tag emscripten/emsdk:${CIRCLE_TAG} ./docker
command: make -C ./docker version=${CIRCLE_TAG} build
- run:
name: tag image
command: docker tag emscripten/emsdk:${CIRCLE_TAG} emscripten/emsdk:latest
name: test
command: make -C ./docker version=${CIRCLE_TAG} test
- run:
name: push image
command: |
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
docker push emscripten/emsdk:${CIRCLE_TAG}
docker push emscripten/emsdk:latest
make -C ./docker version=${CIRCLE_TAG} alias=latest push
workflows:
flake8: