Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: buildpack:emscripten
name: buildpack-deps:emscripten

on:
pull_request:
paths:
- '.github/workflows/buildpack-emscripten.yml'
- 'scripts/docker/buildpack/Dockerfile.emscripten'
- '.github/workflows/buildpack-deps-emscripten.yml'
- 'scripts/docker/buildpack-deps/Dockerfile.emscripten'

jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
IMAGE_NAME: buildpack
IMAGE_NAME: buildpack-deps
IMAGE_VARIANT: emscripten

runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: buildpack:ubuntu1604.clang.ossfuzz
name: buildpack-deps:ubuntu1604.clang.ossfuzz

on:
pull_request:
paths:
- '.github/workflows/buildpack-ubuntu1604.clang.ossfuzz.yml'
- 'scripts/docker/buildpack/Dockerfile.ubuntu1604.clang.ossfuzz'
- '.github/workflows/buildpack-deps-ubuntu1604.clang.ossfuzz.yml'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1604.clang.ossfuzz'

jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
IMAGE_NAME: buildpack
IMAGE_NAME: buildpack-deps
IMAGE_VARIANT: ubuntu1604.clang.ossfuzz

runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: buildpack:ubuntu1804
name: buildpack-deps:ubuntu1804

on:
pull_request:
paths:
- '.github/workflows/buildpack-ubuntu1804.yml'
- 'scripts/docker/buildpack/Dockerfile.ubuntu1804'
- '.github/workflows/buildpack-deps-ubuntu1804.yml'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1804'

jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
IMAGE_NAME: buildpack
IMAGE_NAME: buildpack-deps
IMAGE_VARIANT: ubuntu1804

runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: buildpack:ubuntu2004.clang
name: buildpack-deps:ubuntu2004.clang

on:
pull_request:
paths:
- '.github/workflows/buildpack-ubuntu2004.clang.yml'
- 'scripts/docker/buildpack/Dockerfile.ubuntu2004.clang'
- '.github/workflows/buildpack-deps-ubuntu2004.clang.yml'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang'

jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
IMAGE_NAME: buildpack
IMAGE_NAME: buildpack-deps
IMAGE_VARIANT: ubuntu2004.clang
CC: clang
CXX: clang++
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: buildpack:ubuntu2004
name: buildpack-deps:ubuntu2004

on:
pull_request:
paths:
- '.github/workflows/buildpack-ubuntu2004.yml'
- 'scripts/docker/buildpack/Dockerfile.ubuntu2004'
- '.github/workflows/buildpack-deps-ubuntu2004.yml'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004'
jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
IMAGE_NAME: buildpack
IMAGE_NAME: buildpack-deps
IMAGE_VARIANT: ubuntu2004

runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions scripts/ci/docker_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ check_version() {
fi

if [ -z "${PREV_VERSION}" ]; then
PREV_VERSION=-1
PREV_VERSION=0
echo ""
echo "WARNING: no previous version found. Will set \$PREV_VERSION = -1."
echo "WARNING: no previous version found. Will set \$PREV_VERSION = 0."
echo ""
fi

Expand All @@ -53,7 +53,7 @@ build_docker() {
test_docker() {
echo "-- test_docker @ '${PWD}'"

docker run -v "${PWD}:/root/project" "${IMAGE_NAME}" "/root/project/scripts/ci/docker_test_${IMAGE_VARIANT}.sh"
docker run -v "${PWD}:/root/project" "${IMAGE_NAME}" "/root/project/scripts/ci/${IMAGE_NAME}_test_${IMAGE_VARIANT}.sh"
}

push_docker() {
Expand Down
30 changes: 30 additions & 0 deletions scripts/docker/buildpack-deps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# buildpack-deps docker images

The `buildpack-deps` docker images are used to compile and test solidity within our CI.

## GitHub Workflow

The creation of the images are triggered by different workflows. For each resuling
`buildpack-deps` docker image a workflow is defined in `.github/workflows/buildpack-deps`.
The workflows get triggered, if the workflow file itself, or the Dockerfiles `scripts/docker/buildpack-deps/Dockerfile.*`
where changed within a PR.

### Versioning

The version of the docker images can be defined within the Dockerfile with `LABEL version`. A new docker image
will only be created and pushed, if the new version is incremented by `1` compared with the version of the Dockerfile
located in `develop`.

### Build, Test & Push

If the version check was successful, the docker image will be build using the Dockerfile located in
`scripts/docker/buildpack-deps/Dockerfile.*`.

The resulting docker image will be tested by executing
the corresponding `scripts/ci/buildpack-deps_test_*` scripts. These scripts are normally symlinked to `scripts/ci/build.sh`,
except for the `buildpack-deps-ubuntu1604.clang.ossfuzz` docker image, that is symlinked to `scripts/ci/build_ossfuzz.sh`.
These scripts `scripts/ci/build.sh` and `scripts/ci/build_ossfuzz.sh` are also used by CircleCI, see `.circleci/config.yml`.

If the tests passed successfully, the docker image will get tagged by the version defined within the corresponding `Dockerfile`.
Finally, a comment will be added to the PR that contains the full repository, version and repository digest
of the freshly created docker image.