diff --git a/.github/workflows/buildpack-emscripten.yml b/.github/workflows/buildpack-deps-emscripten.yml similarity index 81% rename from .github/workflows/buildpack-emscripten.yml rename to .github/workflows/buildpack-deps-emscripten.yml index 7f22b6554bb2..a32a857abd1f 100644 --- a/.github/workflows/buildpack-emscripten.yml +++ b/.github/workflows/buildpack-deps-emscripten.yml @@ -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 diff --git a/.github/workflows/buildpack-ubuntu1604.clang.ossfuzz.yml b/.github/workflows/buildpack-deps-ubuntu1604.clang.ossfuzz.yml similarity index 78% rename from .github/workflows/buildpack-ubuntu1604.clang.ossfuzz.yml rename to .github/workflows/buildpack-deps-ubuntu1604.clang.ossfuzz.yml index 1ca2f1c858bd..8ad2f65a5e39 100644 --- a/.github/workflows/buildpack-ubuntu1604.clang.ossfuzz.yml +++ b/.github/workflows/buildpack-deps-ubuntu1604.clang.ossfuzz.yml @@ -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 diff --git a/.github/workflows/buildpack-ubuntu1804.yml b/.github/workflows/buildpack-deps-ubuntu1804.yml similarity index 81% rename from .github/workflows/buildpack-ubuntu1804.yml rename to .github/workflows/buildpack-deps-ubuntu1804.yml index e0c85ffa1e0f..3004e7e8bf86 100644 --- a/.github/workflows/buildpack-ubuntu1804.yml +++ b/.github/workflows/buildpack-deps-ubuntu1804.yml @@ -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 diff --git a/.github/workflows/buildpack-ubuntu2004.clang.yml b/.github/workflows/buildpack-deps-ubuntu2004.clang.yml similarity index 81% rename from .github/workflows/buildpack-ubuntu2004.clang.yml rename to .github/workflows/buildpack-deps-ubuntu2004.clang.yml index 22164e6f2b32..5e1c173f6482 100644 --- a/.github/workflows/buildpack-ubuntu2004.clang.yml +++ b/.github/workflows/buildpack-deps-ubuntu2004.clang.yml @@ -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++ diff --git a/.github/workflows/buildpack-ubuntu2004.yml b/.github/workflows/buildpack-deps-ubuntu2004.yml similarity index 81% rename from .github/workflows/buildpack-ubuntu2004.yml rename to .github/workflows/buildpack-deps-ubuntu2004.yml index 4ad03a407c11..2a20b4582c5e 100644 --- a/.github/workflows/buildpack-ubuntu2004.yml +++ b/.github/workflows/buildpack-deps-ubuntu2004.yml @@ -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 diff --git a/scripts/ci/docker_test_emscripten.sh b/scripts/ci/buildpack-deps_test_emscripten.sh similarity index 100% rename from scripts/ci/docker_test_emscripten.sh rename to scripts/ci/buildpack-deps_test_emscripten.sh diff --git a/scripts/ci/docker_test_ubuntu1604.clang.ossfuzz.sh b/scripts/ci/buildpack-deps_test_ubuntu1604.clang.ossfuzz.sh similarity index 100% rename from scripts/ci/docker_test_ubuntu1604.clang.ossfuzz.sh rename to scripts/ci/buildpack-deps_test_ubuntu1604.clang.ossfuzz.sh diff --git a/scripts/ci/docker_test_ubuntu1804.sh b/scripts/ci/buildpack-deps_test_ubuntu1804.sh similarity index 100% rename from scripts/ci/docker_test_ubuntu1804.sh rename to scripts/ci/buildpack-deps_test_ubuntu1804.sh diff --git a/scripts/ci/docker_test_ubuntu2004.clang.sh b/scripts/ci/buildpack-deps_test_ubuntu2004.clang.sh similarity index 100% rename from scripts/ci/docker_test_ubuntu2004.clang.sh rename to scripts/ci/buildpack-deps_test_ubuntu2004.clang.sh diff --git a/scripts/ci/docker_test_ubuntu2004.sh b/scripts/ci/buildpack-deps_test_ubuntu2004.sh similarity index 100% rename from scripts/ci/docker_test_ubuntu2004.sh rename to scripts/ci/buildpack-deps_test_ubuntu2004.sh diff --git a/scripts/ci/docker_upgrade.sh b/scripts/ci/docker_upgrade.sh index 7894c93a2f9e..f5d96668450e 100755 --- a/scripts/ci/docker_upgrade.sh +++ b/scripts/ci/docker_upgrade.sh @@ -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 @@ -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() { diff --git a/scripts/docker/buildpack/Dockerfile.emscripten b/scripts/docker/buildpack-deps/Dockerfile.emscripten similarity index 100% rename from scripts/docker/buildpack/Dockerfile.emscripten rename to scripts/docker/buildpack-deps/Dockerfile.emscripten diff --git a/scripts/docker/buildpack/Dockerfile.ubuntu1604.clang.ossfuzz b/scripts/docker/buildpack-deps/Dockerfile.ubuntu1604.clang.ossfuzz similarity index 100% rename from scripts/docker/buildpack/Dockerfile.ubuntu1604.clang.ossfuzz rename to scripts/docker/buildpack-deps/Dockerfile.ubuntu1604.clang.ossfuzz diff --git a/scripts/docker/buildpack/Dockerfile.ubuntu1804 b/scripts/docker/buildpack-deps/Dockerfile.ubuntu1804 similarity index 100% rename from scripts/docker/buildpack/Dockerfile.ubuntu1804 rename to scripts/docker/buildpack-deps/Dockerfile.ubuntu1804 diff --git a/scripts/docker/buildpack/Dockerfile.ubuntu2004 b/scripts/docker/buildpack-deps/Dockerfile.ubuntu2004 similarity index 100% rename from scripts/docker/buildpack/Dockerfile.ubuntu2004 rename to scripts/docker/buildpack-deps/Dockerfile.ubuntu2004 diff --git a/scripts/docker/buildpack/Dockerfile.ubuntu2004.clang b/scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang similarity index 100% rename from scripts/docker/buildpack/Dockerfile.ubuntu2004.clang rename to scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang diff --git a/scripts/docker/buildpack-deps/README.md b/scripts/docker/buildpack-deps/README.md new file mode 100644 index 000000000000..f402e1506808 --- /dev/null +++ b/scripts/docker/buildpack-deps/README.md @@ -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. \ No newline at end of file diff --git a/scripts/docker/buildpack/emscripten.jam b/scripts/docker/buildpack-deps/emscripten.jam similarity index 100% rename from scripts/docker/buildpack/emscripten.jam rename to scripts/docker/buildpack-deps/emscripten.jam